You are on page 1of 17

Introduction to Stochastic Calculus

Arun Kumar

IIT Ropar

March 31, 2023


Outline

1 Ordinary Calculus

2 Geometric Brownian Motion

3 References
Stochastic Calculus

In stochastic calculus, we want to consider integral like


Z t Z t
f (s)dB(s) or X (s)dB(s).
0 0

Since Brownian sample paths are not differentiable, the ordinary calculus intuition will
dB(t)
not work because there is no process B ′ (t) = dt , and hence we cannot express
Z t
g(s)dB(s)
0

as Z t
g(s)B ′ (s)ds.
0
Ordinary Calculus

Let G(t) be a differentiable function such that its derivative

dG(t) G(t + h) − G(t)


= lim
dt h→0 h
exists. Then the following three statements are equivalent:
dG(t)
1.
dt
= g(t) (derivative)
2. dG(t) = g(t)dt ( which is a differential equation)
G(t) = G(0) + 0t g(s)ds (which is an integral equation)
R
3.

Thus one can easily interpret that


Z t Z t
f (s)dG(s) = f (s)g(s)ds.
0 0
Riemann Integral

Suppose 
c if t ∈ (a, b]
f (t) = cI(a,b] (t) =
0 otherwise .

The Riemann integral of this function is



Z t Z t  0 if t ≤ a
f (s)ds = cI(a,b] (s)ds = c(t − a) if a < t ≤ b
0 0 
c(b − a) if t > b.
The Riemann-Stieltjes Integral

Let f and g both be functions of t ∈ [0, T ], and consider a partition


0 = t0 < t1 < · · · < tn = T , and a corresponding set of intermediate time points values
ti∗ such that ti−1 ≤ ti∗ ≤ ti . We assume that max |ti − ti−1 | → 0 as n → ∞. Then the
Riemann-Stieltjes integral of f with respect to g is
Z T n
X
f (t)dg(t) = lim f (ti∗ )[g(ti ) − g(ti−1 )],
0 n→∞
i=1

if the limit exists.


Properties
• When g(t) = t, we call this a Riemann integral.
• The Riemann-Stieltjes integral exists if either f or g (or both) are differentiable.
• The Riemann-Stieltjes integral exists if either f or g (or both) are of bounded
variation.
The Riemann-Stieltjes integral for simple function

Suppose 
c if t ∈ (a, b]
f (t) = cI(a,b] (t) =
0 otherwise .

The Riemann-Stieltjes integral of this function is



Z t Z t  0 if t ≤ a
f (s)dg(s) = cI(a,b] (s)dg(s) = c(g(t) − g(a)) if a < t ≤ b
0 0 
c(g(b) − g(a)) if t > b.
Integral of a Basic Stochastic Process

Definition (Basic Stochastic Process)


The process X is called a basic stochastic process if X admits the following
representation
Xt (ω) = C(ω)I(a, b](t), a < b ∈ R
and C is a Fa measurable random variable.

The stochastic integral of X with respect to the Brownian motion is defined as



Z t   0 if 0 ≤ t ≤ a
X (s)dB(s) (ω) = C(ω)(B(t, ω) − B(a, ω)) if a < t ≤ b
0 
C(ω)(B(b, ω) − B(a, ω)) if t > b.
Chain Rule in Ordinary Calculus

For f : R → R and x : [0, ∞) → R, which are continuously differentiable, we know that

df (x(t)) dx(t)
= f ′ (x(t))
dt dt
or in differential form
df (x(t)) = f ′ (x(t))dx(t).
We prove this by using Taylor series expansion such that

1 ′′
df (x(t)) = f ′ (x(t))dx(t) + f (x(t))dx(t)dx(t) + · · · .
2!
Here df(x(t)) denote the infinitesimal increment of f (x(t)). Note that dx(t)dx(t)
corresponds to the quadratic variation of the function x(·).
Ito’s Formula

Consider the Ito process X (·) given by

dX (t) = Q(t)dt + P(t)dB(t).

For f : R → R be a function which has derivatives of all orders. Then using Taylor
series expansion of f , we get

1 ′′ 1
df (X (t)) = f ′ (X (t))dX (t)+ f (X (t))dX (t)dX (t)+ f ′′′ (X (t))dX (t)dX (t)dX (t)+· · · ,
2! 3!
since variation of X (·) of order 3 and more are zero, we get

