28
On the First Hitting Time Density of an Ornstein-Uhlenbeck Process Alexander Lipton * , Vadim Kaushansky †‡ Abstract In this paper, we study the classical problem of the first passage hitting density of an Ornstein–Uhlenbeck process. We give two complementary (forward and back- ward) formulations of this problem and provide semi-analytical solutions for both. The corresponding problems are comparable in complexity. By using the method of heat potentials, we show how to reduce these problems to linear Volterra inte- gral equations of the second kind. For small values of t, we solve these equations analytically by using Abel equation approximation; for larger t we solve them nu- merically. We also provide a comparison with other known methods for finding the hitting density of interest, and argue that our method has considerable advantages and provides additional valuable insights. 1 Introduction Computation of the first hitting time density of an Ornstein-Uhlenbeck process is a long- standing problem, which still remains open. An abstract approach applicable to this problem has been found by Fortet (1943); the Fortet’s equation can be viewed as a variant of the Einstein-Smoluchowski equation (Einstein (1905) and Von Smoluchowski (1906)). A general overview can be found in Borodin and Salminen (2012); Breiman (1967); Horowitz (1985). Attempts to find an analytical result have been made since 1998 when Leblanc and Scaillet (1998) first derived an analytical formula which contained a mistake. Two years later, Leblanc et al. (2000) published a correction on the paper; unfortunately, the correction was erroneous as well. oing-Jaeschke and Yor (2003) noticed that the authors had incorrectly used a spatial homogeneity property for the three-dimensional Bessel bridge. Alili et al. (2005), Linetsky (2004), and Ricciardi and Sato (1988) found represen- tations for the hitting density by using the Laplace transform. Alili et al. (2005) gave several representations: a representation in the series of parabolic cylinder functions and its derivatives, an indefinite integral representation via special functions, and a Bessel bridge representation. The first approach is based on inverting the Laplace transform, which is computed analytically. As a result, the authors got the series representation * Massachusetts Institute of Technology, Connection Science, Cambridge, MA, USA and Ecole Poly- technique Federale de Lausanne, Switzerland, E-mail: [email protected] Mathematical Institute & Oxford-Man Institute, University of Oxford, UK, E-mail: [email protected] The second author gratefully acknowledges support from the Economic and Social Research Council and Bank of America Merrill Lynch 1 arXiv:1810.02390v2 [q-fin.CP] 10 Oct 2018

On the First Hitting Time Density of an Ornstein-Uhlenbeck

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: On the First Hitting Time Density of an Ornstein-Uhlenbeck

On the First Hitting Time Density of anOrnstein-Uhlenbeck Process

Alexander Lipton∗, Vadim Kaushansky†‡

Abstract

In this paper, we study the classical problem of the first passage hitting densityof an Ornstein–Uhlenbeck process. We give two complementary (forward and back-ward) formulations of this problem and provide semi-analytical solutions for both.The corresponding problems are comparable in complexity. By using the methodof heat potentials, we show how to reduce these problems to linear Volterra inte-gral equations of the second kind. For small values of t, we solve these equationsanalytically by using Abel equation approximation; for larger t we solve them nu-merically. We also provide a comparison with other known methods for finding thehitting density of interest, and argue that our method has considerable advantagesand provides additional valuable insights.

1 Introduction

Computation of the first hitting time density of an Ornstein-Uhlenbeck process is a long-standing problem, which still remains open. An abstract approach applicable to thisproblem has been found by Fortet (1943); the Fortet’s equation can be viewed as avariant of the Einstein-Smoluchowski equation (Einstein (1905) and Von Smoluchowski(1906)). A general overview can be found in Borodin and Salminen (2012); Breiman(1967); Horowitz (1985). Attempts to find an analytical result have been made since 1998when Leblanc and Scaillet (1998) first derived an analytical formula which contained amistake. Two years later, Leblanc et al. (2000) published a correction on the paper;unfortunately, the correction was erroneous as well. Going-Jaeschke and Yor (2003)noticed that the authors had incorrectly used a spatial homogeneity property for thethree-dimensional Bessel bridge.

Alili et al. (2005), Linetsky (2004), and Ricciardi and Sato (1988) found represen-tations for the hitting density by using the Laplace transform. Alili et al. (2005) gaveseveral representations: a representation in the series of parabolic cylinder functions andits derivatives, an indefinite integral representation via special functions, and a Besselbridge representation. The first approach is based on inverting the Laplace transform,which is computed analytically. As a result, the authors got the series representation

∗Massachusetts Institute of Technology, Connection Science, Cambridge, MA, USA and Ecole Poly-technique Federale de Lausanne, Switzerland, E-mail: [email protected]†Mathematical Institute & Oxford-Man Institute, University of Oxford, UK, E-mail:

[email protected]‡The second author gratefully acknowledges support from the Economic and Social Research Council

and Bank of America Merrill Lynch

1

arX

iv:1

810.

0239

0v2

[q-

fin.

CP]

10

Oct

201

8

Page 2: On the First Hitting Time Density of an Ornstein-Uhlenbeck

involving parabolic cylinder functions and its derivatives. The second approach is basedon the cosine transform and its inverse. The authors got a representation via an indefiniteintegral involving some special functions and computed it using the trapezoidal rule. Thethird approach gives a representation of the density via an expectation of a function of thethree-dimensional Bessel bridge, which can be computed using the Monte Carlo method.Linetsky (2004) gave an analytical representation via relevant Sturm–Liouville eigenfunc-tion expansions. The coefficients were found as a solution of a nonlinear equation, whichinvolved nonlinear special (Hermite) functions.

Martin et al. (2015) solved a nonlinear Fokker–Planck equation with steady-statesolution by representing it as an infinite product rather than – as usual – an infinitesum. The PDE, which corresponds to the transition probability of Ornstein-Uhlenbeckprocess, belongs to the class of equations described in Martin et al. (2015). In principle,the results of the paper can be modified to the computation of first time hitting density.An advantage of this method is that it allows quantifying the errors; thereby controllingthe number of terms required to reach a given precision.

As we show later, under a suitable change of variables, the hitting problem of anOU process becomes the problem of hitting the square-root boundary of a Brownianmotion. Novikov (1971) and Shepp (1967) derived the density and moments expansionfor this problem; Novikov et al. (1999), Daniels (1996), and Potzelberger and Wang(2001) developed numerical methods for general curved boundaries. Hyer et al. (1999)and Avellaneda and Zhu (2001) analyzed the problem with curvilinear boundaries infinance.

The hitting density of an OU process has many applications in applied mathematics,especially in mathematical finance (Martin et al. (2015) for the design of trading strate-gies; Leblanc and Scaillet (1998) for pricing path-dependent options on yields; Jeanblancand Rutkowski (2000), Collin-Dufresne and Goldstein (2001), Coculescu et al. (2008), Yi(2010) for credit risk modeling; and Cheridito and Xu (2015) for CoCo bonds pricing).It has also applications in quantitative biology (Smith (1991)), where the hitting time isused for modeling the time between rings of a nerve cell.

