You are on page 1of 71

First Passage Time Problems

Rajarshi Sarkar
University of Nice and Sophia Antipolis and INRIA - Team Tosca

August 2012

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

1 / 71

Overview of the presentation

We know very little about the first-passage behaviour except in some simple
cases like standard Wiener process,Wiener process with drift.
Here we look into three kinds of approaches
1. Euler scheme with the Brownian bridge idea
2.The probabilistic dichotomic Fast Algorithm for Gauss-Markov processes
given by Taillefumier and Magnasco
3. Exact Simulation of a diffusion process
Also, we look into the problem of pricing a barrier option, a financial
instrument dependent on the approximation of the first-passage time for the
price of the underlying asset.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

2 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

3 / 71

Introduction
dXt = (Xt , t)dt + (Xt , t)dWt

with

X0 = x0

We seek to simulate or find a random event of the form,


= inf{t > 0; Xt > L}
where, L is the boundary, which can be a constant or some continuous
deterministic function.
First passage time or first hitting time or stopping time problems have been
the center of attraction for many years now. It has useful application in
biology,physics,finance, to name a few.
Despite the importance and varied applications of first-passage times,its only
in very few situations that we explicitly know the law for them.
In the case of a standard Brownian motion and a Brownian Motion with drift
we know the analytic solution for the first-passage time.
We look at Gauss-Markov process mainly except for the exact simulation.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

4 / 71

Notations

Brownian motion or a Wiener process = B(.) and W (.)


Probability measure = P, Q, Z
Sample Space =
Filtration associated to the Brownian motion or the process concerned = F(.)
Boundary or the barrier = L
(.)

First-Passage time = or (.) .

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

5 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

6 / 71

Standard Brownian Motion


B = {B(t), Ft ; 0 t T } is our standard Brownian motion(Wiener process) on
some probability space (, F, P).
We look for the law of the first-passage time defined as a = inf{t > 0; B(t) a}
in a closed interval [0,T].
We use the Reflection Principle to get the density function for this
first-passage time.

Reflection Principle
With a constant boundary L = a, we get ,
d = B(t) if
B(t)

t < a

d = 2B(a ) B(t) = 2a B(t) if


B(t)

t a

d is a Brownian motion with the same law as the original B(t)


Then B(t)

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

7 / 71

Standard Brownian Motion

First-Passage Time Density


Thus, by the application of the Reflection
we get the probability density

 Principle
a
a2
function of a (t) as fa (t) = 3 exp 2t
t2

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

8 / 71

Brownian Motion with Drift


W b = {W (t)b = B(t) bt, Ft ; 0 t T } be a Brownian motion with a drift
term bt. Let this process be defined over the same probability space (, F, P).
Now, as before we are interested in the first-passage time,
ab = inf{t > 0; W (t)b = B(t) bt a}

Bachelier - Levy Formula


The density of the first-passage time for such a Brownian motion can also be
viewed as the first-passage time for a standard Brownian motion over an affine
boundary of the form a + bt as
ab = inf{t > 0; B(t) a + bt}
Thus, we have the very well known formula for the density for such a first-passage
time known as the Bachelier - Levy formula.


(a + bt)2
a
fab (t) = 3 exp
2t
t 2 2

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

9 / 71

Brownian Bridge

Now, we look into the law of the first-passage time in the case of a Brownian
bridge.

Law of the First-Passage time for a Brownian bridge


For every 0 tx tz 1 and for reals x , z, L with x , z < L, considering the first
passage time as, tx = inf{t > tx |Bt > L}. Then conditioning to Btx = x and
Btz = z, we get,


2(L x )(L z)
P(tx < tz |Btx = x , Btz = z) = exp
tz tx

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

10 / 71

Proof:
We know that Bt is a Gaussian random variable N (0, t). We first introduce the
maximum of the process between time tx and tz . as;
Mtx ,tz = suptx ttz Bt
P(tx < tz |Btx = x , Btz = z) = P(Mtx ,tz > L|Btx = x , Btz = z)
Now,we know that
P(Mtx ,tz > L, Btz = z|Btx = x )
. Now, from the
P(Btz = z|Btx = x )
strong Markov property for a Brownian motion and from the reflection property
we get,

P(Mtx ,tz > L|Xtx = x , Xtz = z) =

