Ulj FMF Fc2 Fm2 Sno Black Scholes Model 01
Ulj FMF Fc2 Fm2 Sno Black Scholes Model 01
Ulj FMF Fc2 Fm2 Sno Black Scholes Model 01
Antonino Zanette
University of Udine
[email protected]
1
Continuous Stochastic Processes
The origin of stochastic processes can be traced back to the field of statistical
physics. A physical process is a physical phenomenon whose evolution is
studied as a function of time.
Definition
Let (Ω, F , P) be a probability space. A continuous-time stochastic process is a family (Xt )t≥0 of
R-valued random variables on (Ω, F , P).
• the index t stands for the time.
• for each time t fixed:
Xt : Ω −→ R
• for each ω ∈ Ω the map t −→ Xt (ω) is called the path of the process.
2
Brownian motion
In finance, the most common models are constructed on the Brownian
motion.
Definition
A Brownian motion is a real-valued, continuous stochastic process (Xt )t≥0 with indipendent,
normally distribuited and stationary increments. In other words :
P1 B0 = 0.
P1 the function s 7→ Bs (ω) is a continuous function.
P2 indipendent increments : for each k, 0 ≤ t0 < t1 < . . . < tk , the increments
Bt0 , Bt1 − Bt0 , Bt2 − Bt1 , .., Btk − Btk−1 are indipendent.
3
Brownian motion
The path of the Brownian motion are continuous, but not differentiable.
0.5
0 0.5 1
4
Financial example 2
h i
−rT σB
P =e EP (K − e T )+ .
√
Under P, BT ∼ N (0, T ). So BT = g T con g ∼ N (0, 1).
We can approximate the put price with
5
Monte Carlo algorithm
main()
{
double mean_price,mean2_price,brownian,price,price_sample,error_price,inf_price,sup_price;
mean_price= 0.0;
mean2_price= 0.0;
for(i=1;i<=N;i++)
{
/*Brownian motion simulation*/
brownian=gaussian()*sqrt(T);
price_sample=MAX(0.0,K-exp(sigma*brownian));
mean_price= mean_price+price_sample;
mean2_price= mean2_price+SQR(price_sample);
}
/* Price */
price=exp(-r*T)*(mean_price/N);
error_price= sqrt(exp(-2.*r*T)*mean2_price/N - SQR(price))/sqrt(N-1);
inf_price= price - 1.96*(error_price);
sup_price= price + 1.96*(error_price);
}
6
Simulation of Brownian motion path
T
Let [0, T ] be divided using N time intervals of lenght ∆T = N .
N
X N
X
BT = BN ∆T = (Bk∆T − B(k−1)∆T ) = ∆Bk
k=1 k=1
T
Start t0 = 0, B0 = 0, ∆T = N
for k = 1, . . . , N
BEGIN;
tk = tk−1 + ∆T ;
simulation of g ∼ N (0, 1);
√
Bk∆T = B(k−1)∆T + g ∆T ;
END;
7
Algorithm
main()
{
double k,T,brownian,B_T,time;
int N;
k=T/N;
brownian=0.;
time=0.;
for(i=1;i<=N;i++)
{
/*Time*/
time+=k;
/* B_T */
B_T=brownian;
}
8
Brownian motion and random walk
One of the standard way used to approximate a Brownian motion is to use a random walk. Here
we use the standard symmetric random walk.
Proposition
Let (Xi , i ≥ 1) be a sequence of independent random variables such that P(Xi = ±1) = 1/2.
Set Sn = X1 + · · · + Xn .
Let ∆T = T /N be the time step. Set
√
BN = ∆T SN .
9
Besides, E(g(SN )) can be computed as follows :
u(N ∆T, x) = g(x),
1 1
u(n∆T, x) = u((n + 1)∆T, x + 1) + u((n + 1)∆T, x − 1).
2 2
10
Exercise
Compute
h i
−rT
P =e EP (K − eσBT )+ .
11
Brownian motion with drift
Xt = µt + σBt
with Bt standard brownian motion, with µ and σ costants.
50.3
50.25
50.2
50.15
50.1
50.05
50
49.95
0 0.5 1
A french matematician Bachelier introduces it in first years of 1900 for modelling stock prices.
But there is the problem of the negative prices:
Xt ∼ N (µt, σ 2 t).
12
Geometric Brownian motion
Definition
A Geometric Brownian motion St is a continuous stochastic process such that:
P1 S0 = x.
1 2 )t+σB
P2 St = S0 e(µ− 2 σ t
65
60
55
50
0 0.5 1
St
The log-returns log S0 have normal distribution (the returns are normal).
St 1 2
S0 is log-normal of parameters (µ − 2 σ )t and σ 2 t.
13
14
Property of the GBM
St
E( ) = eµ(t−s)
Ss
Variance
St 2µ(t−s) σ 2 (t−s)
V ar( )=e (e − 1)
Ss
P2 for each 0 ≤ t0 < t1 < . . . < tn , the relative increments Stk /Stk−1 are indipendent and
have common law.
15
Financial example 3
h i
−rT
P =e EP (K − ST )+ ,
Then
−rT h(X1 ) + · · · + h(Xn )
P ≈e
n
X1 , .., Xn ∼ N (0, T ).
16
Monte Carlo algorithm
main()
{
double mean_price,mean2_price,brownian,price,price_sample,error_price,inf_price,sup_price;
mean_price= 0.0;
mean2_price= 0.0;
for(i=1;i<=N;i++)
{
brownian=gaussian()*sqrt(T);
price_sample=MAX(0.0,K-x*exp((mu-0.5*sigma*sigma)*T+sigma*brownian));
mean_price=mean_price+price_sample;
mean2_price=mean2_price+SQR(price_sample);
}
price=exp(-r*T)*(mean_price/N);
error_price= sqrt(exp(-2.*r*T)*mean2_price/N - SQR(price))/sqrt(N-1);
inf_price= price - 1.96*(error_price);
sup_price= price + 1.96*(error_price);
}
17
Simulation of Geometric Brownian motion path
T
Let [0, T ] be divided using N time intervals of lenght ∆T = N .
N
Y N
Y
Sk∆T 1 2 )∆T +σ∆B
ST = SN ∆T = S0 = S0 e(µ− 2 σ k,
k=1
S(k−1)∆T k=1
with
1 2 1 2 √
(µ − σ )∆T + σ∆Bk = (µ − σ )∆T + σg ∆T con g ∼ N (0, 1)
2 2
Simulation of the GBM path (St )0≤t≤T :
T
Start t0 = 0, S0 = x, ∆T = N
for k = 1, . . . , N
BEGIN;
tk = tk−1 + ∆T ;
simulation of g ∼ N (0, 1); √
1 σ 2 )∆T +σg
(µ− 2 ∆T
Sk∆T = S(k−1)∆T e ;
END.
18
Algorithm
main()
{
double k,T,w_derive,s,S_N,mu=0.1,sigma=0.2,time;
int N;
k=T/N;
s=50.;
time=0.;
for(i=1;i<=N;i++)
{
/*Timew*/
time=time+k;
/*Geometric Brownian simulation*/
s=s*exp((mu-0.5*sigma*sigma)*k+sigma*gaussian()*sqrt(k));
}
/* S_T */
S_T=s;
}
19
Differential property of the Brownian motion
h i
2
E (Bt − Bs ) = t − s
Then h i
E X = (t + ∆t) − t = ∆t
and h i
2
V X = 2(∆t)
When ∆t is close to zero the r.v. X is “not to much random” and is very close to his mean ∆t:
2
X= Bt+∆t − Bt ≈ ∆t
We write 2
dBt = dBt dBt = dt
and
√
dBt = dt
20
The quadratic variation of the Brownian motion in [0, T ] is equal to his variance.
Let (Bt , t ≥ 0) be a standard Brownian motion. For each T > 0 and partition
n n
0 = tn n n
0 < t1 < · · · < tn = T so that π = sup (ti − ti−1 ) goes to zero when n → ∞ :
i≤n
n
X 2
n n
B(ti ) − B(ti−1 ) → T,
i=1
Proof
n
hX 2 i
n n
E B(ti ) − B(ti−1 ) =T
i=1
2
The random variables B(tn
i ) − B(tn
i−1 ) , i = 1, 2, . . . , n are indipendent.
" n # n
X 2 X 2
Var B(tn
i ) − B(tn
i−1 ) = Var B((tn
i ) − n
B(ti−1 )
i=1 i=1
n
X 2
= 2 tn n
i − ti−1 ≤ 2πT.
i=1
21
Stochastic integral
Consider the stochastic integral
Z T
f (t, Bt )dBt .
0
RT
We can define Xt = 0
f (t, Bt )dBt as the limit of discrete sums of the type
n−1
X n
Xn = f (tj , Btn )(Btn − Btn ),
j j+1 j
j=0
as n goes to infinity.
When can think Xn as a "Riemann sum" in which the representative point inside each
subinterval is the left-most point.
Of course, conditions on f are necessary to ensure that Xn converge in a reasonable sense and
22
Example
Z T
dBs = BT
0
Example
Z T 1 1 2
Bs dBs = − T + BT
0 2 2
23
Z T n−1
X
Bs dBs = lim Btj · Btj+1 − Btj
0 n→∞
i=0
n−1
X
= lim Btj Btj+1 − Bt2
n→∞ j
i=0
X
n−1
1 2 1 2 1 2
= lim − Btj+1 − Btj − Bt + Bt
n→∞
i=0
2 2 j 2 j+1
" n−1 n−1
#
1 X 2 X 2 2
= lim − Btj+1 − Btj + Bt − Bt
n→∞ 2 j+1 j
i=0 i=0
1 1 2
= − T + BT .
2 2
24
Ito integral property
Z T
f (t, Bt )dBt .
0
- Linearity
- Expectation
hZ T i
E f (t, Bt )dBt = 0.
0
- Quadratic mean
h Z T 2 i hZ T i
2
E f (t, Bt )dBt =E f (t, Bt )dt .
0 0
25
Stochastic differential equations
Definition A process (Xt )t≥0 which satisfies
Z t Z t
(1) Xt = x + µ(s, Xs )ds + σ(s, Xs )dBs ,
0 0
is called a solution of the stochastic differential equation with coefficient µ and σ, intial
condition x and Brownian motion (Bt )t≥0 .
(Xt )t≥0 is called the diffusion process corresponding to the coefficients µ and σ. We can write
the differential simbolic notation
(
dXt = µ(t, Xt )dt + σ(t, Xt )dBt
X0 = x.
Example
The standard Brownian motion, the Brownian motion with drift and the geometric Brownian
26
Example : Brownian motion with drift
The Brownian motion with drift is solution of the following s.d.e.
(
dXt = µdt + σdBt
X0 = x.
Stochastic Integral
Z t Z t
Xt = x + µds + σdBs
0 0
The solution is
Xt = x + µt + σBt
27
Example : Geometric Brownian motion
The Geometric Brownian motion with drift is solution of the following s.d.e.
(
dSt = µSt dt + σSt dBt
S0 = x.
Stochastic Integral
Z t Z t
(2) St = S0 + µSu du + σSu dBu
0 0
The solution is
(µ− 1 σ 2 )t+σBt
St = xe 2
28
Ito’s Lemma
Lemma
Let (Xt )t≥0 the solution of
We can write
∂f
df (t, Xt ) = α(t, Xt )dt + dXt
∂Xt
with
∂f σ 2 (t, Xt ) ∂ 2 f
α(t, Xt ) = +
∂t 2 ∂Xt2
29
Example
30
On the contrary, let is consider Xt = St and
f (t, St ) = ln(St )
Then
1 2
(3) ST = S0 exp (µ − σ )T + σBT .
2
31
Example
Consider f (t, x) = x2 and Xt = Bt . Then
2
f (t, Bt ) = Bt
so that Z t 1 2
Bu dBu = (Bt − t).
0 2
32
Theorem (Existence and Uniqueness)
Z t Z t
(4) Xt = x + µ(s, Xs )ds + σ(s, Xs )dBs ,
0 0
If µ and σ are continuous functions, and if there exists a constant K < +∞, such that :
1. |µ(t, x) − µ(t, y)| + |σ(t, x) − σ(t, y)| ≤ K|x − y|
33
Simulation diffusions paths
Euler Discretization Scheme
T
Start t0 = 0, x0 , ∆T = N
for k = 1, . . . , N
BEGIN;
tk = tk−1 + ∆T ;
simulation of g ∼ N (0, 1);
√
xk∆T = x(k−1)∆T + µ(x(k−1)∆T , tk−1 )∆T + σ(x(k−1)∆T , tk−1 )g ∆T
END;
34
Brownian motion
Definition
A Brownian motion is a real-valued, continuous stochastic process (Xt )t≥0 with indipendent,
normally distribuited and stationary increments. In other words :
• B0 = 0.
• continuity.
• indipendent increments : if s ≤ t, Bt − Bs is indipendent of Fs = σ(Bu , u ≤ s).
35
Continuous-time martingale
Let us consider a probability space (Ω, A, P) and a filtration F := (Ft , t ≥ 0) on this space.
It follows from the definition that if (Mt )t≥0 is a martingale, then E(Mt ) = E(M0 ), for each t.
Example
Bt is an Ft -martingale.
36
Markov property
The intuitive meaning of the Markov property is that the future behaviour of the process
(Xt )t≥0 after t depends only on the value Xt and is not influenced by the history of the process
before t.
Mathematically speaking, (Xt )t≥0 satisfies the Markov property if, for any function f bounded
and measurable and for any s and t, such that s ≤ t, we have :
This is a crucial property of the Markovian model and it will have great conseguences in the
pricing of options.
37
Black-Scholes model
- Risk-free asset (
dSt0 = rSt0 dt
S00 = 1.
- Risk asset (
dSt = µSt dt + σSt dBt
S0 = x.
with (Bt )t≥0 standard brownian motion under the historical probability P.
- The short-term interest rate is known and is costant through time.
- The stock pays no dividends or other distributions.
- There are no penalties to short-selling.
- It is possible to borrow any fraction of the price of a security to buy it or to hold it, at the
short-time interest rate.
- Absence of arbitrage opportunities.
38
Financial interpretation of the parameters
- r istantaneous interest rate : [0%, 12%]
St µt
E( )=e
S0
- σ is the volatility σ.
This is vey important parameters : [30%, 70%] in the equity market.
- risk premium λ
µ−r
λ=
σ
Then
µ = r + λσ
The expected return µ of the risky asset is the sum of the return of the no-risky asset plus
something proportional to σ.
39
We can write
dSt = rSt dt + σSt (dBt + λdt)
The Girsanov theorem gives
bt = dBt + λdt
dB
40
Dinamics under the risk neutral probability measure
(
bt
dSt = rSt dt + σSt dB
(5)
S0 = x.
Then
ST r(T −t)
EQ |Ft =e
St
41
Radon-Nikodyn Theorem
Let P and Q be two probabilty measure on (Ω, F )
If Q is absolutely continuous with respect to P, (A ∈ F , P(A) = 0 → Q(A) = 0), then there
existe a unique r.v. X ≥ 0, F -misurable such that
Z
Q(A) = XdP
A
dQ
=X
dP
42
Change of probability measure in the Gaussian case
Let use consider Z ∼ N (µ, 1) under P.
Then there exists Q so that Z(0, 1) under Q where
1 2
dQ = e−µZ+ 2 µ dP.
In fact
Z Z z −(x−µ)2
1
P(Z ≤ z) = dP(ω) = √ e 2 dx,
{ω:Z(ω)≤z} −∞ 2π
and
Z Z Z
−µZ(ω)+ 1 µ2
z 1 −x2
Q(Z ≤ z) = dQ(ω) = e 2 dP(ω) = √ e 2 dx.
{ω:Z(ω)≤z} {ω:Z(ω)≤z} −∞ 2π
Moreover it holds
h i h i h i h i
µZ− 1 µ2 −µZ+ 1 µ2
EP f (Z) = EQ f (Z)e 2 and EQ f (Z) = EP f (Z)e 2 .
43
Girsanov’s Theorem
Let Bt be a Brownian motion under (Ω, F , P) adapted to the filtration Ft .
Let (Zt )0≤t≤T be the process defined by :
1 2
Zt = exp − λBt − λ t .
2
dQ = ZT dP
bt )0≤t≤T given by B
the process (B bt = Bt + λt, is a standard Brownian motion under Q.
44
Risk neutral pricing formula
ST r(T −t)
EQ |Ft =e
St
This holds for each asset:
hV i
T r(T −t)
EQ |Ft = e
Vt
Equivalently
−r(T −t)
Vt = EQ e VT |Ft .
The price of a contingent claim is the expected value of the discounted payoff.
−rt −rT
e Vt = EQ e VT |Ft .
45
Black-Scholes formula for European Call options
The price at time t of an European Call option in the Black-Scholes model
−r(T −t) −r(T −t) (r− 1 σ 2 )(T −t)+σ(BT −Bt )
Ct = EQ e CT |Ft = EQ e (St e 2 − K)+
is given by
−r(T −t)
Ct = St N (d1 ) − Ke N (d2 )
with
St σ2
log K + r + 2 (T − t) p
d1 = √ d2 = d1 − σ T −t
σ T −t
46
Black-Scholes formula for European Put options
The price at time t of an European put option in the Black-Scholes model
−r(T −t) −r(T −t) (r− 1 σ 2 )(T −t)+σ(BT −Bt )
Pt = EQ e PT |Ft = EQ e (K − St e 2 )+
is given by
−r(T −T )
Pt = Ke N (−d2 ) − St N (−d1 )
47
Implementation of the formula
The price of the call option depends on six parameters.
C = C(St = x, t, T, K, σ, r)
- The volatility cannot be observed directly. In practice, two methods are used to evaluate σ
– The historical method: in the BS model, σ 2 T is the variance of log(ST ) and the
variables log(S∆T /S0 ), log(S2 /S∆T ), . . . , log(SN ∆T /S(N −1)∆T ) are i.i.d random
variables.
Therefore, σ can be estimated by statistical means using past observations of the asset
price.
– the ”implied volatility” method: some options are quoted on organized markets; the
price of options being an increasing function of σ, we can associate an ”implied”
volatility to each quoted option, by inversion of the Black-Scholes formula.
Obs
C (S0 , 0, T, K) = C(S0 , 0, T, K, Σ(K, T ), r)
48
n = m = 6, 30 iter.
0.3
0.25
0.3
0.2
0.2
0.15
0.1
0.1
0 0.05
−0.1 0
−0.2 −0.05
2
−0.1
1.5
800
1 750
700 −0.15
650
0.5 600
550 −0.2
t (an) 0 500
S
49
Approximating the distribution function of g ∼ N (0, 1)
1
Set t = 1+px , then:
1 − √1 exp(− x2 )(b1 t + b2 t2 + b3 t3 + b4 t4 + b5 t5 ) if x≥0
2π 2
N (x) = 2
√1 exp(− x )(b1 t + b2 t2 + b3 t3 + b4 t4 + b5 t5 ) if x<0
2π 2
50
Approximating the distribution function of g ∼ N (0, 1)
double N(double x)
{ const double p= 0.2316419;
const double b1= 0.319381530;
const double b2= -0.356563782;
const double b3= 1.781477937;
const double b4= -1.821255978;
const double b5= 1.330274429;
const double one_over_twopi= 0.39894228;
double t;
if(x >= 0.0)
{
t = 1.0 / ( 1.0 + p * x );
return (1.0 - one_over_twopi * exp( -x * x / 2.0 )
* t * ( t *( t * ( t * ( t * b5 + b4 ) + b3 ) + b2 ) + b1 ));
}
else
{/* x < 0 */
t = 1.0 / ( 1.0 - p * x );
return ( one_over_twopi * exp( -x * x / 2.0 ) *
t * ( t *( t * ( t * ( t * b5 + b4 ) + b3 ) + b2 ) + b1 ));
}
}
51
Scilab
function [y]=Norm(x)
[y,Q]=cdfnor("PQ",x,0,1);
endfunction
52
Price of a Call option
main()
{
double sigmasqrt,d1,d2,delta,price;
sigmasqrt=sigma*sqrt(t);
d1=(log(s/k)+r*t)/sigmasqrt+sigmasqrt/2.;
d2=d1-sigmasqrt;
delta=N(d1);
/*Price*/
price=s*delta-exp(-r*t)*k*N(d2);
}
53
Price of a put option
main()
{
double sigmasqrt,d1,d2,delta,price;
sigmasqrt=sigma*sqrt(t);
d1=(log(s/k)+r*t)/sigmasqrt+sigmasqrt/2.;
d2=d1-sigmasqrt;
delta=N(-d1);
/*Price*/
price=exp(-r*t)*k*N(-d2)-delta*s;
}
54
Put-Call Theorem Parity
We have the following put-call parity between the prices of the underlying asset St and
European call and put options on stocks that pay no dividends:
−r(T −t)
Ct = Pt + St − Ke .
55
Payoff Call
100
50
Payof Put
90
80
70
60
50
40
30
20
10
56
Proof of the Black-Scholes formula
h 1 2 i
−r(T −t)
C(t, x) = EQ e (xe(r− 2 σ )(T −t)+σ(BT −Bt ) − K)+
Then
h √ i
− 1 σ 2 (T −t)+σ T −tg −r(T −t)
C(t, x) = EQ xe 2 − Ke
+
√
σ (T −t)g− 1 σ 2 (T −t) −r(T −t)
C(t, x) = E xe 2 − Ke 1g≥−d2
Z √ 2
+∞
σ (T −t)y− 1 σ 2 (T −t) −r(T −t) e−y /2
= xe 2 − Ke √ dy
−d2 2π
Z √ 2
d2
−σ (T −t)y− 1 σ 2 (T −t) −r(T −t) e−y /2
= xe 2 − Ke √ dy.
−∞ 2π
57
Z √ 2
d2
−σ (T −t)y−σ 2 (T −t)/2 −r(T −t) e−y /2
C(t, x) = xe − Ke √ dy.
−∞ 2π
p
The change of variable z = y + σ (T − t), gives :
with : Z
1 d 2 /2
N (d) = √ e−x dx.
2π −∞
58
Monte Carlo method in the Black-Scholes model
We want compute
h i
−rT
P =e EQ (K − ST )+ .
(r− 1 σ 2 )T +σBT
ST = S0 e 2
59
Monte Carlo algorithm
European Put in the Black-Scholes model
main()
{
double mean_price,mean2_price,brownian,price,price_sample,error_price,inf_price,sup_price;
mean_price= 0.0;
mean2_price= 0.0;
for(i=1;i<=N;i++)
{
brownian=gaussian()*sqrt(T);
price_sample=MAX(0.0,K-x*exp((r-0.5*sigma*sigma)*T+sigma*brownian));
mean_price= mean_price+price_sample;
mean2_price= mean2_price+SQR(price_sample);
}
/* Price */
price=exp(-r*T)*(mean_price/N);
error_price= sqrt(exp(-2.*r*T)*mean2_price/N - SQR(price))/sqrt(N-1);
inf_price= price - 1.96*(error_price);
sup_price= price + 1.96*(error_price);
}
60