The methods described above require substantial numerical computations, and forsome of them the convergence rate is unknown. Moreover, most of them are difficult toimplement; for example, Cheridito and Xu (2015) preferred the Crank–Nicolson methodto other known analytical methods, because it is easier to implement.

In this paper, we develop a fast semi-analytical method to compute the first timehitting density of an Ornstein-Uhlenbeck process, which is easy to implement. After anappropriate change of variables, the corresponding PDE becomes a heat equation witha moving boundary. We solve it using the method of heat potentials (Lipton (2001),Section 12.2.3, pp. 462–467). It leads to a Volterra equation of the second kind, whichwe solve numerically similar to Lipton et al. (2018). As a result, we got recursive formulasto compute the corresponding hitting density.

The rest of the paper is organized as follows: in Section 2 we formulate the problemand eliminate parameters using a change of variables; in Section 3 we solve the problemanalytically for a special case; in Section 4 we derive the solution in terms of a Volterraequation using the method of heat potentials; in Section 5 we consider a numerical solutionfor the corresponding Volterra equation as well as a solution as an approximation by anAbel equation; in Section 6 we show numerical illustrations and compare the methods;in Section 7 we conclude.

2

Page 3: On the First Hitting Time Density of an Ornstein-Uhlenbeck

2 Problem formulation and initial transformations

Consider a typical OU process

dXt = λ (θ −Xt) dt+ σdWt,

X0 = z.

We wish to calculate the stopping time s = inf {t : Xt ≤ b}, where z > b. We introducenew variables

t = λt, X =

√λ

σ(X − θ) , z =

√λ

σ(z − θ) , b =

√λ

σ(b− θ) ,

and rewrite the problem as follows

dXt = −Xtdt+ dWt,

X0 = z,

s = inf {t : Xt ≤ b} ,

where bars are omitted for brevity.In this formulation we consider the hitting from above problem. But, by symmetry,

one can also consider the hitting from below. It can be formulated as the hitting problemfrom above with the parameters z = −z and b = −b.

2.1 Forward problem

To calculate the density of the hitting time distribution g (t, z), we need to solve thefollowing forward problem

pt (t, x; z) = p (t, x; z) + xpx (t, x; z) +1

2pxx (t, x; z) ,

p (0, x; z) = δ (x− z) ,

p (t, b; z) = 0.

(1)

This distribution is given by

g (t, z) =1

2px (t, b; z) . (2)

2.2 Backward problem

Alternatively, we can solve the corresponding backward problem for the cumulative hit-ting probability G (t, z):

Gt (t, z) = −zGz (t, z) +1

2Gzz (t, z) ,

G (0, z) = 0,

G (t, b) = 1.

(3)

Then, the first hitting density is

g (t, z) = Gt (t, z) .

It is clear that problem (3) is easier to solve numerically than problem (1), whilst theiranalytical solutions are comparable in complexity.

3

Page 4: On the First Hitting Time Density of an Ornstein-Uhlenbeck

3 Special case b = 0

Before solving the general problem via the method of heat potentials, let us considera special case of b = 0. It is well known that Green’s function for the OU process inquestion has the form

H (t, x; 0, z) =exp

(− (etx− z)

2/

2η (t) + t)

√2πη (t)

,

where

η (t) =e2t − 1

2= et sinh (t) .

It is clear that for this case in question, the method of images works. Indeed, H (t, x; 0,−z)solves the equation in question, and so does the difference

H0 (t, x; 0, z) = H (t, x; 0, z)−H (t, x; 0,−z) .

It is easy to check thatH0 (0, x; 0, z) = δ (x− z) ,

and

H0 (t, 0; 0, z) =exp (− z2/ 2η (t) + t)√

2πη (t)− exp (− z2/ 2η (t) + t)√

2πη (t)= 0.

Hencep (t, x) = H0 (t, x; 0, z) .

The corresponding hitting time density q (t) is given by

q (t) =1

2px (t, 0)

=1

2

−et (etx− z)

η (t)

exp(− (etx− z)

2/

2η (t) + t)

√2πη (t)

+et (etx+ z)

η (t)

exp(− (etx+ z)

2/

2η (t) + t)

√2πη (t)

∣∣∣∣∣∣x=0

(4)

=etz

η (t)

exp (− z2/ 2η (t) + t)√2πη (t)

=z exp

(− e−tz2

2 sinh(t)+ t

2

)√

2π (sinh (t))3.

4 General case

4.1 Forward problem

Now, we consider the general case. We wish to transform IBVP (1) into the standardIBVP for a heat equation with a moving boundary. To this end, we introduce newindependent and dependent variables as follows:

q(τ , ξ) = e−tp(t, x), τ = η (t) , ξ = etx.

4

Page 5: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−10

−8

−6

−4

−2

0

2

4

6

8

10

τ

b(τ)

b = −3b = −1b = −0.5b = −0.1b = 0.0b = 0.1b = 0.5b = 1b = 3

Figure 1: Moving boundary b(τ) for (5)

Given that

∂t= (2τ + 1)

∂τ+ ξ

∂ξ,

x∂

∂x= x

√2τ + 1

∂ξ= ξ

∂ξ,

∂2

∂x2= (2τ + 1)

∂2

∂ξ2 ,

we get

qτ (τ , ξ) =1

2qξξ (τ , ξ) ,

q (0, ξ) = δ (ξ − z) ,

q (τ , b (τ)) = 0,

b (τ) =√

2τ + 1b.

(5)

It is clear that 0 ≤ τ <∞ and et =√

2τ + 1. We show the moving boundary for differentvalues of b in Figure 1.

IBVP (5) can be solved via the method of heat potentials (see Tikhonov and Samarskii(1963), pp. 530-535; Lipton (2001), Section 12.2.3, pp. 462-467 for details). As usual,we write

q (τ , ξ) = H (τ , ξ, 0, z) + q (τ , ξ) ,

where H (τ , ξ, 0, z) is the standard heat kernel, while q (τ , ξ) solves the IBVP of the form

qτ (τ , ξ) =1

2qξξ (τ , ξ) ,

q (0, ξ) = 0,

q (τ , b (τ)) = −H (τ , b (τ) , 0, z) .

5

Page 6: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Accordingly,

q (τ , ξ) =

∫ τ

0

(ξ − b (τ ′)) exp(− (ξ−b(τ ′))2

2(τ−τ ′)

)√

2π (τ − τ ′)3νf (τ ′) dτ ′,

where νf is the solution of the Volterra equation of the second kind,

νf (τ) +

∫ τ

0

(b (τ)− b (τ ′)) exp(− (b(τ)−b(τ ′))2

2(τ−τ ′)

)νf (τ ′)√

2π (τ − τ ′)3dτ ′ +

exp((− (b(τ)−z)2

))√