P(Mtx ,tz > L, Btz < z|Btx = x ) = P(Mtx ,tz > L, Btz > 2L z|Btx = x )
= P(Btz > 2L z|Btx = x )
since, z < L. Thus,
1
P(Btz > 2Lz|Btx = x ) = p
2(tz tx )
Rajarshi Sarkar

(UNSA - INRIA)


exp

2Lz

First Passage Time Problems

((y x0 ) (x x0 ))2
2(tz tx )
August 2012


dy
11 / 71

Proof: continued...
By differentiation respect to z and L, we get,
2(2l (x + z))
P(Btz dz, Mtx ,tz dl|Btx = x ) = p
exp
2(tz tx )

(2l (x + z))2
2(tz tx )


dzdl

Also, since Bt N (0, t), we can write,


P(Btz dz|Btx = x ) = p

1
2(tz tx )


exp

(z x )2
2(tz tx )

Thus, we get,
P(Mtx ,tz dl|Btx = x , Btz = z) =

2(2l (x + z))
exp
tz tx

2(l x )(l z)
tz tx


dl

Integrating on those measurable sets for which Mtx ,tz L,


P(tx < tz |Btx = x , Btz = z) = P(Mtx ,tz > L|Btx = x , Btz = z)


2(L x )(L z)
= exp
tz tx
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

12 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

13 / 71

Definition
Given some probability space (,F,P); let X be a continuous stochastic process
with natural filtration Ft .Then X is a Gauss-Markov process if ;
X is a Gaussian process if for any integers n and positive reals
t1 < t2 < < tn , the random vector (Xt1 ,Xt2 ,. . . ,Xtn ) has a joint Gaussian
distribution. Thus, for any reals a1 ,a2 ,. . . ,an , random variable
n
X

ai Xti

i=1

is a Gaussian random variable.


X is a Markov process if for any s,t 0 and A B(R)
P(Xt+s A|Fs ) = P(Xt+s A|Xs )
which states that the conditional probability distribution of future states
Xt+s , given the present state and all the past states Fs , depends only on the
present state Xs .

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

14 / 71

First - Passage Time


Now, we define the first-passage time problem. Let us say that the Gauss-Markov
process is defined by,
dXt = (t)Xt dt + (t)dWt
with Xt0 = x0 L and take into account the random variable sL on (,F,P)
sL () = inf{t s|Xt () L}
The random variable sL is defined as the stopping time with respect to Ft and is
known as the first passage time of X for a boundary L. The first passage time
problem also consist of determining the distribution of sL on [s,+)

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

15 / 71

Doobs Integral Representation


Proof:
Let W = {Wt , Ft ; 0 t T} denote a standard real Wiener process. We
consider the class of real Gaussian Markov process X = {Xt ,Ft ;0 t T} solution
to the following SDE;
dXt = (t)Xt dt + (t)dWt
with X0 = x0 ;
where is a bounded function and is a continuous,bounded, positive function.
Now, we can solve this equation by using variation of parameters. Let Yt be the
solution of the differential equation;
dYt = (t)Yt dt
Rt
with Y0 = 1; then, we get, Yt = exp( 0 (u) du) for any 0 t T

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

16 / 71

Proof: continued....
Now we consider Xt = Yt Zt for some Zt . Applying Itos formula, we get
Z t
exp(
(u) du)dZt = (t)dWt with Z0 = x0
0

Thus,
Z
Zt = x0 +

Z
exp(

(u) du)(s) dWs


0