1 ′′
df (X (t)) = f ′ (X (t))dX (t) + f (X (t))dX (t)dX (t).
2!

Note that, we have dX (t)dX (t) = P(t)2 dt, which leads to

1
df (X (t)) = [Q(t)f ′ (X (t)) + P(t)2 f ′′ (X (t))]dt + P(t)f ′ (X (t))dB(t).
2
Ito Formula Extended

Proposition
For an Ito process dX (t) = P(t)dB(t) + Q(t)dt, the Ito’s formula is given by

df (t, X (t)) = ft (t, X (t))dt + fx (t, X (t))P(t)dB(t)


1
+ fx (t, X (t))Q(t)d(t) + fxx (t, X (t))P 2 (t)dt.
2

Proof.
Using Taylor series expansion, we have

1
df (t, X (t)) = ft (t, X (t))dt + fx (t, X (t))dX (t) + fxx (t, X (t))dX (t)dX (t).
2

We have dX (t)dX (t) = P(t)2 dt, which leads to

df (t, X (t)) = ft (t, X (t))dt + fx (t, X (t))P(t)dB(t)


1
+ fx (t, X (t))Q(t)d(t) + fxx (t, X (t))P 2 (t)dt.
2
Stock price under the Bachelier model

• Under Bachelier model stock price is governed by the equation dS(t) = σdB(t).

• It follows, St = S0 + σBt , where σ is volatility term.

• Thus, St − St−1 = σ(Bt − Bt−1 )

• Hence St − St−1 ∼ N(0, σ 2 ).

• Further, St − St−1 , t = 1, 2, . . . are independent.

• σ̂ = sd(St − St−1 ).
Geometric Brownian motion

• The geometric Brownian motion is a solution of following SDE

dS(t) = µS(t)dt + σS(t)dB(t).

• Choose f (x, t) = ln x, which implies by Ito’s formula

1 1 1 −1 2
d ln(S(t)) = 0 + P(t)dB(t) + Q(t)dt + P (t)dt.
S(t) S(t) 2 S 2 (t)
• By substituting P(t) = σS(t) and Q(t) = µS(t), it follows

1 1 1 −1
d ln(S(t)) = σS(t)dB(t) + µS(t)dt + σS 2 (t)dt
S(t) S(t) 2 S 2 (t)
σ2
= σdB(t) + (µ − )dt.
2
σ2
• Which in turn implies S(t) = S(0)e(µ− 2
)t+σB(t)
.
Estimation of parameters of GBM

σ2
• We have S(t) = S(0)e(µ− 2
)t+σB(t)
.

σ2
 
• Thus the log-returns r (t) = log S(t)
S(t−1)
= (µ − 2
) + σ(B(t) − B(t − 1)).

σ2
 
• Hence r (t) is normal with mean µ − and variance σ 2 .
2

• Further r (t), t = 1, 2, . . . , T . are independent, since these are modeled by the


increments of Brownian motion with drift.
1 PT
• Thus, the estimate of σ 2 is sample variance i.e. σ
c2 =
t=1 (r (t) − r (t))2 .
T −1

• The estimate of population mean by taking sample mean implies


 \2  c2
µ − σ2 = r (t). Hence µ̂ = r (t) + σ2 .

• Hence under the GBM model, the parameters can be estimated by daily log
returns of the equity.
Simulation of GBM

The GBM is given by


σ2
S(t) = S(0)e(µ− 2
)t+σB(t)
.

Steps in simulation of GBM


• Discretize the interval [0, T ] into uniform intervals of length ∆t each.

• Generate N = T /∆t normal random numbers with mean 0 and variance σ 2 ∆t.

• Take the cumulative sum of these random numbers. Call this vector as p1 .

2
 
• Calculate µ − σ j∆t, j = 1, 2, . . . , N. Call this vector p2 .
2

• Now GBM vector is defined by S(t) = ep1 +p2 .


Some References

• Papanicolaou, A. (2017). Introduction to Stochastic Differential Equations (SDEs)


for Finance. arXiv:1504.05309v13

• Morters, P. and Peres, Y. (2010). Brownian Motion. Cambridge University Press.

• Shreve, S. (2005). Stochastic Calculus for Finance II: Continuous-Time Models.


Springer.

• https://cran.r-project.org/web/packages/sde/sde.pdf
THANK YOU

You might also like