2πτ= 0. (6)

Now

b (τ)− b (τ ′)

τ − τ ′=b(√

2τ + 1−√

2τ ′ + 1)

τ − τ ′=

2b√2τ + 1 +

√2τ ′ + 1

,

so that (6) can be written in the form

νf (τ) +

√2

πb

∫ τ

0

exp

(−b2 (

√2τ+1−

√2τ ′+1)

(√

2τ+1+√

2τ ′+1)

)νf (τ ′)(√

2τ + 1 +√

2τ ′ + 1)√

τ − τ ′dτ ′ +

exp

(−(√

2τ+1b−z)2

)√

2πτ= 0. (7)

and is easy to solve numerically.Assuming that νf (τ) is found, we can proceed as follows:

p (t, x) =exp

(− (etx− z)

2/

(e2t − 1) + t)

√π (e2t − 1)

+ etq (τ , ξ) , (8)

Then, g(t) can be computed using (2) by differentiation of (8) and taking its limit at b.We do the necessary computations in Appendix A, and write the final formula below:

g (t) =1

2px (t, b) (9)

= −(etb− z) exp

(−(etb−z)

2

(e2t−1)+ 2t

)√π (e2t − 1)3

(etb+

e2t√π (e2t − 1)

)νf (t)

+e2t

√8π

∫ τ

0

(1− 2b2 (

√2τ+1−

√2τ ′+1)

(√

2τ+1+√

2τ ′+1)

)exp

(−b2 (

√2τ+1−

√2τ ′+1)

(√

2τ+1+√

2τ ′+1)

)νf (τ ′)− νf (τ)√

(τ − τ ′)3dτ ′.

We can rewrite (7) in an alternative way. Let θ =√

2τ + 1 − 1, θ′ =√

2τ ′ + 1 − 1,0 ≤ θ′ ≤ θ <∞. Then

νf (θ) +2b√π

∫ θ

0

exp(−b2 (θ−θ′)

(2+θ+θ′)

)(1 + θ′) νf (θ′)√

(2 + θ + θ′)3

(θ − θ′)dθ′ +

exp

(− ((1+θ)b−z)2

((1+θ)2−1)

)√π((1 + θ)2 − 1

) = 0. (10)

6

Page 7: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Symbolically,

νf (θ) +

∫ θ

0

Φfb (θ, θ

′)νf (θ′)√θ − θ′

dθ′ +

exp

(− ((1+θ)b−z)2

((1+θ)2−1)

)√π((1 + θ)2 − 1

) = 0,

where

Φfb (θ, θ

′) =2b√π

exp(−b2 (θ−θ′)

(2+θ+θ′)

)(1 + θ′)√

(2 + θ + θ′)3

.

Accordingly, (9) can be written in the form

g (t) = −(etb− z) exp

(−(etb−z)

2

(e2t−1)+ 2t

)√π (e2t − 1)3

(etb+

e2t√π (e2t − 1)

)νf (t)

+1√πe2t

∫ θ

0

((1− 2b2 (θ−θ′)

(2+θ+θ′)

)exp

(−b2 (θ−θ′)

(2+θ+θ′)

)νf (θ′)− νf (θ)

)(1 + θ′)√

(2 + θ + θ′)3

(θ − θ′)3dθ′.

4.2 Backward problem

4.2.1 General case

By the same token as before, we introduce

λ = $ (t) =1− e−2t

2= e−t sinh (t) , 0 ≤ λ <

1

2, µ = e−tz, (11)

notice that

∂t= (1− 2λ)

∂λ− µ ∂

∂µ,

z∂

∂z= z

√1− 2λ

∂µ= µ

∂µ,

∂2

∂z2= (1− 2λ)

∂2

∂µ2,

and rewrite IBVP (3) as follows

Gλ (λ, µ) =1

2Gµµ (λ, µ) ,

G (0, µ) = 0,

G (λ, b (λ)) = 1,

b (λ) =√

1− 2λb.

(12)

It is clear that 0 ≤ λ < 1/2, and e−t =√

1− 2λ. It is worth noting that for the backwardproblem the computational domain is compactified in the λ direction. We show themoving boundary for different values of b in Figure 2.

7

Page 8: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5−3

−2

−1

0

1

2

3

λ

b(λ)

b = −3

b = −1

b = −0.5

b = −0.1

b = 0.0b = 0.1

b = 0.5

b = 1

b = 3

Figure 2: Moving boundary b(λ) for (12)

Accordingly,

G (λ, µ) =

∫ λ

0

(µ− b (λ′)) exp(− (µ−b(λ′))2

2(λ−λ′)

)νb (λ′)√

2π (λ− λ′)3dλ′, (13)

g (λ, µ) =

((1− 2λ)

∂λ− µ ∂

∂µ

)∫ λ

0

(µ− b (λ′)) exp(− (µ−b(λ′))2

2(λ−λ′)

)√

2π (λ− λ′)3νb (λ′) dλ′ (14)

=(1− 2λ)

2

∫ λ

0

(−3 (λ− λ′) + (µ− b (λ′))

2)

(µ− b (λ′))

×exp

(− (µ−b(λ′))2

2(λ−λ′)

)√

2π (λ− λ′)7νb (λ′) dλ′

∫ λ

0

(− (λ− λ′) + (µ− b (λ′))

2) exp

(− (µ−b(λ′))2

2(λ−λ′)

)√

2π (λ− λ′)5νb (λ′) dλ′.

where νb is the solution of the Volterra equation of the second kind,

νb (λ) +

∫ λ

0

(b (λ)− b (λ′)) exp(− (b(λ)−b(λ′))2

2(λ−λ′)

)νb (λ′)√

2π (λ− λ′)3dλ′ − 1 = 0.

8

Page 9: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Since

b (λ)− b (λ′)

λ− λ′=b(√

1− 2λ−√

1− 2λ′)

λ− λ′= − 2b√

1− 2λ+√

1− 2λ′, (15)

so that (15) can be written in the form

νb (λ)−√

2

πb

∫ λ

0

exp

(−b2

(√1−2λ′−

√1−2λ

)(√

1−2λ′+√

1−2λ))νb (λ′)(√

1− 2λ′ +√

1− 2λ)√

λ− λ′dλ′ − 1 = 0. (16)

Once (16) is solved, g (λ, µ) and g (t, z) can be calculated by virtue of (13) and (11) in astraightforward fashion.

We can rewrite (16) in an alternative way. Let ϑ = 1−√

1− 2λ, ϑ′ = 1−√

1− 2λ′,0 ≤ ϑ′ ≤ ϑ < 1. Then

νb (ϑ)− 2b√π

∫ ϑ

0

exp(−b2 (ϑ−ϑ′)

(2−ϑ−ϑ′)

)(1− ϑ′) νb (ϑ′)√

(2− ϑ− ϑ′)3√ϑ− ϑ′

dϑ′ − 1 = 0. (17)

Symbolically,