Rs
Rt
Rt
Thus we get, Xt = exp( 0 (u) du)(x0 + 0 exp( 0 (u) du)(s) dWs ).
Thus defining the functions g, h and f as,
Z t
(u) du)
g(t) = exp(
0
Z t
Z s
h(t) =
exp(2
(u) du)(s)2 ds
0
0
Z t
f (t) = exp(
(u) du)(t)
0

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

17 / 71

Final Result
Thus, we can write the stochastic process like;
Z t
Xt = g(t)(x0 +
f (s) dWs )
0

Now, we can see that the Xt is a Gaussian


random variable with mean being
Rt
g(t)x0 and the variance being g(t)2 0 f (s)2 ds or g(t)2 .h(t).

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

18 / 71

The Discrete Construction of a Gauss-Markov Process


Given some reals tx < ty < tz , the conditioning formula for a Gauss-Markov
process gives a distribution of Xty , knowing Xtx =x and Xtz =z.
The discrete construction of a Gauss-Markov process tell us that the
corresponding probability density for the conditioned Gauss-Markov process Xty , is
the Gaussian law N ((ty ),(ty ));
Where, (ty ) denotes the time dependent mean,
(ty ) =

g(ty ) h(ty ) h(tx )


g(ty ) h(tz ) h(ty )
x+
z
g(tx ) h(tz ) h(tx )
g(tz ) h(tz ) h(tx )

and the (ty ) denotes the time dependent standard deviation,


(ty )2 = g(ty )2

Rajarshi Sarkar

(UNSA - INRIA)

(h(ty ) h(tx ))(h(tz ) h(ty ))


h(tz ) h(tx )

First Passage Time Problems

August 2012

19 / 71

The Discrete Construction of a Gauss-Markov Process


The discrete construction of a Gaussian Markov process will depend heavily on
two results.

First one being Doobs integral representation which gives an expression for
the probability P(Xt = x |Xt0 = x0 ) of a general Gauss-Markov process.

2
x0
x

g(t)
g(t0 )
1

p
exp
P(Xt [x , x +dx ]|Xt0 = x0 ) =

2(h(t) h(t0 )
g(t) 2(h(t) h(t0 ))
iff h(t) 6= h(t0 ).
Second result being the fact that we can actually evaluate
P(Xty [y , y + dy ]|Xtx = x , Xtz = z)
This is because X is a Markov process, thus a sample path which starts from
x and terminates at z passing through y can be thought of as two
independent paths; one starting at x and finishing at y and another one
starting at y and ending at z.
Applying these two properties, we are able to finally construct the probability
density for the random variable Xty with mean (ty ) and variance (ty ).
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

20 / 71

Results on First-Passage Time

Time changed Wiener Process


Time changed Weiner
process means, thats X is a solution for equal to zero
Rt
Thus Xt = x0 + 0 f (s) dWs .
Rt
Implying Xt N (x0 , tx f 2 (u) du)
For, every 0 tx tz 1 and for reals x , z, L with x , z < L, considering the first
passage time as, tx = inf{t > tx |Xt > L}.
Then conditioning to Xtx = x and Xtz = z, we get,


2(L x )(L z)
P(tx < tz |Xtx = x , Xtz = z) = exp
h(tz ) h(tx )
with h(t) =

Rajarshi Sarkar

Rt
tx

f 2 (u) du

(UNSA - INRIA)

First Passage Time Problems

August 2012

21 / 71

First-Passage Time for a Wiener Process process over an affine


boundary
Let W = {Wt , Ft ; 0 t 1} denote a standard real Wiener process on some
probability space (, F, P).
For, every 0 t 1 and every reals x , z, Lx , Lz with x < Lx and z < Lz , consider
the first-passage time tx = inf t > tx |Wt L(t). where L is the affine function
joining (tx , x ) to (tz , z). Then conditioning on Wtx = x and Wtz = z, we have


2(Lx x )(Lz z)
P(tx < tz |Wtx = x , Wtz = z) = exp
tz tx
We can extrapolate this result to get the same for a time changed Wiener
process(Brownian motion).
If we define B = {Bt , Ft ; 0 t T } as the solution of the SDE, dBt = f (t)dWt
for some smooth,bounded function f .
Letting, Btx = x1 and Btz = z1 and the affine boundary being the same, then we
can also say,


2(Lx x1 )(Lz z1 )
P(suptx <t<tz Bt > a + bt|Btx = x1 , Btz = z1 ) = exp
h(tz ) h(tx )
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

22 / 71

First-Passage time for a Gauss-Markov process


Let W = {Wt , Ft ; 0 t T } denote a standard real Wiener process.
Let X = {Xt , Ft ; 0 t T } is a real adapted centered Gauss-Markov process
defined by the equation,
dXt = (t)Xt dt + (t)dWt

with

X0 = x0

with and satisfying the regularity criteria of being non-positive, bounded


function and being positive,bounded and homogeneously Holder continuous
function.
For every, 0 tx < tz T and for any reals x , z, Lx , Lz with x < Lx and z < Lz ,
we consider the first-passage time tx = inf{t > tx |Xt > (t)} where for
tx < t < tz ,
(t) =

g(t) h(t) h(tx )


g(t) h(tz ) h(t)
Lx +
Lz
g(tx ) h(tz ) h(tx )
g(tz ) h(tz ) h(tx )

is the expectation of Xt knowing that Xtx = Lx and Xtz = Lz . Then conditioning


to Xtx = x and Xtz = z we have,


2(Lx x )(Lz z)
P(tx < tz |Xtx = x , Xtz = z) = exp
g(tz )g(tx )(h(tz ) h(tx ))
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

23 / 71

Proof:
First we remember Doobs integral representation for the Gauss-Markov process in
question:
Z t
Xt = g(t)(x0 +
f (u) dWu )
0

Rt
Rt
where, g(t) = exp( 0 (u) du) and f (t) = exp( 0 (u) du)(t) and
Rs
Rt
h(t) = 0 exp(2 0 (u) du)(s)2 ds.


Xt
Xt
Thus, we see that g(t)
is a time changed Wiener process, as d g(t)
= f (t)dWt .
Thus, we can apply both the previous results very nicely to this proof.
we also have, (tx ) = Lx and (tz ) = Lz .
Lx
Lz
Let, Kx = g(t
, Kz = g(t
, x 0 = g(tx x ) , z 0 = g(tz z )
x)
z)
Now, lets define the affine boundary which we are going to consider in the first
step which joins (h(tx ), Kx ) and (h(tz ), Kz ) for tx < t < tz as,
L(t) =

Rajarshi Sarkar

(UNSA - INRIA)

h(tz ) h(t)
h(t) h(tx )
Kx +
Kz
h(tz ) h(tx )
h(tz ) h(tx )

First Passage Time Problems

August 2012

24 / 71

Proof: continued....
Now, we consider the first-passage time of the form
0
0
h(t
= inf{h(t) > h(tx )|Wh(t)
> L(t)}, where Wt0 is the time changed Wiener
x)
process defined by the SDE , dWt0 = f (t)dWt .
0
0
Then, conditioning to Wh(t
= x 0 and Wh(t
= z 0 , we get,
x)
z)


2(Kx x 0 )(Kz z 0 )
0
0
0
0
0
=
z
)
=
exp

=
x
,
W
<
h(t
)|W
P(h(t
z
h(tz )
h(tx )
x)
h(tz ) h(tx )
Now, we look into the event whose probability we just calculated.
0
0
0
{h(t
< h(tz )|Wh(t
= x 0 , Wh(t
= z 0}
x)
x)
z)
0
0
0
= {h(t) (h(tx ), h(tz )), Wh(t)
> L(t)|Wh(t
= x 0 , Wh(t
= z 0}
x)
z)
0
0
0
= {t (tx , tz ), Wh(t)
> L(t)|Wh(t
= x 0 , Wh(t
= z 0}
x)
z)
0
0
0
= {t (tx , tz ), g(t)Wh(t)
> g(t)L(t)|g(tx )Wh(t
= x , g(tz )(Wh(t
= z}
x)
z)
0
Now, since we can very easily see that Xt and g(t)Wh(t)
have the same law, thus
for tx t tz , we can deduce that,
0
0
P(h(tz ) < h(tz )|Wh(t
= x 0 , Wh(t
= z 0 ) = P(tx < tz |Xtx = x , Xtz = z)
x)
z)
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

25 / 71

Final Result
Thus, finally we get the result for the first-passage time for a conditioned
Gauss-Markov process as;


2(Lx x )(Lz z)
P(tx < tz |Xtx = x , Xtz = z) = exp
g(tz )g(tx )(h(tz ) h(tx ))

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

26 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

27 / 71

Euler Scheme
We look into the Euler Scheme for the approximation of the first-passage time for
a Gauss-Markov process X .
dXt = (t)Xt dt + (t)dWt

0tT

with

X 0 = x0

where, is a non-positive function which is bounded on every compact support


[0,T] for every T > 0 and is a positive homogeneously Holder continuous
function.
The idea is to apply the time discretization scheme of the stochastic differential
equation in question whose solution is Xt . The time discretization step is TN ,
where N N. We denote the quantity TN as . Thus, the scheme looks like,

b(k+1) = X
bk + (k)X
bk + (k) G k+1
X

with

k {0, 1, .....N 1}

with X0 = x0 , where, G 1 , G 2 , ......, G N are N (0, 1).


We define the first-passage time as = inf{t 0; Xt Lt }, where Lt is the
boundary in question.
Now, we define the first-passage time in accordance with our discrete Euler
scheme as e = inf{ti 0; Xti Lti }, where ti = i = i TN . Thus we approximate
the e using the Euler scheme.
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

28 / 71

We work here with an Ornstein-Uhlenbeck process of the form,


dXt = Xt dt + dWt

with

for

0tT

X0 = x0
where is a non-positive real constant, is a positive constant and x0 is a real
constant. T > 0 The Euler scheme, with = TN where N N is,

b(k+1) = X
bk + X
bk + G k+1 for k {0, 1, ....N 1}
X
with X0 = x0 .
Now, what if none of the discrete simulations crosses the boundary?
Conditioning on the values of (Xti ) and (Xti+1 ), we look at the probability for the
crossing to happen in-between these two values, if and only if none of the values
cross the boundary. Also we know that (Xt )ti tti+1 has the law of some form of
Brownian bridge.


2(Lti x )(Lti+1 z)
bt = x , X
bt = z) = exp
P( (ti , ti+1 )|X
i
i+1
g(ti )g(ti+1 )(h(ti+1 ) h(ti ))
where we have
the fact that > ti . where g(t) = exp(t) and
 acknowledged

2 1exp(2t)
h(t) = ()
. Then we compare this probability of crossing, with an
2
uniform random variable U(0, 1).
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

29 / 71

The Simulated Path for an Ornstein-Uhlenbeck Process


= 1.0, = 1.0, x0 = 0.0, initialtime = 0.0, finaltime = 10.0,
time step = 2116 , = finaltime time step = 21016 ,
The value of the Ornstein-Uhlenbeck process

1.5

"simulate_path.dat"

1
0.5
0
-0.5
-1
-1.5
-2
0

10

Time
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

30 / 71

The estimated probability density function


With L = 0.5 and Monte Carlo number(MCN) = 200000,
We first try to estimate the probability density function(pdf) for the first-passage
time using a kernel density estimator.
The kernel density estimator for this unknown density function f is,


N
N
1 1 X
x xi
1 X
b
Kh (x xi ) =
K
fh (x ) =
N i=1
h N i=1
h

where h is the kernel bandwidth and Kh (x ) = h1 K xh .
If, we choose a very small value for the bandwidth, the estimator can give us very
spiky estimates(without much smoothing) or instead if we choose too large a
value for the bandwidth, it can lead to over smoothing of the estimator. However,
for Gaussian kernel estimators, we can approximately find the optimal bandwidth
h, with this formula,
 5  15
4
1.06
h=
=
1
3N
N5
where, is the standard deviation of the set of sample points (x1 , x2 , ...., xN ).
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

31 / 71

The estimated probability density function


f(x) the probability density function of the first-passage time

The estimated probability density function is;


1

"firstpassagekernel.dat"

0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

10

x
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

32 / 71

The estimated cumulative distribution

Now, as we try to estimate the cumulative density function.If we have a sample


N
data X = {X1 , X2 , ..., XN }, by the law of large number we know that X1 +X2 +....+X
N
converges to E (X ).
P(X x ) = E (1X x )

N
X
1X i x
N
i=1

where X denotes the sample data set for the first-passage time and N in our
above expression is the Monte-Carlo number, or the number of simulated values
we have in our data set.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

33 / 71

The estimated cumulative distribution


The cumulative distribution for the first-passage time for the Ornstein-Uhlenbeck
process is
1

"cumulative_density.dat"

0.9
P(First-passage Time < X)

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

10

X
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

34 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

35 / 71

The Fast Algorithm for the First-Passage Time of


Gauss-Markov process
The paper by Taillefumier and Magnasco details the procedure they follow to
approximate the first-passage time for a Gauss-Markov process with Holder
continuous boundaries.
The main idea behind their algorithm is a probabilistic variant of dichotomic
search.
Their method evaluates discrete points in a sample path exactly and then
refines this evaluation recursively only on regions where a passage is
estimated to be more probable.
The process is path-wise simulated at high resolution only on regions where
such a resolution was needed. Thus, numerically simulating the process
accurately only when it is close to the boundary, but not when far away from
the boundary.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

36 / 71

Regularity assumptions
Certain assumptions are taken into account.
Co-efficient Regularity Assumption : The Gauss-Markov processes are
solution of a linear stochastic equation with time-dependent
non-positive,bounded function and with time-dependent positive,
homogeneously Holder continuous function .
Barrier Regularity Assumption : The barrier is assumed to be homogeneously
Holder continuous and non-negative.
These determine the regularity of a continuous density function for the
first-passage time and prescribes the speed of convergence of the first-passage
time computation.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

37 / 71

The Algorithm

We generate first the final position of the process using the formula.
p
XT = g(T )x0 + g(T ) h(T )
where, is a Gaussian random variable N (0, 1).
Then we simulate XT /2 using the result of the discrete construction of
Gauss-Markov process using the values of X0 and XT .
In this way, we keep on dividing and subdividing the domain to find the
values of out process at specific time.
When Xt L; by continuity of the sample path we know that the crossing
has occurred before or at t thus, we disregard continuing the simulation of
the sample path for time s following t.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

38 / 71

The Algorithm continued...

In the case, when the newly simulated value does not cross the boundary and
neither does any of its adjacent values, we check if the probability for a
crossing to happen is larger than some prescribed small positive real .
We define a certain depth of search initially, i.e.

T
.
2N

When this depth of discretization is reached, we decide to look for the


first-passage time for this particular simulation.
In the case when one of the simulated values cross the boundary, the first
passage time is the time corresponding to the one which crosses the
boundary first.
In the other case, when none of the simulated values cross the boundary, we
check with the probability of crossing p and compare the value with an
uniform random variable U(0, 1).

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

39 / 71

Simulation of an Ornstein-Uhlenbeck Process

In this section, we work with an Ornstein-Uhlenbeck process as a representative of


the Gauss-Markov process family.
The Ornstein-Uhlenbeck process we work with looks like,
dXt = Xt dt + dWt

with

X0 = x0

0tT

where, is a non-positive real constant, is a positive real constant and x0 is a


real constant also.
Moreover, we work with a constant boundary L to simulate the first-passage time
for the above diffusion process.
The algorithm that was put into coding is a slight modification of the above
mentioned one.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

40 / 71

The main ideas behind the coded algorithm


We first choose an initial depth of say 2N . We generate the final value by
using the formula,
p
XT = g(T )x0 + g(T ) h(T )
and we already know the initial value as X0 = x0 and N (0, 1).
We know go about dividing the domain [0,T] by taking help of the discrete
construction of the Gauss-Markov process and we do so until we reach the
depth of 2N .
Once, we have generated all the values of our first round of simulation, we
look for the first time when one of such values crosses the boundary and we
note the first time when it happens as Tfinal .
We start to check for probability of crossing in each interval of time 2TN , until
we reach Tfinal .At each interval the probability = p is compared with a
positive small, real, pre-chosen .
If p  for a particular interval, then we subdivide that interval in the same
fashion as earlier keeping the same depth of discretization 2N .

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

41 / 71

h
i
(k+1)T
After, simulating all the values in the interval kT
,
for some k, we
N
N
2
2
look for the time when the value crosses the boundary.
If such a time exists, then we say it is the first-passage time for the simulated
path.
If not, then we consider the probability of exit in that interval which has the
highest probability of exit compared to others.
Now,if the probability of crossing is greater than equal to the uniform variable
, we consider the mid-point of that time interval as our first-passage time.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

42 / 71

Initial Simulated values of the Ornstein-Uhlenbeck Process


= 1.0 , = 1.0, x0 = 0.0, T = 10. The depth is chosen to be 210 . First we
simulate the first set of values for X .
Value of the Ornstein-Uhlenbeck process X

1.5

"Initial_Simulation.dat"

1
0.5
0
-0.5
-1
-1.5
-2
0

10

Time
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

43 / 71

Second - Round of simulation

After the initial simulation, we check for the first time the process value has
touched or exceeded the value of the boundary L.
We find such a time in this case, and we go on checking the probability of
exit in each interval with an  , where  = 0.001.
Wherever the probability is greater than the , we simulate more values of the
process in that interval using the same idea as before.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

44 / 71

Second - Round of simulations


with the boundary = L = 0.5, we get,

The value of the Ornstein-Uhlenbeck process

0.52

"second_round_of_simulation.dat"

0.51
0.5
0.49
0.48
0.47
0.46
0.45
6.4721

6.4722

6.4723

6.4724

6.4725

6.4726

6.4727

6.4728

Time
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

45 / 71

The estimated probability density function


f(x) the probability density function of the first-passage time

With a Monte Carlo number = 1000000 we are able to approximate probability


density function using the kernel estimator.
0.9

"density_kernel.dat"

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

10

x
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

46 / 71

The estimated cumulative distribution


1

"cumulative_distribution.dat"

0.9
P(First-passage Time < X)

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

10

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

47 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

48 / 71

Parameters
We look into the following the SDE,
dXt = Xt dt + dWt

with

X0 = x0

where = -1.0, = 1.0, x0 = 0.0 , barrier =L = 0.5, Final Time = T = 10.0,


depth = 2N , = 2TN .

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

49 / 71

Euler Scheme
We first look into the results obtained from the Euler scheme for the above SDE.
We tabulate the Monte-Carlo number, the delta or the time-step, the expected
value E ( 1 <T ), the statistical error and the running time for the algorithm.
Table : Euler Scheme Results

MCN

Delta

Expected value

Statistical Error

1000
11000
170000
2700000

0.039
0.0097
0.00244
0.0006

8
10
12
14

1.1566
1.1946
1.2056
1.2162

0.09301
0.0286
0.00727
0.00189

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

Running Time(in se
0.11
1.476
117.465
1786.091

August 2012

50 / 71

Fast Algorithm

It is given that for a chosen parameter , with which we compare our probability
of crossing at each interval, and for a given depth 2N , we get,
P( N > + 2N ) = (N, )
The choice of  is done in this fashion.
ln ln (N 1)ln2 lnT
with such a choice of , we get .
We choose  = exp(18) and hence the probability of the algorithm returning an
erroneous result is 103

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

51 / 71

Fast Algorithm

Table : Fast Algorithm Results

MCN

Delta

Expected value

Statistical Error

1000
11000
170000
2700000

0.039
0.00976
0.00244
0.00015

8
10
12
14

1.564
1.348
1.246
1.2198

0.1235
0.0335
0.0084
0.00202

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

Running Time (in se


0.41
5.833
189.148
2023.65

August 2012

52 / 71

Analytical solution for the first-passage time for an


Ornstein-Uhlenbeck process
For the boundary as L = 0 and X0 = 1.0 and keeping the values of the other
things same,
1
f (x ) =
2

Rajarshi Sarkar

(UNSA - INRIA)

1
sinh(x )

 32



exp(x ) x
exp
+
2sinh(x )
2

First Passage Time Problems

August 2012

53 / 71

The graph of the density function for the case when L = 0.5 and X0 = 0 is,
1.4

"firstpassagekernel.dat"

1.2

the pdf

1
0.8
0.6
0.4
0.2
0
0

10

Comparing it with the density functions estimated with the Euler scheme and the
Fast algorithm.
Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

54 / 71

f(x) the probability density function of the first-passage time

Euler Scheme
1

"firstpassagekernel.dat"

0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

10

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

55 / 71

f(x) the probability density function of the first-passage time

Fast Algorithm
0.9

"density_kernel.dat"

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

10

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

56 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

57 / 71

Exact Simulation of Diffusion Sample Paths


The following algorithm given by Beskos and Roberts and further extended by
Beskos,Papaspiliopoulos and Roberts, simulates the diffusion path for a
one-dimensional stochastic differential equation exactly.
Its a very interesting and quite restricted approach in the sense, there are some
strong restriction on the drift co-efficient.
For example, it can not be used in a simple case as a Black-Scholes Model or in
the case of a Ornstein-Uhlenbeck processes.
However, whenever it can be put into use, it returns the exact law for the process.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

58 / 71

Introduction

Lets W = {Wt ; 0 t T } be a standard Brownian motion. Considering the


general type of a one-dimensional stochastic differential equation;
dXt = (Xt )dt + dWt ,

0 t T,

X0 = x0 R

The exact algorithm provides an alternative method to Euler scheme, which


involves no approximation and still it is computationally highly efficient. It returns
exact sample paths.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

59 / 71

The idea behind the algorithm

Change of probability measure (Application of Girsanovs Theorem) - to


change the process to a standard Brownian motion at first and the to a
biased Brownian motion (Brownian bridge) .
We note the last change of probability as it will give us the density hT of the
random variable which is exactly the value of the Brownina bridge at the final
time T
Rejection Sampling

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

60 / 71

Algorithm
Generate a random variable hT , using the Rejection Sampling and set
(0) = 0
Generate a Brownian Bridge {(t)}0tT , such that (T ) =
We will be accepting this sample path with
! probability
Z

1 T
0 ((t)) + 2 ((t)) dt
exp
2 0

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

61 / 71

Algorithm
Thus, the idea for checking the probability of acceptance we take help of the
Point Poisson Process (PPP)
Generate a Point Poisson Process(PPP)
 on the domain [0,T] x [0,K], where
K = sup0tT 21 0 ((t)) + 2 ((t)) , with unit intensity Thus,
ts+1 ts E(K ) and xs+1 xs U(0, K )

If, 12 0 ((ti )) + 2 ((ti )) < xi , holds for all i 0 s then we accept the path
Else, we go back to simulating the random variable hT and continue

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

62 / 71

Numerical Simulation

The
restriction
of this algorithm is its boundedness criteria of
 main

0
1
2
2 (.) + (.)
In a later paper,
to the case
 0 it was showed
 how the idea can be extended
 0
 when
1
1
2
2
limsupx 2 (x ) + (x ) < or limsupx 2 (x ) + (x ) < .
Thus, we choose to work with an SDE of the form,
dXt = sin(Xt )dt + dWt

X0 = x0

x0 = X0 = 10.5, Time final = 10.0, K = 89

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

63 / 71

The Exact Skeleton of the Process


10.5

"samplepath.dat"

The Value of the process X

10

9.5

8.5

8
0

10

15

20

25

30

Time

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

64 / 71

Evaluation of the first-passage time using Exact Simulation


Thus, what we are looking for is the first-passage time for a biased Brownian
motion over a constant boundary.
x ,y = {B ; t t t |B = x , B = y }, we know,
Thus, for Bg
t 1
2 t1
t2
x ,y
t2 t
g
B =
x + tt1 y + t2 t B tt ,
t

t2 t1

t2 t1

t2 t1

1
t2 t

We define the first-passage time as,


x ,y
L}
Lx ,y = inf{t [t1 , t2 ]; Bg
t
and the first-passage time for Brownian motion with drift will be defined as,
, = inf{t 0; Bt t }


s t1
P(Lx ,y > s) = P , >
t2 s
where =
where,

Lx
t2 t1

and =

Ly .
t2 t1

Thus, Lx ,y is equal in distribution to g(, ),

xt2 + t1
for 0 x
x +1
We, know the distribution of the random variable , from the very famous
"Bachelier - Levy formula",
g(x ) =

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

65 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

66 / 71

Pricing a Barrier Option


dSt = (St , t)dt + (St , t)dWt

with

St0 = s0

We will get the price of the barrier option as,


V (s0 , T ) = E Q ((ST 1 >T )|St0 = s0 )
where, = inf{t > 0; St L}

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

67 / 71

Table : Pricing the Option - Euler Scheme

Monte-Carlo Number

Price

Statistical Error

10000
100000
1000000

8
9
10

0.000319
0.001
0.0038

0.00028
0.00012
0.000082

Pricing the Option - Fast Algorithm


Monte-Carlo Number N
Price
Statistical Error
10000
100000
1000000

Rajarshi Sarkar

(UNSA - INRIA)

8
9
10

0.000298
0.000989
0.00372

First Passage Time Problems

0.00032
0.00023
0.000076

August 2012

68 / 71

Outline
1

Introduction

Brownian Motion - Results pertaining to First-Passage Time

Gauss-Markov Processes - Results pertaining to the First-Passage Time

Euler Scheme

Fast Algorithm

Euler Scheme vs Fast Algorithm

Exact Simulation of Diffusion Sample Paths

Application - Finance

Conclusion

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

69 / 71

Conclusion
It is true that we know how the probability density function for the case of an
Ornstein-Uhlenbeck process looks like, however the expression is quite
cumbersome and long.
Thus, we need to look for ways to numerically simulate such a random event
We see that the probabilistic dichotomic fast algorithm, indeed does provide
much faster results as compared to Euler scheme.
We see, that when applicable the Exact simulation algorithm returns very
nice results for the first-passage time.

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

70 / 71

THANK YOU

Rajarshi Sarkar

(UNSA - INRIA)

First Passage Time Problems

August 2012

71 / 71

You might also like