νb (ϑ)−∫ ϑ

0

Φbb(ϑ, ϑ

′)νb (ϑ′)√ϑ− ϑ′

dϑ′ − 1 = 0,

where

Φbb(ϑ, ϑ

′) =2b√π

exp(−b2 (ϑ−ϑ′)

(2−ϑ−ϑ′)

)(1− ϑ′)√

(2− ϑ− ϑ′)3.

As one would expect,Φbb(θ, θ

′) = −iΦfib (−θ,−θ′) .

As a result, (13), (14) become

G (t, z) = 2

∫ ϑ

0

(z (1− ϑ)− b (1− ϑ′)) exp(− (z(1−ϑ)−b(1−ϑ′))2

(ϑ−ϑ′)(2−ϑ−ϑ′)

)(1− ϑ′) νb (ϑ′)√

π (ϑ− ϑ′)3(2− ϑ− ϑ′)3

dϑ′,

g (t, z) = 4e−2t

∫ ϑ

0

(−3 (ϑ− ϑ′) (2− ϑ− ϑ′) + (z (1− ϑ)− b (1− ϑ′))2

)× (z (1− ϑ)− b (1− ϑ′))

exp(− (z(1−ϑ)−b(1−ϑ′))2

(ϑ−ϑ′)(2−ϑ−ϑ′)

)(1− ϑ′) νb (ϑ′)√

π (ϑ− ϑ′)7(2− ϑ− ϑ′)7

dϑ′

+4e−tz

∫ ϑ

0

(− (ϑ− ϑ′) (2− ϑ− ϑ′) + (z (1− ϑ)− b (1− ϑ′))2

exp(− (z(1−ϑ)−b(1−ϑ′))2

(ϑ−ϑ′)(2−ϑ−ϑ′)

)(1− ϑ′) νb (ϑ′)√

π (ϑ− ϑ′)5(2− ϑ− ϑ′)5

dϑ′,

where ϑ = 1− e−t.

9

Page 10: On the First Hitting Time Density of an Ornstein-Uhlenbeck

4.2.2 Special case

When b = 0, we haveνb (λ) = 1,

G (λ, µ) = µ

∫ λ

0

exp(− µ2

2(λ−λ′)

)√

2π (λ− λ′)3dλ′

= µ

∫ λ

0

exp(− µ2

2λ′

)√

2πλ′3dλ′

= 2µ

∫ ∞1/√λ

exp(−µ2u2

2

)√

2πdu

= 2

∫ ∞µ/√λ

exp(−v2

2

)√

2πdv

= 2N

(− µ√

λ

).

Thus,

g (λ, µ) =

((1− 2λ)

∂λ− µ ∂

∂µ

)G (λ, µ)

= 2

((1− 2λ)

µ

2√λ3

+µ√λ

) exp(−µ2

)√

=µ√λ3

(1− 2λ+ 2λ)exp

(−µ2

)√

=µ√λ3

exp(−µ2

)√

2π,

g (t, z) =z exp

(− e−tz2

2 sinh(t)+ t

2

)√

2π (sinh (t))3.

Alternatively,

G (t, z) = 2N

(− e−t/2z√

sinh (t)

), (18)

10

Page 11: On the First Hitting Time Density of an Ornstein-Uhlenbeck

and

g (t, z) = Gt (t, z)

= 2

e−t/2z

2√

sinh (t)+

cosh (t) e−t/2z

2√

(sinh (t))3

exp(− e−tz2

2 sinh(t)

)√

=e−t/2z (sinh (t) + cosh (t))√

(sinh (t))3

exp(− e−tz2

2 sinh(t)

)√

=z exp

(− e−tz2

2 sinh(t)+ t

2

)√

2π (sinh (t))3,

as before.

5 Numerical solution

In this section, we show how to solve the Volterra equations (10) and (17) numerically,and also derive an analytical approximation for small values of t.

5.1 Numerical method

In this section, we briefly discuss two methods to solve the corresponding Volterra equa-tions (10) and (17). We start with a simple trapezoidal method, and then consider a moreadvanced method based on a quadratic interpolation, which gives a better convergencerate. Both methods can be found in Linz (1985) (Section 8.2 and Section 8.4).

In this section we solve

f(t) = g(t) +

∫ t

0

K(t, s)√t− s

f(s) ds, (19)

where K(t, s) is a non-singular part of the kernel.Both (10) and (17) can be formulated as (19) with an appropriate choice of K(t, s)

and g(t).For the forward equation we take (in (θ, θ′) variables)

g(θ) = −exp

(− ((1+θ)b−z)2

((1+θ)2−1)

)√π((1 + θ)2 − 1

) , K(θ, θ′) = − 2b√π

exp(−b2 (θ−θ′)

(2+θ+θ′)

)(1 + θ′)√

(2 + θ + θ′)3

,

and for the backward equation we take (in (ϑ, ϑ′) variables)

g(ϑ) = 1, K(ϑ, ϑ′) =2b√π

exp(−b2 (ϑ−ϑ′)

(2−ϑ−ϑ′)

)(1− ϑ′)√

(2− ϑ− ϑ′)3.

11

Page 12: On the First Hitting Time Density of an Ornstein-Uhlenbeck

5.1.1 Simple trapezoidal method

Consider the integral in (19) separately∫ t

0

K(t, s)ν (s)√t− s

ds = −2

∫ t

0

K(t, s)ν (s) d√t− s. (20)

We consider a grid 0 = t0 < t1 < . . . < tN = T , and denote Fk for the approximatedvalue of f(tk) and ∆k,l = tk − tl. Then, by trapezoidal rule of the Stieltjes integral (20),(19) can be approximated as

Fk = g(tk) +k∑i=1

(K(tk, ti)Fi +K(tk, ti−1)Fi−1)(√

∆k,i−1 −√

∆k,i

)= 0.

From the last equation we can express Fk

Fk =(

1−K(tk, tk)√

∆k,k−1

)−1

×

(g(tk) +K(tk, 0)

(√∆k,0 −

√∆k,1

)+

k−1∑i=1

K(tk, ti)(√

∆k,i−1 −√

∆k,i+1

)Fi

).

Taking F0 = g(0), we can recursively compute Fm using the previous values F0, . . . , Fm−1.The approximation error of the integrals is of orderO(∆2), where ∆ = maxk,i

√∆k,i−1−√

∆k,i+1 is the step size. Hence, on the uniform grid ti = i∆, the convergence rate is oforder O(h).

5.1.2 Block-by-block method based on quadratic interpolation

Now we consider a block-by-block method based on quadratic interpolation from Linz(1985) (Section 8.4).

Using piece-wise quadratic interpolation, Linz (1985) derived

F2m+1 = g(t2m+1) + (1− δm0)2m∑i=0

w2m+1,iK(t2m+1, ti)Fi

+ α

(t2m+1, t2m,

h

2

)K(t2m+1, t2m)F2m

+ β

(t2m+1, t2m,

h

2

)K(t2m+1, t2m+1/2)

(3

8F2m +

3

4F2m+1 −

1

8F2m+2

)+ γ

(t2m+1, t2m,

h

2

)K(t2m+1, t2m+1)F2m+1,

(21)and

F2m+2 = g(t2m+2) + (1− δm0)2m∑i=0

w2m+2,iK(t2m+2, ti)Fi

+ α (t2m+2, t2m, h)K(t2m+2, t2m)F2m

+ β (t2m+2, t2m, h)K(t2m+2, t2m+1)F2m+1

+ γ (t2m+2, t2m, h)K(t2m+2, t2m+2)F2m+2,

(22)

12

Page 13: On the First Hitting Time Density of an Ornstein-Uhlenbeck

where

wn,i = (1− δi,n−1)α(tn, ti, h) + (1− δi,0)γ(tn, ti − 2h, h), i is even,

wn,i = β(tn, ti − h, h), i is odd,

and δij is a Kronecker delta.The functions α, β, and γ are defined by

α(x, y, z) =z

2

∫ 2

0

(1− s)(2− s)√x− y − sz

ds,

β(x, y, z) = z

∫ 2

0

s(2− s)√x− y − sz

ds,

γ(x, y, z) =z

2

∫ 2

0

s(s− 1)√x− y − sz

ds.

We note that α, β, and γ depend only on x − y, z, and can be written as a function oftwo variables. Moreover, these integrals can be computed analytically.

Then, one can find [F2m+1, F2m+2] by solving the system of two linear equations (21)and (22). We present the numerical algorithm in Algorithm 1.

Algorithm 1 Block-by-block method based on quadratic interpolation

Require: N — number of time steps: 0 = t0 < t1 < t2 < . . . < tN = T1: F0 = f(0)2: for m = 0 : N/2 do3: Compute w2m+1,i for i = 0, . . . , 2m4: Compute w2m+2,i for i = 0, . . . , 2m5: Get [F2m+1, F2m+2] by solving (21) and (22)6: end for

Under some assumptions on regularity, the convergence rate of this method is 3.5.In our case, for the backward equation, these assumptions are not satisfied, and weempirically confirm the convergence of order 1.5.

5.2 Approximation by an Abel integral equation

For small values of θ, (7) can be approximated by an Abel integral equation of the secondkind.

νf (θ) +b√2π

∫ θ

0

1√θ − θ′

νf (θ′) dθ′ +exp

(− (b−z)2

)√

2πθ= 0. (23)

The last equation is an Abel equation of the second kind and can be solved analyticallyusing direct and inverse Laplace transforms (Abramowitz and Stegun (1964)).

The Laplace transform yields

νf (Λ) + bνf (Λ)√

2Λ+e−√

2Λ(z−b)√

2Λ= 0.

Then, νf (Λ) can be expressed as

νf (Λ) = −e−√

2Λ(z−b)√

2Λ + b

13

Page 14: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Taking inverse Laplace transform, we get the final expression for νf (θ)

νf (θ) = beb2

2θ+b(z−b)N

(−bθ + z − b√

θ

)−

exp(− (b−z)2

)√

2πθ, (24)

where N(x) is the CDF of the standard normal distribution.Now consider the backward equation. For small values of ϑ, (17) can be approximated

by

νb(ϑ)− b√2π

∫ ϑ

0

1√ϑ− ϑ′

νb(ϑ′) dϑ′ − 1 = 0. (25)

Similar to the forward equation, we solve it by taking direct and inverse Laplace trans-forms. The direct Laplace transform yields

νb(Λ)− b νb(Λ)√2Λ− 1

Λ= 0.

Hence,

νb(Λ) =1√

Λ(√

Λ− b/√

2).

Taking the inverse Laplace transform, we get

νb(ϑ) = 2eb2ϑ2 N(b

√ϑ). (26)

Alternatively, one can find an analytical solution using the following results (Polyaninand Manzhirov (1998)). The solution of Abel equation

y(t) + ξ

∫ t

0

y(s)ds√t− s

= f(t).

has the form

y(t) = F (t) + πξ2

∫ t

0

exp[πξ2(t− s)]F (s) ds,

where

F (t) = f(t)− ξ∫ t

0

f(s) ds√t− s

.

6 Numerical examples

6.1 Numerical tests

Consider T = 2 and z = 2. In Figure 3 we examine the density and cumulative densityfunctions for different values of b and compare them with the analytical solution (4) forb = 0. In Figure 4 we show G(t, z) as a function of both t and z for b = 1. In Figure 5we present νf (τ) and in Figure 6 we present νb(ϑ) for various values of b.

To test how good the Abel equation approximates the corresponding Volterra equa-tion, we plot them together for small values of t. In Figure 7 we compare the correspondingforward equations and in Figure 8 we compare the corresponding backward equations.We can see that up to t = 0.02 the solutions are visually indistinguishable.

14

Page 15: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

t

g(t)

b = 1 − forwardb = 1 − backwardb = 0 − forwardb = 0 − backwardb = 0 − analyticalb = −1 − forwardb = −1 − backward

(a)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

t

G(t

)

b = 1 − forward

b = 1 − backward

b = 0 − forward

b = 0 − backward

b = 0 − analytical

b = −1 − forward

b = −1 − backward

(b)

Figure 3: (a) Density function g(t) (b) Cumulative density function G(t).

Figure 4: G(t, z) as a function of both t and z for b = 1.

(a)

0 5 10 15 20 25−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

τ

ν(τ)

b = −1

b = −0.5

b = 0

b = 0.5

b = 1

(b)

Figure 5: νf (θ), the solution of (10) with z = 2 (a) as a function of θ and b (b) as afunction of θ for different values of b.

15

Page 16: On the First Hitting Time Density of an Ornstein-Uhlenbeck

(a)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.90

1

2

3

4

5

6

7

8

9

θ

ν(θ)

b = −1

b = −0.5

b = 0b = 0.5

b = 1

(b)

Figure 6: νb(ϑ), the solution of (17) (a) as a function of ϑ and b (b) as a function of ϑfor different values of b.

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

t

ν(t)

Volterra equationAbel equation

(a)

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1−0.45

−0.4

−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

t

ν(t)

Volterra equationAbel equation

(b)

Figure 7: Comparison between the approximation by the Abel equation and the numericalsolution of the forward equation νf (t) in t-coordinates (a) b = −0.5, z = −0.25 (b)b = 0.5, z = 1.

16

Page 17: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10.88

0.9

0.92

0.94

0.96

0.98

1

t

ν(t)

Volterra equationAbel equation

(a)

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.11

1.05

1.1

1.15

t

ν(t)

Volterra equation

Abel equation

(b)

Figure 8: Comparison between the approximation by the Abel equation and the numericalsolution of the backward equation νb(t) in t-coordinates (a) b = −0.5 (b) b = 0.5.

We also empirically test the convergence rate of our numerical method by implement-ing it for the forward and backward Abel equations (23) and (25) and comparing themwith the analytical solutions (24) and (26). In Figure 9a we get the order of convergence3.2 for the quadratic interpolation method and order 1 for the trapezoidal method for theforward equation. It confirms our estimate in Section 5.1. In Figure 9b we get the order1.5 for the quadratic interpolation method and the order 1 for the trapezoidal methodfor the backward equation. The convergence order of the quadratic interpolation methodfor the backward equation is smaller than the theoretical estimate, because the assump-tions on the regularity of the solution are not satisfied. Potentially, a non-uniform gridimproves the convergence order.

6.2 Comparison with other methods

6.2.1 Description of other methods

We compare our method with other available alternatives.

1. Leblanc et al. (2000) method. We used (3) in Leblanc et al. (2000) to compute thehitting density. In our notation it is

g(t) =(z − b) exp

(z2−b2+t−(z−b)2 coth t

2

)√

2π (sinh (t))3

=(z − b) exp

(b(z − b)− e−t(z−b)2

2 sinh(t)+ t

2

)√

2π (sinh (t))3.

Integrating g(t), we get

G(t) = 2eb(z−b)N

(−(z − b)e−t/2√

sinh t

).

17

Page 18: On the First Hitting Time Density of an Ornstein-Uhlenbeck

101

102

103

10−9

10−8

10−7

10−6

10−5

10−4

10−3

10−2

N

err

Quadrati c inte rpol at i on

C 1N− 3 . 2

Trapezoidal method

C 2N− 1

(a)

101

102

103

10−7

10−6

10−5

10−4

10−3

N

err

Quadrati c inte rpol at i on

C 1N− 1 . 5

Trapezoidal method

C 2N− 1

(b)

Figure 9: Empirical estimation of the numerical methods from Section 5.1: (a) forwardequation, (b) backward equation.

2. Alili et al. (2005), Linetsky (2004), and Ricciardi and Sato (1988) method. Themethod is based on the inversion of the Laplace transform of the hitting density.In our notation, the Laplace transform u(Λ) has the form

u(Λ) = ez2−b2

2D−Λ(z

√2)

D−Λ(b√

2), (27)

where Dν(x) is the parabolic cylinder function.

Alili et al. (2005) found a representation of the inverse Laplace transform as a seriesof parabolic cylinder function and its derivatives

g(t) = e(z2−b2)/2

∞∑j=1

Dνj,b√2(z√

2)

D′νj,b√2(b√

2)exp

(νj,b√

2

),

where D′ν(x) = ∂D∂ν

(x) and νj,b the ordered sequence of positive zeros of ν → Dν(x).

However, we used Gaver-Stehfest algorithm (Abate et al. (2000)) for the inversion,as it gives more stable and robust results. Moreover, the representation from Aliliet al. (2005) works only for t > t0 for some t0, while Gaver-Stehfest algorithm worksfor all positive t.

Using this method, the density can be expressed as

g(t) ≈ ln 2

t

2m∑k=1

ωku

(k ln 2

t

),

where

ωk = (−1)m+k

min(k,m)∑j=b(k+1)/2c

jm+1

mCjmC

j2jC

jk−j.

As we can see, the method only requires the values of u on the positive real semi-axis, and from (27) one can observe that u(Λ) is non-singular on R+. As an example,in Figure 10, we plot u(Λ) for Λ > 0 with z = 2 and various values of b.

18

Page 19: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Λ

u(Λ

)

b = 1b = 0b = −1

Figure 10: Laplace transform u(Λ) for z = 2.

As an example of using Gaver-Stehfest algorithm in finance, one can refer to Liptonand Sepp (2011), where the authors used it for the calibration of a local volatilitysurface.

3. Crank–Nicolson method. We solved (3) using Crank–Nicolson numerical scheme(Duffy (2013)).

6.2.2 Comparison

We start with a comparison with Leblanc et al. (2000) method to show that it gives wrongresults. In Figure 11 we compare two methods for different parameters. We also give theanalytical solution, when it is available for b = 0. We can observe that only for b = 0 theLeblanc et al. (2000) method gives correct results, while for other parameters it totallydiffers from our method. Moreover in Figure 11c we can see that it gives G(t) > 1.

A closed-form solution is only available when b = 0 and is given by (4). We take otherparameters as before T = 2 and z = 2. We compare our method (forward and backward),the Crank-Nicolson method, and the method based on the inversion of the Laplace trans-form in Figure 12 and Figure 13. We note that our method has an advantage for thiscase, because Volterra equations (7) and (17) become trivial for b = 0. Nevertheless, thecomparison is still very useful.

We take N = 500 for both forward and backward methods, h = k = 0.005 for theCrank-Nicolson method, and m = 24 for the Gaver-Stehfest algorithm. We used mpmath

library in Python (Johansson et al. (2013)) for the implementation of the Gaver-Stehfestalgorithm and parabolic cylinder functions with arbitrary precision arithmetics. In ourcomputations we used 100 digits precision.

From these graphs we observe that the methods developed in this paper and themethod based on the inversion of the Laplace transform (Alili et al. (2005)) significantlyoutperform the Crank-Nicolson scheme.

In order to compare the solutions for non-trivial parameters, we take the Laplacetransform method with a maximum possible precision, and our method for N = 100 andN = 10000. The first example shows how our results can be comparable to the Laplace

19

Page 20: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−0.02

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

t

G(t

)

Heat potentials method

Leblanc&Scaillet method

(a)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

t

G(t

)

Heat potentials method

Leblanc&Scaillet method

Analytical solution

(b)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.5

1

1.5

2

2.5

t

G(t

)

Heat potentials method

Leblanc&Scaillet method

(c)

Figure 11: Comparison with Leblanc et al. (2000) method: (a) z = 2, b = −1, (b)z = 2, b = 0, (c) z = 2, b = −1.

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−10

−5

0

5x 10

−8

t

diff

(a)

0 0.5 1 1.5 2 2.5−2

−1

0

1

2

3

4

5

6

7x 10

−10

t

diff

(b)

Figure 12: The difference between numerical and analytical solutions for b = 0 (a) For-ward method (b) Backward method.

20

Page 21: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−1.5

−1

−0.5

0

0.5

1x 10

−3

t

diff

(a)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−4

−3

−2

−1

0

1

2

3

4x 10

−11

t

diff

(b)

Figure 13: The difference between numerical and analytical solutions (a) Crank-Nicolsonmethod (b) Laplace transform method.

transform method for a relatively small value of N , when the computations can be donevery fast; the second example demonstrates that our method can obtain a very goodprecision for a large N . The results are presented in Figure 14.

6.3 Asymptotic behavior when t→∞It is clear that for b = 0, and hence all b ≥ 0, G(t, z)→ 1, when t→∞. One can easilyverify it by taking the limit in (18). But it is unclear what happens for a negative b.We empirically investigate it by plotting G(t, z) as a function of b for a fixed large valueof T and fixed z. In Figure 15a we take z = 2 and T = 500 and compute G(T, z) forb ∈ [−5, 2]. We can see that it still remains close to 1 up to b = −2, and then rapidlyapproaches zero. In further research we want to explore the asymptotic behavior of G(t)in more details. In Figure 15b we show the expected hitting time; this quantity is veryimportant for the design of mean-reverting trading strategies since it allows a trader todecide when to go in and out of the trade.

7 Conclusion

We developed a semi-analytical approach to finding the first time hitting density of anOrnstein-Uhlenbeck process. We transformed our problem to a free-boundary value prob-lem; using the method of heat potentials, we derived the corresponding expression forthe density via a weight function, which is a solution of a Volterra equation of the secondkind. For small values of t we solved this equation analytically by using Abel equation ap-proximation, while for t which are not small, we developed a numerical recursive scheme.We showed the third order of convergence for the forward scheme and the order 1.5 forthe backward scheme and confirmed it numerically.

We compared our method to several other methods known in the literature. Weshowed that our method significantly outperforms the Crank-Nicolson scheme and is atleast as good as the Laplace transform method and is markedly more stable.

21

Page 22: On the First Hitting Time Density of an Ornstein-Uhlenbeck

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−7

−6

−5

−4

−3

−2

−1

0

1x 10

−5

t

diff

(a)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−16

−14

−12

−10

−8

−6

−4

−2

0

2

4x 10

−7

t

diff

(b)

Figure 14: The difference between our method and the Laplace transform method (a)N = 100 (b) N = 10000.

−5 −4 −3 −2 −1 0 1 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

b

G(5

00, 2

))

(a)

−1

0

1

2

3

−1−0.500.511.522.53

0

1

2

3

4

5

6

7

z

b

T(z

, b)

(b)

Figure 15: (a) G(T, z) as a function of b with T = 500 and z = 2 (b) T (z, b) = E[s],where s is the hitting time.

22

Page 23: On the First Hitting Time Density of an Ornstein-Uhlenbeck

As we pointed out, the problem has many practical applications, especially for con-struction of mean-reverting trading strategies. Using the surface Figure 15b, one canestimate the expected time for the reversion to the mean, and construct either a long ora short strategy.

This paper leaves several important questions open as to the asymptotic behavior ofthe hitting time density, which we are going to address in further research.

23

Page 24: On the First Hitting Time Density of an Ornstein-Uhlenbeck

A Derivation of (9)

g (t) =1

2px (t, b) =

1

2limx→b

px(t, x) =

= −(etb− z) exp

(−(etb−z)

2

(e2t−1)+ 2t

)√π (e2t − 1)3

+1

2e2t lim

ε→0

∂ε

∫ τ

0

(ε+ b (τ)− b (τ ′)) exp(− (ε+b(τ)−b(τ ′))2

2(τ−τ ′)

)√

2π (τ − τ ′)3ν (τ ′) dτ ′

= −(etb− z) exp

(−(etb−z)

2

(e2t−1)+ 2t

)√π (e2t − 1)3

+1

2e2t lim

ε→0

∫ τ

0

(1− (ε+ b (τ)− b (τ ′))2

(τ − τ ′)

)exp

(− (ε+b(τ)−b(τ ′))2

2(τ−τ ′)

)√

2π (τ − τ ′)3ν (τ ′) dτ ′.

We compute the limit in the second term separately

limε→0

∫ τ

0

(1− (ε+ b (τ)− b (τ ′))2

(τ − τ ′)

)exp

(− (ε+b(τ)−b(τ ′))2

2(τ−τ ′)

)√

2π (τ − τ ′)3ν (τ ′) dτ ′

= limε→0

∫ τ

0

(1− ε2

τ − τ ′− 2

ε(b(τ)− b(τ ′))τ − τ ′

− (b(τ)− b(τ ′2

τ − τ ′

)

×exp

(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)Ξ(τ , τ ′)√

2π (τ − τ ′)3ν (τ ′) dτ ′

= L1 + L2 − 2L3 − L4,

where

L1 = ν(τ) limε→0

∫ τ

0

(1− ε2

τ − τ ′

) exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)√

2π (τ − τ ′)3dτ ′,

L2 = limε→0

∫ τ

0

(1− ε2

τ − τ ′

) exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)(Ξ(τ , τ ′)ν(τ ′)− ν(τ))√

2π (τ − τ ′)3dτ ′,

L3 = limε→0

∫ τ

0

ε(b(τ)− b(τ ′))τ − τ ′

exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)Ξ(τ , τ ′)√

2π (τ − τ ′)3ν (τ ′) dτ ′

L4 = limε→0

∫ τ

0

(b(τ)− b(τ ′2

τ − τ ′exp

(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)Ξ(τ , τ ′)√

2π (τ − τ ′)3ν (τ ′) dτ ′,

24

Page 25: On the First Hitting Time Density of an Ornstein-Uhlenbeck

and

Ξ(τ , τ ′) = exp

(−(b (τ)− b (τ ′))2

2 (τ − τ ′).

)We have

L1 = ν(τ)limε→0

∫ τ

0

(1− ε2

(τ − τ ′)

) exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)√

2π (τ − τ ′)3dτ ′

= ν (τ) limε→0

1

ε

∫ τ/ε2

0

(1− 1

u

)exp

(− 1

2u

)√

2πu3du

= 2ν (τ) limε→0

1

ε

∫ ∞ε/√τ

(1− v2

) exp(−v2

2

)√

2πdv

= −2ν (τ) limε→0

1

ε

∫ ε/√τ

0

(1− v2

) exp(−v2

2

)√

2πdv

= − 2√2πτ

ν (τ) = − 2√π(e2t − 1)

ν(t),

where (τ − τ ′) = u, u = 1/v2 and we have used the fact that∫ ∞0

(1− v2

) exp(−v2

2

)√

2πdv = 0.

Further,

L2 = limε→0

∫ τ

0

(1− ε2

τ − τ ′

) exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)(Ξ(τ , τ ′)ν(τ ′)− ν(τ))√

2π (τ − τ ′)3dτ ′

= limε→0

∫ τ

0

exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)(Ξ(τ , τ ′)ν(τ ′)− ν(τ))√

2π (τ − τ ′)3dτ ′

=

∫ τ

0

(Ξ(τ , τ ′)ν(τ ′)− ν(τ))√2π (τ − τ ′)3

dτ ′

where we have dropped the higher order ε2 term in the integral in the second line. L3 iscomputed as in Tikhonov and Samarskii (1963), pp. 530-535

L3 = limε→0

∫ τ

0

ε(b(τ)− b(τ ′))τ − τ ′

exp(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)Ξ(τ , τ ′)√

2π (τ − τ ′)3ν (τ ′) dτ ′

= b′(τ)Ξ (τ , τ) ν (τ) = be−tν(t),

and

L4 = limε→0

∫ τ

0

(b(τ)− b(τ ′))2

τ − τ ′exp

(− ε2

2(τ−τ ′) + ε(b(τ)−b(τ ′))τ−τ ′

)Ξ(τ , τ ′)√

2π (τ − τ ′)3ν (τ ′) dτ ′

=

∫ τ

0

(b(τ)− b(τ ′)τ − τ ′

)2Ξ (τ , τ ′)√2π (τ − τ ′)

ν (τ ′) dτ ′.

25

Page 26: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Combining all terms, we finally have

g(t) = −(etb− z) exp

(−(etb−z)

2

(e2t−1)+ 2t

)√π (e2t − 1)3

(etb+

e2t√π (e2t − 1)

)ν (t)

+1

2e2t

∫ τ

0

(1− 2b2 (

√2τ+1−

√2τ ′+1)

(√

2τ+1+√

2τ ′+1)

)exp

(−b2 (

√2τ+1−

√2τ ′+1)

(√

2τ+1+√

2τ ′+1)

)ν (τ ′)− ν (τ)√

2π (τ − τ ′)3dτ ′.

References

Abate, J., Choudhury, G. L., and Whitt, W. (2000). An introduction to numerical trans-form inversion and its application to probability models. In Computational probability,pages 257–323. Springer.

Abramowitz, M. and Stegun, I. A. (1964). Handbook of mathematical functions: withformulas, graphs, and mathematical tables, volume 55. Courier Corporation.

Alili, L., Patie, P., and Pedersen, J. L. (2005). Representations of the first hitting timedensity of an Ornstein-Uhlenbeck process. Stochastic Models, 21(4):967–980.

Avellaneda, M. and Zhu, J. (2001). Distance to default. Risk, 14(12):125–129.

Borodin, A. N. and Salminen, P. (2012). Handbook of Brownian motion-facts and formu-lae. Birkhauser.

Breiman, L. (1967). First exit times from a square root boundary. In Fifth BerkeleySymposium, volume 2, pages 9–16.

Cheridito, P. and Xu, Z. (2015). Pricing and hedging CoCos. Available at SSRN:https://ssrn.com/abstract=2201364.

Coculescu, D., Geman, H., and Jeanblanc, M. (2008). Valuation of default-sensitiveclaims under imperfect information. Finance and Stochastics, 12(2):195–218.

Collin-Dufresne, P. and Goldstein, R. S. (2001). Do credit spreads reflect stationaryleverage ratios? The Journal of Finance, 56(5):1929–1957.

Daniels, H. E. (1996). Approximating the first crossing-time density for a curved bound-ary. Bernoulli, pages 133–143.

Duffy, D. J. (2013). Finite Difference methods in financial engineering: a Partial Differ-ential Equation approach. John Wiley & Sons.

Einstein, A. (1905). Uber die von der molekularkinetischen theorie der warme gefordertebewegung von in ruhenden flussigkeiten suspendierten teilchen. Annalen der physik,322(8):549–560.

Fortet, R. (1943). Les fonctions altatoires du type de markoff associees a certaines equa-tions linlaires aux dfrivees partielles du type parabolique. J. Math. Pures Appl., 22:177–243.

26

Page 27: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Going-Jaeschke, A. and Yor, M. (2003). A clarification note about hitting times densitiesfor Ornstein-Uhlenbeck processes. Finance and Stochastics, 7(3):413–415.

Horowitz, J. (1985). Measure-valued random processes. Zeitschrift fur Wahrschein-lichkeitstheorie und Verwandte Gebiete, 70(2):213–236.

Hyer, T., Lipton, A., Pugachevsky, D., and Qui, S. (1999). A hidden-variable model forrisky bonds. Bankers Trust working paper.

Jeanblanc, M. and Rutkowski, M. (2000). Modelling of default risk: an overview. Math-ematical finance: theory and practice, pages 171–269.

Johansson, F. et al. (2013). mpmath: a Python library for arbitrary-precision floating-point arithmetic (version 0.18). http://mpmath.org/.

Leblanc, B., Renault, O., and Scaillet, O. (2000). A correction note on the first pas-sage time of an Ornstein-Uhlenbeck process to a boundary. Finance and Stochastics,4(1):109–111.

Leblanc, B. and Scaillet, O. (1998). Path dependent options on yields in the affine termstructure model. Finance and Stochastics, 2(4):349–367.

Linetsky, V. (2004). Computing hitting time densities for cir and ou diffusions: Applica-tions to mean-reverting models. Journal of Computational Finance, 7:1–22.

Linz, P. (1985). Analytical and Numerical Methods for Volterra Equations. SIAM.

Lipton, A. (2001). Mathematical Methods For Foreign Exchange: A Financial Engineer’sApproach. World Scientific.

Lipton, A., Kaushansky, V., and Reisinger, C. (2018). Semi-analytical solution of aMcKean-Vlasov equation with feedback through hitting a boundary. arXiv preprintarXiv:1808.05311.

Lipton, A. and Sepp, A. (2011). Filling the gaps. Risk Magazine, pages 66–71.

Martin, R., Craster, R., and Kearney, M. (2015). Infinite product expansionof the Fokker–Planck equation with steady-state solution. Proc. R. Soc. A,471(2179):20150084.

Novikov, A., Frishling, V., and Kordzakhia, N. (1999). Approximations of boundary cross-ing probabilities for a Brownian motion. Journal of Applied Probability, 36(4):1019–1030.

Novikov, A. A. (1971). On stopping times for a Wiener process. Theory of Probability &Its Applications, 16(3):449–456.

Polyanin, A. D. and Manzhirov, A. V. (1998). Handbook of integral equations. CRC press.

Potzelberger, K. and Wang, L. (2001). Boundary crossing probability for Brownianmotion. Journal of Applied Probability, 38(01):152–164.

Ricciardi, L. M. and Sato, S. (1988). First-passage-time density and moments of theornstein-uhlenbeck process. Journal of Applied Probability, 25(1):43–57.

27

Page 28: On the First Hitting Time Density of an Ornstein-Uhlenbeck

Shepp, L. A. (1967). A first passage problem for the Wiener process. The Annals ofMathematical Statistics, 38(6):1912–1914.

Smith, C. E. (1991). A Laguerre series approximation for the probability density of thefirst passage time of the Ornstein–Uhlenbeck process. In Noise in Physical Systemsand 1/f Fluctuations. Tokyo: Ohmsha.

Tikhonov, A. N. and Samarskii, A. A. (1963). Equations of Mathematical Physics. DoverPublications, New York. English translation.

Von Smoluchowski, M. (1906). Zur kinetischen theorie der brownschen molekularbewe-gung und der suspensionen. Annalen der physik, 326(14):756–780.

Yi, C. (2010). On the first passage time distribution of an Ornstein–Uhlenbeck process.Quantitative Finance, 10(9):957–960.

28