Computational Methods in Finance - Institute for Theoretical Physics

advertisement
Computational Methods in Finance
Nikos Skantzos
IAE University of Toulouse 2010-2011
1
Course Organisation

Introduction



Organisation inside the dealing room
Why do we need numerical methods inside a dealing
room?
Some reminders …




Derivative products
Mathematics used in finance
Introduction to stochastic processes and probability
Introduction to VBA programming
IAE University of Toulouse 2010-2011
2
Course Organisation

Evaluation of financial assets:






Historical background
Brownian motion: motivation and examples
Black & Scholes model
Greeks
Other Models – Numerical methods – Payouts
Numerical methods





Analytical solutions
Monte Carlo
Binomial Tree
Partial differential equations (PDE)
Introduction to interest rate derivative products
IAE University of Toulouse 2010-2011
3
Course Organisation

Volatility smile and market models

Risk Management



Calculation of VAR
Introduction to credit risk
Real world markets



Stylised facts
Pairs trading: an example strategy
Kelly’s criterion
IAE University of Toulouse 2010-2011
4
Introduction

Pictures from a dealing room
IAE University of Toulouse 2010-2011
5
Introduction

A more realistic picture of the dealing room
Cartoon by Adam Zyglis
IAE University of Toulouse 2010-2011
6
Introduction

The presence and interaction of different
units in a dealing room
Sales
Trader
Quant
Structurer
IT
Client
Risk Management
IAE University of Toulouse 2010-2011
Quant, IT
7
Inside the dealing room: Sales

Sales



In touch with customers
They sell options and other products of the bank.
Structurers


design new products that are attractive to
customers.
Customers choose them if they offer low risk, high
profit and small premium
IAE University of Toulouse 2010-2011
8
Inside the dealing room: Traders

Traders



Hedge the position that the structurers open.
They buy sell/options to minimise the sensitivity of
the bank’s portfolio to movements of the underlying.
“Prop-traders”

Take position based on their expectation about the
market’s next move.
IAE University of Toulouse 2010-2011
9
Introduction: « Quants »

Who:


Where:


Develop and implement mathematical models to price the
products of structurers and calculate the risk for the bank.
Investment banks, hedge funds and more generally in any
financial institution dealing with derivatives and market
risk.
Background:




Mathematics,
Physics,
Engineering,
Economy.
IAE University of Toulouse 2010-2011
10
How a bank makes money

Buying low & sell high

“Bid-offer” spread (buy price: bid, sell price: offer)

Banks compete to offer best spread to customer

Spread cannot go too high


The customer will go to someone else
Spread cannot go too low

The bank will not have enough money to buy the hedge
IAE University of Toulouse 2010-2011
11
Derivative products: a reminder

Main idea behind Options:
pay now a small premium to have a choice in the future

Example: exchange 1ml EUR for 1,3ml USD in one year


What is this option worth today ?
Can be used as insurance, for example:

If we don’t want to risk receiving less than 1,3m USD
(We need the money to fund my US company)

Can be used for speculation, for example

If we believe that the USD will weaken
IAE University of Toulouse 2010-2011
12
Derivative products: a reminder

Underlying asset:



Any asset sold/bought on a stock market or trading room
Example:
Stocks
Bonds Metals
Grains Electricity
Interest-rates Indices Currencies Gas
Oil
"Spot" Transaction:

We buy or sell an underlying
 Example: Microsoft shares, USD

Market price is known by supply and demand.
IAE University of Toulouse 2010-2011
13
Derivative products: a reminder




Derivative product
 Its price fluctuates as a function of the value of the
underlying.
 Requires either no or small initial investment
 Its settlement is made at a future date
Derivative market growing rapidly since 1980s
 Requires numerical and heavy mathematical methods
 Requires strong computational power & IT infrastructure
 Need to process market data & produce option premium and
risk
Now present in the bulk of financial activity
Derivative pricing
 Requires maths and IT
IAE University of Toulouse 2010-2011
14
Derivative products: a reminder


What is the “fair” value of an option?
Some intuition:



More risk for the issuer, more expensive
Longer maturity, more expensive
More volatile market, more expensive
IAE University of Toulouse 2010-2011
15
Derivatives: finding the fair price

In the horse races there are two horses



Horse A, wins 75% of races
Horse B, wins 25% of races
The booker pays


100€ if horse A wins
200€ if horse B wins

You want to buy the right to choose your horse after
the end of the race

How much is this option worth ?
IAE University of Toulouse 2010-2011
16
Derivatives: finding the fair price

Fair price = average profit
A (75%)
100 €
B (25%)
200 €
Horse race

Average profit = 100 € · ¾ + 200 € · ¼ = 75 € + 50 € = 125
€

Option’s fair price = 125 €
IAE University of Toulouse 2010-2011
17
Derivatives: finding the fair price in stock options



Central idea is similar:
Fair price ~ Average payoff
Simulate stock many times







Record final value
Calculate payoff for that path
Average over all paths
Discounting
This “average” price is valid at maturity
To calculate the equivalent price today:
 N € in a bank account today=
N · erT € after T years
Inversely,
P at maturity = P · e-rT today
Option price =
Discounted Average Payoff
Average taken over probabilities that eliminate
all risk: Risk-neutral measure
IAE University of Toulouse 2010-2011
18
Derivative products: a reminder

History



6th century BC: Greek philosopher Thales of Miletus used
options to secure a low price of olives in advance of
harvest.
Middle Ages: futures contracts to fix in advance the price of
imports of goods from Asia
Holland 1637: The "Tulip Mania" one of the first speculative
bubbles.
IAE University of Toulouse 2010-2011
19
Derivative products: a reminder

Two most simple and popular:

Call = right to buy
at an agreed future date
a certain amount of the underlying asset
at a price fixed today.

Put = right to sell
at an agreed future date
a certain amount of the underlying asset
at a price fixed today.

Terminology



“Agreed future date” = Maturity of the option
“Amount of underlying” = Notional
“Price fixed today” = Strike
IAE University of Toulouse 2010-2011
20
Derivative products: a reminder

The payout of an option


what the option would bring to its owner at maturity (T),
depends on price of the underlying at that time (ST).
Long (the case of a buyer of a call)
Call
payout = ST-K
Short (the case of a
K

seller of a call)
ST
Long Call payout = max(0, ST- K)

Go « Long » a Call if you think the underlying will increase
IAE University of Toulouse 2010-2011
21
Derivative products: a reminder

Long Put payout = max(0, K- ST)

Go « long » a Put if you think the underlying will go lower
Put
Long (the case for
an owener of a Put)
payout = K- ST
K
Short (the case
for a seller of a Put)
ST

Calls and Puts are called vanillas
 Vanilla flavour = simple.
IAE University of Toulouse 2010-2011
22
Derivative products: a reminder

Barrier options


Advantage: Cheaper than vanilla options
Disadvantage: More risky
Regular
barrier
Reverse
barrier
At maturity (T)
K
•Knock-In = the option is activated if the spot hits the barrier
ST
•Knock-Out = the option is disactivated if the spot hits the barrier
IAE University of Toulouse 2010-2011
23
Derivative products: a reminder

Price of an option
Call
Today (t<T)
At maturity (T)
payout = ST-K
Time
value
K
IAE University of Toulouse 2010-2011
ST
St
24
Derivative products: a reminder
How option parameters affect the price. Examples:

If spot goes up, call price goes up


The right to buy cheap shares is more expensive
because underlying became more expensive
If vol goes up, call price goes up

The right to buy cheap shares is more expensive
because the underlying is more risky
IAE University of Toulouse 2010-2011
25
Derivative products: a reminder

How the option parameters affect the option price:
Call
Put
S
+
-
K
-
+
σ
+
+
r
+
-
IAE University of Toulouse 2010-2011
26
Derivative products: terminology






European Payout: payout is uniquely determined by the value of
the underlying at maturity
American Payout: payout is function of the evolution of the
underlying during the lifetime of the option
European exercise: the owner can only exercise the option at
maturity
American exercise: the owner can exercise the option any time
during the lifetime of the option
European barrier: the barrier is active only at maturity
American barrier: the barrier is active continuously during the
lifetime of the option
IAE University of Toulouse 2010-2011
27
Some derivative strategies

Call spread(K1, K2) = Call(K1)- Call(K2)
+Call(K1)
=
K2
K1
K1
K2
-Call(K2)


Cheaper than a simple call
Profit is limited to K2-K1 for spots>K2
IAE University of Toulouse 2010-2011
28
Some derivative strategies

Straddle(K) = Call(K) + Put(K)
Put
Call
K



Expensive
If ST>K: gives the right to buy cheap
If ST<K: gives the right to sell expensive
IAE University of Toulouse 2010-2011
29
Mathematical reminder
IAE University of Toulouse 2010-2011
30
The exponential function
7
6
5
ex =
Exp(x)
4
3
2
1
-2
-1
1
2
ex is always positive
IAE University of Toulouse 2010-2011
31
Mathematical reminder
•
•
•
•
e=2.71828182845904523536028747135…
ex = Exp(x)
e0 = 1
e1 = e
2
3
4
5

i
x
x
x
x
x
e  1  x      ...  
2 3! 4! 5!
i 0 i!
x
IAE University of Toulouse 2010-2011
32
Mathematical reminder
• The function LN (Neperian logarithm):




LN(e)=1
eln(x) = x, or ln(ex) = x
Logarithm in base e
Defined only for x>0
2
3
4
5
y
y
y
y
Ln(1  y )  y 
 
  ...
2
3
4
5
IAE University of Toulouse 2010-2011
33
Mathematical reminder

The derivative of a function: slope of a function at 1 point
Numerical approximation:

f ' ( xo ) 
f ( xo  )  f ( xo )

or
f ' ( xo ) 
f ( xo  )  f ( xo  )
2
• The 2nd derivative: curvature of a function in 1 point


Numerical approximation:
f ( xo ) 

f ( xo ) 
IAE University of Toulouse 2010-2011
f ( xo  )  f ( xo )

f ( xo  )  f ( xo   )  2 f ( xo )
2
34
Some analytical derivatives
IAE University of Toulouse 2010-2011
35
Mathematical reminder

Integral of a function
IAE University of Toulouse 2010-2011
36
Mathematical reminder

Primitives of some commonly used functions
IAE University of Toulouse 2010-2011
37
Mathematical reminder

Numerical integration of a function
Method of lower
rectangles
Trapezoidal method
Method of upper
rectangles
IAE University of Toulouse 2010-2011
38
Mathematical reminder

Taylor series: approximating a function around a point x0
f x  x0   f x0    x  x0   f  x0  
1
x  x0 2  f x0     1 x  x0 n f ( n) x0 
2
n!

Converts a complex function into a simple power-series

Examples

exp(x) around x0=0: e x  1  x 
1 2
x 
2

cos(x) around x0=0: cos( x)  1 
1 2
x 
2

1
1
 1 x  x2
around x0=0:
1 x
1 x
IAE University of Toulouse 2010-2011
39
Random variables and
stochastic processes
Basic notions
IAE University of Toulouse 2010-2011
40
Random variables and stochastic processes

Random variable



Discrete random variable:



Can take on only certain separated values
Example: the result of throwing a dice.
The probability of every outcome is 1/6
Continuous random variable:



a number whose value is determined by the outcome of an experiment
We don’t know its value only how likely it is
Can take on any real value from a range
Example: the price of an stock. The probability that the price is within a
certain interval depends on the distribution of the random variable.
Stochastic process

represents the evolution in time of a random variable
IAE University of Toulouse 2010-2011
41
Properties of random variables

Probability of an event: 0≤Prob(event) ≤1


Prob=0: certainty that event will not happen
Prob=1: certainty that event will happen

Probability of all events: Prob(ev1)+… +Prob(evN) =1

Prob(ev1 OR ev2) = Prob(ev1) + Prob(ev2)


Example: probability that a dice is either “1” or “2” = 1/6 + 1/6
If ev1 is independent of ev2 then:
Prob(ev1 AND ev2) = Prob(ev1) · Prob(ev2)

Example: Prob that two dice are both “1” = 1/6 · 1/6
IAE University of Toulouse 2010-2011
42
Random variables

Characterised by:

The probability density distribution function f(x)


x
The cumulative distribution function


Prob that event x will happen
Prob that the outcome of the experiment will be less than x F ( x ) 


The mathematical expectation (mean)

 f ( x)  dx
The average by repeating the experiment many times
  Ex    x  f ( x)  dx


The moments (order n) :




First moment is the mean
Second moment is related to the variance
Third moment is related to the skewness
...
IAE University of Toulouse 2010-2011

Mn(X ) 
n
x
  f ( x)  dx

43
Interpretation of distribution function

The surface under the curve between a and b is the
probability that the value of the random variable is between a
and b :
b
P( X  [a, b])    ( x)  dx
a
a b
IAE University of Toulouse 2010-2011
44
Central moments

The central moments (of order n): remove the mean μ

CM n ( X )   ( x   ) n  f ( x)  dx


The variance (n=2), characterises the amplituded around the mean:


  
V ( x)   ( x   ) 2 f ( x)dx  E  x     E x 2   2   2
2


Standard Deviation = √ variance,
IAE University of Toulouse 2010-2011
45
Central moments
Skewness (n=3), describes the asymmetry:

 (X ) 
3
(
x


)
f ( x)dx


3
Kurtosis (n=4), describes the effects of «fat» tails:

 (X ) 
4
(
x


)
f ( x)dx



4
 (normal law )  3
δ<3 : distribution platykurtic
δ >3 : distribution leptokurtic
IAE University of Toulouse 2010-2011
46
Skewness & kurtosis
Asymmetry: skewness
IAE University of Toulouse 2010-2011
Fat tails: kurtosis
47
Meaning of “fat tails”

Represents a high probability of extreme events.





Catastrophic market crashes (1927, 1987)
Money lost is more than ½ of all money lost in the next 20 years
Catastrophic earthquakes (Chile 1960 9.5R, Sumatra 2004 9.1R)
Energy released is more than ½ of total energy released by crust
Such events are characterised by


Very low probability
Very high impact
IAE University of Toulouse 2010-2011
48
Examples of “fat tails”

Fat tails means that the extreme-event probability is low, but much
higher than we expect !
IAE University of Toulouse 2010-2011
49
Variance of a distribution

Small variance = large certainty

All distributions look the same
when variance → 0

Graph opposite:



Lognormal vs Normal
variance=0.01
Which is which ?
IAE University of Toulouse 2010-2011
50
Distribution vs cumulative

Some important properties
F ()  1
f(x)
F(x)
F ()  0
X

Definition F ( X ) 

f (U )dU
or f ( X ) 

dF ( X )
and
dX
F ( X )  [0,1]


Distribution function is normalized:  dx  f (x)  1


Cumulative is between 0 and 1, always increasing
IAE University of Toulouse 2010-2011
51
Some important properties

Integral of the distribution: probability that the random
variable will be less than a certain value
x
F ( x) 
 f (s)ds


Probability that the random variable is between two values:
B
F ( B)  F ( A)   f ( x)  dx  P ( A  X  B )
A
IAE University of Toulouse 2010-2011
52
Sampling from a distribution





This is an important application of cumulative functions
Problem: generate random variables from specific distribution
Matlab, Excel,… provide the uniform random number generator
This selects uniformly a number between 0 and 1
We use the inverse cumulative function of the distribution
Pseudo code
• Draw a uniform random number in [0,1]
• Pass it through the InvCum of the
required distribution
• Result is a number sampled from the
required distribution
IAE University of Toulouse 2010-2011
53
Use of distributions in finance

Financial derivatives require us to calculate the
expectation of a function of a random variable
derivative  E[ g ( X )]   g ( X )   ( x)  dx

Example: a Call option

Call  E[max ST  K ,0]   max ST  K ,0   ( ST )  dST
0
where φ(ST) is the distribution function of the final spot
IAE University of Toulouse 2010-2011
54
Normal Distribution

Normal Distribution N(µ,)
 = mean
= standard deviation

Special case: µ = 0 and  = 1 denoted N(0,1)
IAE University of Toulouse 2010-2011
55
Normal Distribution
Exercise :



What are (i) the mean and (ii) the standard deviation of the
index EUROSTOXX50, if we suppose that it follows a law
a+bX where X follows a centered normal distribution (a and b
are 2 constants) ?
Calculate the mathematical expectation of eaX where X
follows a centered normal distribution
Calculate the expectation of S=e(r-q-²/2)T+x √T where X follows
a centered normal distribution
IAE University of Toulouse 2010-2011
56
Log-normal Distribution

Very important in finance

Increments in stock prices are modeled as lognormal

If X follows a normal law X~N(µ,),

Then Y=eX is distributed log-normally.

Relations between the function of X and Y, related by X = f(Y):
X
f y (Y )dY  f x ( X )dX  f y (Y )  f x ( X )
Y
f (Y )
f y (Y )  f x ( f (Y ))
Y
IAE University of Toulouse 2010-2011
Exercise: recover the LogNormal distribution law
57
Log-normal Distribution
Starting from a normal distribution for X
1
f x ( X ; , ) 
e
 2
(x -  )²
2 ²
We find the log-normal law for Y=eX
f y (Y ;  ,  ) 
1
Y 2
e
-
(ln(Y)-  )²
2 ²
Exercise: Calculate the mean and variance of a
log-normal function with parameters μ, σ
IAE University of Toulouse 2010-2011
58
Central Limit Theorem

This theorem is the reason why normal
distributions are present so often!

The sum of N independent, identically distributed
random numbers is normally distributed



The N numbers do not have to be normally distributed!
N numbers, x1,…, xN each with mean m, variance s
The random variable x1+ x2 …+ xN follows

y  N m 2

1
Proby  x1    x N  
e
2N s
IAE University of Toulouse 2010-2011
2 Ns 2
59
Central Limit Theorem at work

For N = 5, 20, 100



Sample N random variables from some distribution (here lognormal) and
sum them: x1+…+ xN
For each N, repeat many times and plot histogram
Observations:


For small N, only central region looks normally distributed !
For large N, the sum resembles the normal distribution very well
IAE University of Toulouse 2010-2011
60
Sum of lognormal variables

Because of the Central Limit Theorem


A sum of normal variables is normal
A sum of lognormal variables is not lognormal

In finance however we often approximate a sum of
lognormal variables by a lognormal

This approximation is not bad provided the number
of summed variables is small.
IAE University of Toulouse 2010-2011
61
Commutation of integration & differentiation

The order of integration and differentiation can be interchanged


dz  f  x, z    dz 
f  x, z 

x
x

Example: the derivative of a call with respect to strike

 

Emax ST  K ,0   E 
max ST  K ,0 
K
 K


since the expectation is simply an integral

Emax ST  K ,0   dST   ( ST )  max ST  K ,0
0
IAE University of Toulouse 2010-2011
62
Commutation of integration & differentiation


We can use this trick to compute moments of a distribution
Example, 2nd moment of a central normal distribution:
  21 2   x 2
e
 e
2
dx


x

lim
dx

  2 2



 1
  2 
2 




1 2
x
2 2




1
2

2 
 









x 2

e
 lim
dx

2
 1  

2 
 

1


  2 2

  2 2 
  12
2

  2 lim
 - lim

 1  


1


  
 2
IAE University of Toulouse 2010-2011
63
Commutation of expectation in a function
?
f Ex  E f x 

Which is bigger?

Denote x0  Ex and Taylor expand f(x) around x0
1
f ( x)  f ( x0 )  ( x  x0 ) f ( x0 )  ( x  x0 ) 2 f ( x0 )  
2

Apply the expectation


1
E f ( x)  f ( x0 )  E( x  x0 ) f ( x0 )  E ( x  x0 ) 2 f ( x0 )  
 
2
 f  E  x ) 
 E  x  x0  0

If
f ( x)  0
then
E f x  f Ex

If
f ( x)  0
then
E f x  f Ex
IAE University of Toulouse 2010-2011
64
Relation between mean and variance

Variance in terms of simple expectations Var[x] = E[x2]-E2[x]

Derivation:

Var  X   E  X  EX 
2



 EX  2  EX  EX   E X 
 EX  E X 
 E X 2  2  X  EX   E 2 X 
2
2
2
2
IAE University of Toulouse 2010-2011
65
Basic notions of VBA Excel
IAE University of Toulouse 2010-2011
66
Basic notions of VBA Excel

Enter the VBA environment : Alt+F11
IAE University of Toulouse 2010-2011
67
Basic notions of VBA Excel

Header
Option Explicit
Option Base 1

Create a VBA function
Function GetDelta(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer)
Dim delta As Long
delta = b * b - 4 * a * c
GetDelta = delta
End Function

Declare a variable
Dim nom_variable As type_variable (double, long, string, Range…)
IAE University of Toulouse 2010-2011
68
Basic notions of VBA Excel

Create a VBA macro
Sub SommeDeuxValeurs()
'declaration
Dim nb1 As Integer
Dim nb2 As Integer
Dim somme As Long
'Lecture
nb1 = InputBox("nbre 1")
nb2 = InputBox("nbre 2")
'Traitement
somme = nb1 + nb2
'Affichage
MsgBox "La somme est " & somme
End Sub
IAE University of Toulouse 2010-2011
69
Basic notions of VBA Excel

Loops “For ... To ... Next”
Function GetFactoriel(ByVal a As Integer)
Dim fact As Long
Dim i As Integer
fact = 1
For i = 1 To a
fact = fact * i
Next i
GetFactoriel = fact
End Function
IAE University of Toulouse 2010-2011
70
Basic notions of VBA Excel

Tests “If ... Then ... Else”
Function EstPositif(ByVal a As Double)
If a > 0 Then
EstPositif = 1
ElseIf a < 0 Then
EstPositif = -1
Else
EstPositif = 0
End If
End Function
IAE University of Toulouse 2010-2011
71
Basic notions of VBA Excel

Some useful functions
In Excel
In VBA Excel
•ALEA()
• Rnd
•LOI.NORMALE.STANDARD( x )
•NormaleCumul(x) (faite maison)
•LOI.NORMALE.INVERSE(x ;0;1)
•Application.WorksheetFunction.No
rmSInv( x )

Tracer l’histogramme d’une distribution:

Utiliser la fonction « frequence » dans Excel
IAE University of Toulouse 2010-2011
72
Numerical methods in finance:
some background history
IAE University of Toulouse 2010-2011
73
Brownian Motion
Robert Bown (botanist)


Observed motion of pollen
particles suspended in water
(1827).
IAE University of Toulouse 2010-2011
74
Stochastic methods in finance

Louis Bachelier (1870 – 1946)

Considered as the founding father
of financial mathematics.

Was the first to have applied
mathematical models to the
analysis of financial markets

Stock prices evolve according to
Brownian motion
IAE University of Toulouse 2010-2011
75
Models for Brownian Motion

Thorvald N. Thiele (1880), was the first to
propose a mathematical theory to explain
Brownian motion


Danish astronomer
Founder of an insurance company

Louis Bachelier (1900) used Brownian motion
in his thesis « La théorie de la spéculation » to
describe stock prices

Albert Einstein (1905) makes a statistical
theory that explains Brownian motion and
allows predictions
IAE University of Toulouse 2010-2011
76
Why Brownian motion in finance?


Paths resemble stock market indices
Problem: Brownian motion can turn negative !
IAE University of Toulouse 2010-2011
77
How to model Brownian motion?

Brownian motion is stochastic process (=sequence of r.v.)


Main properties:




W(0), W(1), W(2), ...
W(0) = 0
The increments W(2)-W(1), W(3)-W(2),...
are independent of each other
The increments W(t)-W(s) are normally distributed N(0,√(t-s) )
This is also called


Wiener process
Standard Brownian motion
IAE University of Toulouse 2010-2011
78
Brownian motion: an example

Bob finishes his job at 5pm and before going
home he makes a stop at the bar

There he drinks a bit more than he should

He leaves the bar at 8pm and usually (after
some zig-zags) arrives home at midnight

His home is just 500m away

This means he proceeds towards home with an
average speed of 0.5/4 = 0.125 km/hr

His friends observed that at 10pm he is on
average 100m away from the straight line
connecting the bar to his house
IAE University of Toulouse 2010-2011
79
Brownian motion: an example


Notation: Xt position at time t
T=24hr t0=21hr Xt0=X0=0
Random-walk model:


X t  X t0    t    Wt

EX t     t

Position at next step Xt+1 given
position at previous step Xt


X t 1  X t    t    Wt

Bob takes first step:
Randomness comes through the
increment ΔWt ~N(0,t)

μ in this model is average speed
μ = 0.125 km/hr
  
E X t2  E  2t 2   2Wt 2  2t  Wt

  2t 2   2  t
 E 2 X t    2  t
What is the meaning of μ and σ?
1
t
 2  Var  X t 


Small σ: random walk is confined
Large σ: random walk can make big jumps
IAE University of Toulouse 2010-2011
80
Brownian motion: an example


After several steps Bob arrives
home

We are facing a problem:

What is the meaning of an integral
over a stochastic differential ?

Stochastic calculus
The model describes his random
walk as
N
N
N
i 0
i 0
i 0
N
N
N
i 0
i 0
i 0
X T   X ti     (ti 1  ti )     (Wi 1  Wi )
  X ti     ti     Wi 1

In the limit Δt→0:
N
T
T
i 0
t0
t0
X T   X ti     dt     dWt
IAE University of Toulouse 2010-2011
81
Stochastic calculus in mathematical finance

Kiyoshi Itô (1940s) develops stochastic calculus
t

Itô integral :  H ( s) dW ( s)
0
with stochastic differential dW

Itô’s lemma: differentiation of stochastic functions

Robert Merton (1969) introduces stochastic calculus
in finance to explain the price of financial products

S ~ eW(t) >0 : The value of an underlying stays
always positive!
IAE University of Toulouse 2010-2011
82
Option pricing with stochastic calculus

Robert Merton, Fisher Black & Myron Scholes
published the famous work on option pricing (1973)



The model allows to derive analytic expression for the fair
price of call and put options
A significant contribution to the growth of derivatives
Merton and Scholes receive the Nobel price of economics
1997 (F. Black had died in 1995)
IAE University of Toulouse 2010-2011
83
Stochastic integral
b

Definition:
 g (W )  dW
t
a
t
 lim
N 
N
 g (W )  W
i 0
t
t 1
 Wt 

A useful property: The mean of a stochastic integral is zero

Derivation
N


N

E  lim  g (Wt )  Wt 1  Wt   lim E  g (Wt )  EWt 1  Wt 
 N  i  0
 N   i  0

N

 lim E  g (Wt )  0  0
N 
 i 0

IAE University of Toulouse 2010-2011
Independents
increments
Mean of N(0,1)=0
84
The Black & Scholes model
IAE University of Toulouse 2010-2011
85
The Black-Scholes model
Cartoon by S Harris
IAE University of Toulouse 2010-2011
86
The Black & Scholes model

Simple brownian motion


Black & Scholes model


dS = S ·μ · dt + S · σ· dW
S : value of underlying


dS = σ· dW
stock, foreign exchange rate, etc
µ : drift


the price of risk-free interest rate – annualised dividend: r-q
Domestic minus foreign interest risk-free rates: rdom-rfor

σ : volatility (annualised)

t : time (expressed in years)

W: Wiener process (Brownian)
IAE University of Toulouse 2010-2011
(Equity)
(Forex)
87
The Black & Scholes model
Differential equation of Black & Scholes
dS
  dt   dW
S
dS
S
}  dW
µ
}
 dt
Itô calculus
dt
Solution of the differential equation of Black & Scholes
S (t )  S (0) e
²




 t  W (t )
2 

Random variable, distributed according
to a ofnormal
of 0 mean & variance t
IAE University
Toulouse distribution
2010-2011
88
The three forms of the B&S model

Stochastic differential equation
dS
 r dt   dW
S

Solution of the stochastic differential equation
S (t )  S (0) e

 ²
 r   t  W (t )
2 

Partial differential equation governing the evolution of the price
of a derivative (pricing equation)
V 1 2 2  2V
V
  S
 rS
 rV  0
2
t 2
S
S
IAE University of Toulouse 2010-2011
89
Itô’s Lemma


Itô’s process:

x solution of dx=a(x,t) dt + b(x,t) dW
Consider a function G(x,t):
2

G

G
1

G 2

dG ( x, t ) 
dx 
dt 
dx
2
x
t
2 x
Additional term from
stochastic calculus
dx² = [a(x,t) dt + b(x,t) dW]2= ??
Some properties in differential stochastic calculus:
 dt . dt = 0
 dW . dt = 0
 dW . dW=dt


 G
G 1  2G 2 
G


dG( x, t )  
a

b dt 
b  dW
2

x

t
2

x

x


IAE University of Toulouse 2010-2011
90
Itô’s Lemma
Exercise:
Black-Scholes
d S   S dt   S dW
What is the differential of ln(S) ?

d (ln S )  ?
What is the value of S(T) ?
IAE University of Toulouse 2010-2011
91
Derivation of the Black-Scholes PDE

Composition of portfolio:




We adjust the amount  such that the portfolio is not sensitive to risk (such
as small random movements of the underlying)
Putting it together, the portfolio P consists of:


1 option of value V(S,t)
An amount Δ of the underlying
P=V+S
The variation of the portfolio after an very small amount of time is
dP = dV +  dS
With

dS = (r – q) S dt +  S dw


(differential equation of B&S)
V
V
1  2V
2
dV 
dt 
dS   2 dS 
t
S
2 S
Classic differential
calculus
Additional term in stochastic
differential calculus
IAE University of Toulouse 2010-2011
92
Derivation of the Black-Scholes PDE


•
Some useful rules of the stochastic differential calculus
 dt · dt = 0
 dW · dt = 0
 dW · dW=dt
(dS)² = ?
 dS · dS = [µ S dt +  S dw] · [µ S dt +  S dw]
= ² S² dt
We arrive at the variation of our portfolio P:

V
V
1  2V 2 2
dP 
dt 
dS   2  S dt  dS
t
S
2 S
IAE University of Toulouse 2010-2011
93
Derivation of the Black-Scholes PDE
V
V
1  2V 2 2
dP 
dt 
dS   2  S dt  dS
t
S
2 S
•
•
We suppress all sources of risk (risk=randomness) of the
underlying (dS):

 « delta » of an option
V
V
 0  
S
S
We arrive at the variation of the portfolio P
 The remaining portfolio contains more sources of risk: it must
evolve as money placed into a "safe" savings account with
interest rate r
V
1  2V 2 2
V
dP 
dt   2  S dt  r  P  dt  r  (V 
S )  dt
t
2 S
S
PDE of Black-Scholes
IAE University of Toulouse 2010-2011
94
Solution of the Black & Scholes model

Call and Put options
c  S 0 e  qT N (d1 )  K e  rT N (d 2 )
pKe
 rT
N (d 2 )  S 0 e
 qT
N (d1 )
ln( S 0 / K )  (r  q   2 / 2)T
where d1 
 T
ln( S 0 / K )  (r  q   2 / 2)T
d2 
 d1   T
 T
IAE University of Toulouse 2010-2011
95
Derivation of the Call price for the Black-Scholes
model
 At maturity, the call value is g(S ) = max(0,S -K) ≡ (S -K)
T

T
 rT
E g ( ST )  e
 rT


S
( ST )  g ( ST )  dST


ST: spot
K: strike
e-rT: Discount factor
φS(ST): Distribution function of the random variable ST
The assumed process for the random variable ST
d S   S dt   S dW

+
Call price: expectation of the payoff, discounted to the
value of today
Call  e

T
has solution
ST  S 0  e
   T 
1
2
2
TX
where X a normal random variable (mean 0, variance 1)
X (X ) 
e
rT
1
 X2
1
e 2
2

 
 Call  E g ( ST ( X )) 


X
( X )  g ( ST ( X ))  dX
IAE University of Toulouse 2010-2011
96
Derivation of Black-Scholes call price
e
rT


 Call  E g ( ST ( X )) 
S 0  e  0.5 T 
2
e
rT
e

1
 X2
2

 S 0  e  0.5 T 
2
TX

TX
1
2
 Call 
S 0  e  0.5 T
2
K
  dX

K
ln      0.5   2 T
S 
K 0 X   0 
 T
2


1
2

e
k


k e
1
 X2
2
k

 S 0  e  0.5 T 
1
 X 2 
2

2
TX
 dX 
1
2
A
TX

K
k e
  dX
1
 X2
2

K .dX
B
IAE University of Toulouse 2010-2011
97
The easy part:
B

1
2
k e


1 2
X
2
K .dX  K    X dX  K  N ()  N (k )
 K  1  N (k )  K  N (k )
k
The more difficult part:
S 0  e  0.5 T
2
A
2

k e

1
 X 2 
2
TX
 dX
z
We would like to bring this to an integral of the form
 dU e
1
 U2
2

Most common way to do this is:
« Complete the square » 
A
S 0  e T
2



e
1 2
1
1
1
1
2
X   T X    X   T    2T   U 2   2T

2
2 
2
2
2
 

U2
1
 U2
2
k  T

 N (
 dU  S 0  e T  N ()  N (k   T )

 S 0  e T  1  N (k   T )  S 0  e T
IAE University of Toulouse 2010-2011
T k)


98
Finaly the value of the Call:
Call  e  rT  A  B   S0  e  qT  N ( T  k )  Ke r T  N (k )
Equivalently, in the standard notation:
Call  S0  e  qT  N (d1 )  Ke r T  N (d 2 )
ln( S 0 / K )  (r  q   2 / 2)T
where d1   T  k 
 T
ln( S 0 / K )  (r  q   2 / 2)T
d 2  k 
 d1   T
 T
Exercise: calculate the price of a « digital » option
(it pays at maturity 1 unit of underlying if ST>K)
IAE University of Toulouse 2010-2011
99
Interpretation of the Black-Scholes formula
C e
 qT
 S  N (d1 )  e
 r T
 K  N (d 2 )

N(d2): probability that spot finishes in the money

N(d1): measures how far in the money the spot is
expected to be if it finishes in the money

Call price:
value of receiving the stock in the event of exercise
minus cost of paying the strike price
IAE University of Toulouse 2010-2011
100
Black-Scholes and risk-neutrality

The Black-Scholes formula
C e


 qT
 S  N (d1 )  e
 r T
 K  N (d 2 )
depends on the Spot, Volatility, Interest-rates and time.
None of these parameters involves the risk-preference of the
investor.
Therefore, the B&S formula does not depend on any
assumption about the risk-preferences of the investors
IAE University of Toulouse 2010-2011
101
Assumptions of the B&S model

More Important




Underlying evolves according to a lognormal process
Volatility (→ size of fluctuations) is constant and known
No arbitrage opportunities exist
Less important



No dividends
No transaction costs
Risk-free rates are constant
IAE University of Toulouse 2010-2011
102
How realistic are the assumptions of the B&S model ?







In real markets the size of the fluctuations is not constant
The underlying can make big jumps on some economic news
Calculating the volatility is not trivial
The process of the underlying is typically not lognormal
Interest rates are not constant
All assumptions are wrong in reality !
They are made only to simplify the calculations
IAE University of Toulouse 2010-2011
103
Call-Put parity relation

Call-Put =
= S·e-qT-K·e-rT =(F-K)·e-rT

The price of a call is linked to the price of a put
through the forward
IAE University of Toulouse 2010-2011
104
The Black & Scholes model

Solution of the Black-Scholes model for the
price of a call/put with barrier


Barrier « in » : the option is activated only if the
barrier is touched
Barrier « out » : the option is dead if the barrier is
touched
IAE University of Toulouse 2010-2011
105
The Black & Scholes model

Solution of the Black-Scholes model for the
price of a call/put with barrier


Barrier « up » : the barrier must be touched while the
spot rises
Barrier « down » : the barrier must be touched while
the spot declines
Call / Put, in / out, up / down  8 possible combinations
IAE University of Toulouse 2010-2011
106
The Black & Scholes model

Parity relations:
c = cui + cuo
c = cdi + cdo
p = pui + puo
p = pdi + pdo
IAE University of Toulouse 2010-2011
107
The Black & Scholes model

Price of barrier options
IAE University of Toulouse 2010-2011
108
The Black & Scholes model

Price of « touch » options
y1 

 S  ( r  q  
ln H
ln( S0 / K )  (r  q   2 / 2)T
d2 
 T
/ 2)T
 T
One-Touch Up with So<H
2  2 
H
term1   
 So 
term2  N (d 2 )

2

 N  y1   T

One-Touch Down with So>H
2   2 

H
term1   
 N y1   T
S
 o
term2  N (d 2 )
Pr ice  e  rT term1  term2 

IAE University of Toulouse 2010-2011
109
Important identities in the B&S model (1)


d1
d2
d 2
d

and
 1




Derivation:
 S

 ln    r  q  12  2 T 
d1
  K



  
 T




 S

(T )  ( T )  T  ln    r  q  12  2 T 
 K


2
 T






 S

 ln    r  q  12  2 T 
1
K
   d2
   



 T






IAE University of Toulouse 2010-2011
110
Important identities in the B&S model (2)

d1
T

r


Derivation
d1
T
d 2
T

d
T
2

and
and similarly
and


q

q

r

 S

 ln    r  q  12  2 T 
d1    K 



r r 
 T






T
 T


T

IAE University of Toulouse 2010-2011
111
Important identities in the B&S model (3)




S0  e
 qT
 n(d1 )  K  e
 rT
1  12 d 2
e
 n(d 2 ) where n(d ) 
and n(d )  N (d )
2
Derivation
S0  e  qT n(d 2 )
1 2
 S0 
2


ln

(
r

q
)
T


d

d


2
1
We will show that
K  e rT n(d1 )
2
K


Start from right-hand side  1 d 22  d12    1 d 2  d1 d 2  d1 
2
2
1  ln
  
2
  r  q 
S0
K
  
1
2
 2 T  ln SK   r  q  12  2 T 


 T

0

 ln SK0  r  q  12  2 T  ln
 
 T

S 
 ln  0   r  q T
K
IAE University of Toulouse 2010-2011
  r  q 
S0
K
1
2
 2 T 
112



The Greek Letters




P
Delta :  
S
 2 P 
Gamma :   2 
S
S
P
Vega :  

The most
important
quantity for
the daily
management
of the trading
books
P
Theta :  
t
IAE University of Toulouse 2010-2011
113
The Greek Letters

They represent sensitivities of the portfolio with
respect to market parameters

They allow us to monitor the risk of the portfolio

They can be applied to a single derivative or to a
portfolio of derivatives
IAE University of Toulouse 2010-2011
114
Greeks
Analytic expressions for the Greeks (here for a Call):

  e  qT N (d1 )
N’(x) =(x)
 qT

N
(
d
)
e
1
 
S o T

  So
 qT

T N (d1 )e
probability density of a
normal random variable
 qT

So N (d1 ) e
  
 qSo N (d1 )e qT  rK N (d 2 )e rT
2 T
IAE University of Toulouse 2010-2011
115
Demonstration: Delta
 Call
 Put
 e  rT N (d1 )
 e  qT N (d1 ) and  
S 0
S 0



Derivation:  Call   S  e qT  N d   K  e rT  N d 
0
1
2
S 0
S 0
 e  qT  N d1   S 0  e  qT

Now use the fact that
N (d1, 2 )
S 0
N (d1, 2 ) d1, 2


d1, 2
S 0
N d1 
N d 2 
 K  e  rT
S 0
S 0
d1 d 2
1 2d 2

N
(
d
)
1
,
2
and
n( d ) 
e

 n(d1, 2 ) and

S

S
2

d1, 2
0
0
1

 qT
 rT
And also the identity we proved: S 0  e  n(d1 )  K  e  n(d 2 )

to eliminate the two right-most terms and obtain the result
IAE University of Toulouse 2010-2011
116
Example


A bank has sold
 European call option for $300,000
 on 100,000 shares
 of a non-dividend paying stock
Market parameters are
S0 = 49
K = 50
r = 5%


 = 20%,
T = 20 weeks
The Black-Scholes value of the option is $240,000
How does the bank hedge its risk to lock in a $60,000 profit?
IAE University of Toulouse 2010-2011
117
Naked & Covered Positions

Naked position
Take no action

Covered position
Buy 100,000 shares today

Both strategies leave the bank exposed to
significant risk
IAE University of Toulouse 2010-2011
118
Delta

Delta () is the rate of change of the option price with
respect to the underlying


Delta small → option price does not move when spot moves
Delta large → option price moves when spot moves
Option
price
Slope = 
B
A
Stock price
IAE University of Toulouse 2010-2011
119
Delta: an important interpretation


 qT
Remember:   e N (d1 )
What does N(d1) mean?

To answer this: calculate
probability that spot finishes in
the money:

Example: A call with
delta=50% has roughly
probability=50% that its stock
price will exceed the strike at
maturity.

ProbST  K    dx   ( x)  Indicator ST  K 

  r  12 2 T 

  dx   ( x)  Indicator  S 0 e 







 K


d1
 dx   ( x)   dx   ( x)  N (d )
1
 d1
where
Tx

1 if x  0
Indicator( x)  
 0 if x  0
1  12 x 2
 ( x) 
e
2
IAE University of Toulouse 2010-2011
120
Delta Hedging

This involves maintaining a delta neutral portfolio
 Delta neutral: 0


This means that if the spot makes a small change the value of
the portfolio does not change
Eliminates spot risk

Delta hedging is done by buying/selling the underlying (e.g.
cash or stocks)

Black-Scholes theory shows


that a Delta-neutral portfolio is possible
what is the correct amount of the underlying to short
IAE University of Toulouse 2010-2011
121
Delta: an example

Call option with:

Premium 400€
Delta 50%
Spot today is at S0=100

This means that





If spot moves to S0=110 (10% move)
The premium will move to 420€ (10%·50% move)
(with all other market parameters unchanged)
IAE University of Toulouse 2010-2011
122
Theta

Theta () is the change in value of the derivative
with respect to the passage of time

The theta of a call or put is usually negative.


meaning: as time passes the value of the option decreases
Practically, change in time is 1 day.
IAE University of Toulouse 2010-2011
123
Theta: an example

Call option which today is worth:

Premium 20€
Theta -0.5

This means that



tomorrow the premium goes to 19.5€
(with all other market parameters unchanged)
IAE University of Toulouse 2010-2011
124
Gamma

Gamma () is the rate of change of delta () with respect to
the price of the underlying asset



Gamma neutral hedge:



Gamma is small → Delta is stable under spot movements
Gamma is large → Delta is not stable under spot movements
portfolio and Delta are stable under spot movements.
better hedge than simple Delta-neutral (but more expensive!)
Gamma is the second derivative of the derivative value with
respect to the underlying price
IAE University of Toulouse 2010-2011
125
Interpretation of Gamma

Gamma Addresses Delta Hedging Errors Caused
By Curvature
Call
price
C''
C'
C
Stock price
S
S'
IAE University of Toulouse 2010-2011
126
Relationship Between Delta, Gamma, and Theta
For a portfolio of derivatives on a stock
paying a continuous dividend yield at rate q
1 2 2
  (r  q ) S   S   r
2
IAE University of Toulouse 2010-2011
127
Vega


Vega (n) represents the change in value of a
derivative with if market volatility moves by 1%
Vega tends to be greatest for options that are
close to the at-the-money

Risk that volatility can move the spot out of the money
IAE University of Toulouse 2010-2011
128
Vega: an example

Call option with

Premium 20€
Vega 0.5
Market Vol 20%

This means that




If market Vol goes to 21%
Premium goes to 20.5€
IAE University of Toulouse 2010-2011
129
Managing Delta, Gamma, & Vega


 can be changed by taking a position in the
underlying
To adjust  & n it is necessary to take a
position in an option or other derivative
IAE University of Toulouse 2010-2011
130
Spotladders: vanilla
Call option, strike 1.25
Price
Delta
0.6
Gamma
0.5
0.4
1
0.8
0.3
3.5
3
2.5
2
1.5
1
0.5
0
delta
price
1.2
0.6
0.6y
1y
0.2
0.4
0.1
0.2
spot
0
spot
0
0.8
1
1.2
1.4
1.6
0.6y
1y
1.8
0.8
1
1.2
1.4
1.6
1.8
gamma

0.6y
1y
spot
0.8
1
1.2
1.4
1.6
1.8
Vega



Option price becomes linear for large spots 0.00006
0.00005
0.00004
Delta ~ cumulative function
0.00003
Convexity risk (Gamma) highest at-the-money0.00002
0.00001
0
Vol risk (vega) is highest at-the-money
0.8
vega

IAE University of Toulouse 2010-2011
0.6y
1y
spot
1
1.2
1.4
1.6
131
1.8
Spotladders: barrier option
Knock-out option, strike 1.25, barrier 1.35
Price
0.6y
1y
spot
0.8
0.03
0.02
0.01
0
-0.01 0.8
-0.02
-0.03
-0.04
-0.05
-0.06
Gamma
0.4
delta
price
0.9
1
1.1
1.2
1.3
1.4
0.2
0.9
1
spot
1.1
1.2
1.3
0.6y
1y
0.6y
1y
0
-0.2
1 spot
0.8
1.2
-0.4
-0.6
Vega


Option price: 0 at barrier and out-of-the-money
Delta, Gamma, Vega can be negative unlike vanilla!
0.000004
0.000002
spot
0
-0.000002 0.8
-0.000004
vega
0.0045
0.004
0.0035
0.003
0.0025
0.002
0.0015
0.001
0.0005
0
Delta
gamma

1
1.2
0.6y
1y
-0.000006
-0.000008
IAE University of Toulouse 2010-2011
132
Rho

Rho is the rate of change of the value of a
derivative with respect to the interest rate
IAE University of Toulouse 2010-2011
133
A word on the « absence of
arbitrage
»
 Absence of Arbitrage (AOA)



Normally there can be no profit without taking a risk.
However, if an opportunity for riskless profit arises, the market
reacts immediately, and soon the opportunity disappears.
It is the basis of the Black-Scholes model

...and of most other derivative models.

This condition allows us to determine the
expectation of the underlying using « risk
neutrality »

An example …
IAE University of Toulouse 2010-2011
134
AOA: example on EURUSD

EURUSD = 1.3 = So (1 EUR equals 1.3 USD)
 1 EUR = underlying, USD payment currency
 I start with no money
 I borrow 1 EUR from a European bank, with 1 year maturity,
interest rate q. In one year I must pay back eqT (=1 + q T + …)
 I convert today my EUR to USD, I receive So USD
 I enter into a Forward contract (for free), allowing me to
change USD into EUR within a year, at a fixed rate Fo.
 I deposit So USD into an american bank with interest rate r.
After 1 year I receive: So erT

After 1 year, I will have gained (without taking any risk):
- eqT (money to pay back in european bank)
+ So erT / Fo (money I receive from american bank in EUR)

AOA implies that the forward contract has value Fo = So e(r-q)T
IAE University of Toulouse 2010-2011
135
Volatility « smile »
A practinioner’s introduction
IAE University of Toulouse 2010-2011
136
Black-Scholes vs market

BS-price < market-price, for very low / very high strikes
Plug market-price in BS formula to calculate volatility
Inverse calculation → “implied vol”
Do it for all strikes
Black-Scholes assumes that volatility is constant for all strikes!

Here we observe a parabolic-shape looking like a ☺


Call on EURUSD
80000
Smile
Black-Scholes
70000
15.00%
Black-Scholes
Market
60000
Market
14.50%
50000
40000
30000
14.00%
20000
Volatility

USD cash

13.50%
10000
0
1.2000
Strike
strike
1.2500
1.3000
1.3500
1.4000
1.4500
1.5000
1.5500
13.00%
1.2000
1.2500
IAE University of Toulouse 2010-2011
1.3000
1.3500
1.4000
1.4500
1.5000
1.5500
1.6000
137
Spot probability density (market)

Distribution of terminal spot (given
initial spot) obtained from
P
S
T
S0   e
r2 T
 2Call mkt

K 2
Market observable
Main causes:
Fat tails:
Market implies that the probability that the
spot visits low-spot values is higher than what
is implied by Black-Scholes
IAE University of Toulouse 2010-2011
•Spot dynamics is not lognormal
•Spot fluctuations (vol) are not
constant
138
Black-Scholes volatility smile

Historical data contradict Black-Scholes assumptions:




Extreme events appear more often than predicted by the lognormal
distribution
The volatility we observe is not constant
Jumps are observed in the evolution of prices
Black-Scholes is based on the idea of « risk neutral »


In reality the market is not risk neutral.
For stocks, it is « risk averse », it is ready to pay a significant
amount for a protection against a crash.
IAE University of Toulouse 2010-2011
139
Black-Scholes volatility smile
• Despite this, the Black-Scholes model is the standard
• To reflect the actual distribution of underlyings, we must
adapt the model
• the volatility is based on the strike of the option
change
equities
IAE University of Toulouse 2010-2011
140
Black-Scholes volatility smile
Reflect real-world distributions:

1)
2)
Use a "naive" model (BS, vol assumed constant) in
which the volatility is adapted according to the strike
of the option price
use more sophisticated models capable of
reproducing the realistic distributions
IAE University of Toulouse 2010-2011
141
Implied volatility


Traders often quote vols instead of prices
This means:
vol


price
Implied vol: the vol we must put into the BS pricer
to obtain the option price
It is not equivalent to historical vol:


BS pricer
measure of historical fluctuations
It does not give information about the dynamics
IAE University of Toulouse 2010-2011
142
Historical vs implied volatility

Historical Volatility:



2
h ist
1

N
 S
N
i 1
S
2
i
Represents the size of fluctuations in the process S
Implied Volatility:

Represents the price of a vanilla option today
IAE University of Toulouse 2010-2011
143
Measuring historical volatility




EURUSD
6-month data, closing of day
Historical vol = 5.2%
Implied vol in Apr2010 = 17%

Measuring historical vol is not
easy




Which data set do we take?
min, hourly, daily intervals?
How do we account for low/high?
Black-Scholes assumption on vol
is wrong:


Apr-Jun: high volatility
Oct-Nov: low volatility
IAE University of Toulouse 2010-2011
144
Some more sophisticated models




One way to correct the erroneous BS assumption is… to
consider that vol is not constant
Calculations are not as elegant and simple anymore
Two mainstream models

Local Volatility model
d S   S dt   ( S , t ) S dW


Volatility depends on the time
and spot
This model can reproduce the
smile
Stochastic Volatility model
d S   S dt  V S dW1

dV  k (V  V )dt   V dW2
 E dW dW   dt
1
2



Spot: Geometric Brownian motion
Vol: modeled as a stochastic
variable that returns to a long-term
mean value
IAE University of Toulouse 2010-2011
145
Local-vol vs Stochastic-vol

Dupire and Heston can reproduce the vanilla-smile perfectly
But can differ dramatically when pricing exotics!

Rule of thumb:



skewed smiles: use Local Vol
convex smiles: use Heston
IAE University of Toulouse 2010-2011
146
Numerical methods
IAE University of Toulouse 2010-2011
147
Models, numerical methods and payouts

Payout


Model


describes the derivative product, the rights and obligations
of the owner and of the issuer (no maths!).
Assumptions concerning the evolution of the underlying in
the market
Numerical method

The way of calculating the price of the payout, depending
on the chosen model
IAE University of Toulouse 2010-2011
148
Models, numerical methods and payouts
Models :
Black-Scholes
Stochastic Vol
Local Vol
Jump Diffusion
…
Payout :
Call, Put, barriers,
european, american
Callable, touch …
Numerical methods:
analytic solution
Static replication
Binomial tree
Monte Carlo
Finite differences
A model associated with a
numerical method allows us to
give the price of a payout
(derivative product)
…
IAE University of Toulouse 2010-2011
149
Numerical methods

Analytic solution:





Very fast
« Exact » result
Very easy to implement
Exists only for a few payouts, with some models
Monte Carlo







Relatively easy to implement
Can be applied practically on all payouts, with all models
Can be applied on payouts with several underlyings
Easy to parallelize computations
Slow
More difficult to implement on options with American exercise
Calculation of greeks is not easy
IAE University of Toulouse 2010-2011
150
Numerical methods

Binomial Tree (or trinomial):



Relatively easy to implement
Exists for many payouts (barriers), with only some models
Partial differential equation (PDE) grid

Can be applied on many payouts, with most models





limited to 2-3 underlyings
Very stable for the calculation of the greeks
Fast
Difficult to parallelise computations
Relatively difficult to implement
IAE University of Toulouse 2010-2011
151
Binomial Trees

Binomial trees are frequently used to
approximate the movements of an underlying

In each small interval of time the stock price can


move up by a proportional amount u
move down by a proportional amount d
IAE University of Toulouse 2010-2011
152
Binomial Trees


We discretise time in small steps
At each time step the underlying can only have two
possibilities :


Increase by a factor « u » (>1)
Decrease by a factor « d » (<1)
IAE University of Toulouse 2010-2011
153
Movements in Time t
Su
S
u
So
S
Sd
S
d
So
t
p = probability that underlying increases
p, u, d ?
1-p = probability that underlying decreases
IAE University of Toulouse 2010-2011
154
« Risk Neutral » Pricing

Implies that on average an underlying evolves
according to the risk-free interest rate (=savings
account) of the currency on which it is expressed:

If we know the value of the underlying today S(t)=So

The expected value at a future time t+t is
E[S(t+t)] = So e(r-q)t


r is the interest rate of the currency of the underlying
q is the divident rate (for stocks), or,
the interest rate of currency 1 (for Forex)
IAE University of Toulouse 2010-2011
155
1. Tree Parameters for asset paying a dividend yield of q
Parameters p, u, and d are chosen so that the tree
gives correct values for the mean & variance of the
stock price changes in a risk-neutral world
Mean:
E[S/So]=e(r-q)t = pu + (1– p )d
 p
e
( r  q ) t
d
ud
IAE University of Toulouse 2010-2011
Eq.1
156
Variance:
Var[S/So]=?
S  So
dS
 (r  q ) dt   dW approx.
 (r  q)t   (W  Wo )
S
So
Variance=²t
S
 1  (r  q)t   (W  Wo )
So
 S 
S 
var    E  
 So 
 So 
2
   S 
   E  
   So  
2
Eq.2
Var 2t = pu2 + (1– p )d 2 – e2(r-q)t
A further condition often imposed is u = 1/ d
Eq.3
IAE University of Toulouse 2010-2011
157
2. Tree Parameters for asset paying a dividend yield of q
When t is small a solution to the equations is
u  e
t
d  e  t
ad
p
ud
a  e ( r  q ) t
IAE University of Toulouse 2010-2011
158
The Complete Tree
Maturity
S0u 3
S0u 2
S0u
S0
S0d
S0u
S0
S 0d
S0d 2
S0d 3
Today
S 0u 4
S0u 2
S0
S 0d 2
S 0d 4
IAE University of Toulouse 2010-2011
159
Backwards Induction

We know the value of the option at the final nodes

We work back through the tree using risk-neutral
valuation to calculate the value of the option at
each node, testing for early exercise when
appropriate
IAE University of Toulouse 2010-2011
160
Example: Put Option
S0 = 50; K = 50; r =10%;  = 40%;
T = 5 months = 0.4167;
t = 1 month = 0.0833
The parameters imply
u = 1.1224; d = 0.8909;
a = 1.0084; p = 0.5073
IAE University of Toulouse 2010-2011
161
Example (continued)
89.07
0.00
79.35
0.00
62.99
0.64
So
56.12
2.16
50.00
4.49
70.70
0.00
62.99
0.00
56.12
1.30
50.00
3.77
44.55
6.96
56.12
0.00
50.00
2.66
44.55
6.38
39.69
10.36
44.55
5.45
39.69
10.31
35.36
14.64
Stage 1 : complete the values of the underlying
(top box)
PutMax(0,K-S)
70.70
0.00
35.36
14.64
31.50
18.50
28.07
21.93
Stage 2 : Determine the value of the option at the end nodes
IAE University of Toulouse 2010-2011
162
Example (continued)

Step 3: Go through the whole tree from right to left by
completing the boxes on the bottom of each cell (option value)
2.66=(p x 0 + (1-p) x 5.45 ) x e-rt
IAE University of Toulouse 2010-2011
163
Calculation of Delta
Delta is calculated from the nodes at time t
2.16  6.96
Delta 
 0.41
56.12  44.55
IAE University of Toulouse 2010-2011
164
Calculation of Gamma
Gamma is calculated from the nodes at time 2t
0.64  3.77
3.77  10.36
1 
 0.24; 2 
 0.64
62.99  50
50  39.69
1   2
Gamma =
 0.03
11.65
IAE University of Toulouse 2010-2011
165
Calculation of Theta
Theta is calculated from the central nodes at
times 0 and 2t
3.77  4.49
Theta =
  4.3 per year
01667
.
or - 0.012 per calendar day
IAE University of Toulouse 2010-2011
166
Calculation of Vega




We can proceed as follows
Construct a new tree with a volatility of 41%
instead of 40%.
Value of option is 4.62
Vega is
4.62  4.49  013
.
per 1% change in volatility
IAE University of Toulouse 2010-2011
167
Options on Indices, Currencies, Futures
As with Black-Scholes:
 For options on stock indices, q equals the
dividend yield on the index
 For options on a foreign currency, q equals the
foreign risk-free rate
 For options on futures contracts q = r
IAE University of Toulouse 2010-2011
168
Alternative Binomial Tree
Instead of setting u = 1/d we can set each
of the 2 probabilities to 0.5 and
ue
( r  q  2 / 2 ) t   t
d e
( r  q  2 / 2 ) t  t
IAE University of Toulouse 2010-2011
169
Trinomial Tree
ue
 3 t
Su
d  1/ u
2

t
  1
 r   
pu 
2 
12 
2  6
2
pm 
3
2

t
  1
 r   
pd  
2 
12 
2  6
pu
S
IAE University of Toulouse 2010-2011
pm
S
pd
Sd
170
Time Dependent Parameters in a Binomial Tree


Making r or q a function of time does not affect the
geometry of the tree. The probabilities on the tree
become functions of time.
We can make  a function of time by making the
lengths of the time steps inversely proportional to
the variance rate.
IAE University of Toulouse 2010-2011
171
Pricing an american put with a binomial tree

« American » = the owner of the option has the right
to exercise at any moment before expiry (or, at
expiry).

Begin in the same way as for the european option
IAE University of Toulouse 2010-2011
172
Example American Put
89.07
0.00
79.35
0.00
62.99
0.64
S
56.12
2.16
o
50.00
4.49
70.70
0.00
62.99
0.00
56.12
1.30
50.00
3.77
44.55
6.96
56.12
0.00
50.00
2.66
44.55
6.38
39.69
10.36
44.55
5.45
39.69
10.31
35.36
14.64
35.36
14.64
PutMax(0,K-S)
70.70
0.00
31.50
18.50
Stage 1 : complete the values of the underlying
(top box)
Stage 2 : Determine the value of the option at the end nodes
assuming that the option was not exercised before
IAE University of Toulouse 2010-2011
28.07
21.93
173
Example American Call
If no immediate exercise
Value =(p x 0.69 + (1-p) x 0.43 ) x e-rt =0.55
2,19
0,69
If immediate exercise:
Call : Max(0,(2.06-1.5)) = 0.56
S
call Put
strike
volatility
r1
r2
1,5
c
1,5
20%
5%
3%
T
1
American
n
Nsteps
10
dt
u
d
a
p
phi
2,06
0,55
0.56
1,93
0,43
0,1
1,06528839
0,93871294
0,998002
0,46840882
1
IAE University of Toulouse 2010-2011
174
Example American Call
S
call Put
strike
volatility
r1
r2
1,5
c
1,5
20%
5%
3%
dt
u
d
a
p
phi
0,1
1,06528839
0,93871294
0,998002
0,46840882
1
T
1
2,33540186
2,33540186
American
y
0,83540186
0,83540186
Nsteps
10
2,65030595
1,15030595
2,4878765
0,9878765
2,19227195
2,19227195
0,69227195
0,69227195
2,05791405
0,55791405
1,93179055
0,43179055
1,81339679
0,31660783
1,70225904
0,2244334
1,59793259
0,1541648
1,5
0,10291859
1,40806941
0,05834495
1,32177298
0,02803347
1,2407654
0,0102576
Can occur for a call if r1 (q) >0
1,59793259
0,09793259
1,40806941
0,02135854
1,40806941
0
1,2407654
0
1,16472254
0
1,09334012
0
1,5
0
1,32177298
0
1,2407654
0,00465818
Immediate exercise more interesting
than keeping the option
1,702259037
0,202259037
1,5
0,04573508
1,32177298
0,00997456
1,16472254
0,0021754
1,9317906
0,4317906
1,70225904
0,20225904
1,5
0,06675155
1,32177298
0,01949579
0,69227195
1,81
0,31
1,59793259
0,11869566
1,40806941
0,03645986
2,19227195
1,93179055
0,43179055
1,70225904
0,20926664
1,5
0,08148539
2,487876496
0,987876496
2,0579141
0,5579141
1,81339679
0,31339679
1,59793259
0,13310696
1,40806941
0,04838689
Cells in red:
1,93179055
0,43179055
1,70225904
0,21690461
1,5
0,09311931
2,05791405
0,55791405
1,81339679
0,31339679
1,59793259
0,14448285
2,823340166
1,323340166
1,32177298
0
1,2407654
0
1,16472254
0
1,09334012
0
1,02633252
0
1,16472254
0
1,09334012
0
1,02633252
0
0,96343162
0
1,026332521
0
0,96343162
0
0,90438573
0
Can occur for a put if r2 (r) >0
0,90438573
0
0,84895859
0
IAE University of Toulouse 2010-2011
0,796928414
0
175
Demo binomial tree (american)
IAE University of Toulouse 2010-2011
176
Pricing of a KO put with binomial tree
KO Barrier
level = 1.5
IAE University of Toulouse 2010-2011
177
Demo binomial tree (Barrier)
IAE University of Toulouse 2010-2011
178
Monte Carlo Method
IAE University of Toulouse 2010-2011
179
Monte Carlo method
Cartoon by S Harris
IAE University of Toulouse 2010-2011
180
Monte Carlo


In most cases analytic formula is too hard to find
An practical alternative is pricing via simulations



We simulate the evolution of the underlying a large
number of times (~10000).
For every simulation we calculate the expected gain for
the owner of the option
Option price = (average of gains) x (disc-fact)
e-rT
IAE University of Toulouse 2010-2011
181
Monte Carlo

Each simulation describes a randomly chosen path
of the underlying

The name “Monte Carlo” comes from the
resemblance to casino games
IAE University of Toulouse 2010-2011
182
Monte Carlo method

It is a method for finding the average of a function
g of a random variable X:

We are interested in calculating integrals of the form:
b
G  Eg ( x)   g ( x)  f x   dx
a


where f(x) is the probability density of x in the interval [a,b]
Example

G  Ecall ( ST )   call ( ST )   ST   dST
0

where φ(ST) is the spot terminal density in the interval [0,∞]

call(ST) = max(ST-K,0)
IAE University of Toulouse 2010-2011
183
Monte Carlo method



Obtain estimator of G
by producing large number of realisations of x: (x1,x2…,xN).
1
Estimator g~N 
N
N
 g(x )
i 1
i
b

Theoretical mean Eg ( x)   g ( x)  f x   dx
a

The larger the N, the more accurate the estimator
IAE University of Toulouse 2010-2011
184
Monte Carlo method: an example






Calculate the mean of N lognormal
variables
Sample N lognormal variables
Sum them up
Repeat for various values of N
Small N: fluctuations
Large N: convergence to mean

How to sample at random a
lognormally-distributed variable
in Excel:



X = RAND()
Y = LOGINV(X,mean,std)
where mean=mean of Lognormal distrib.
where std=standard dev of Lognormal distrib.
IAE University of Toulouse 2010-2011
185
Monte Carlo Simulation and 

Calculate  by randomly sampling points in the
square?
Exercice
IAE University of Toulouse 2010-2011
186
Monte Carlo Simulation and Options
When used to value European stock options, Monte Carlo
simulation involves the following steps:
1. Simulate one path for the stock price in a risk neutral world
2. Calculate the payoff from the stock option
3. Repeat steps 1 and 2 many times to get many sample
payoffs
4. Calculate mean payoff
5. Discount mean payoff at risk free rate to get an estimate of
the value of the option
IAE University of Toulouse 2010-2011
187
Sampling Stock Price Movements

In a risk neutral world the process for a stock price is
 S dt  S dz
dS  

We can simulate a path by choosing time steps of length t and
using the discrete version of this
ˆ S t  S  t
S  
where  is a random sample from f(0,1)
=LOI.NORMALE.INVERSE(ALEA();0;1)
IAE University of Toulouse 2010-2011
188
An alternative approach
Often instead of using the BS stochastic differential
equation, we use its solution:

ˆ  / 2  t  
S (t  t )  S (t ) e
2
t
=LOI.NORMALE.INVERSE(ALEA();0;1)
•More accurate in most cases
•The options with a european payout require only one time step
IAE University of Toulouse 2010-2011
189
Extensions to several underlyings
When a derivative depends on several
underlying variables we can simulate paths for
each of them in a risk-neutral world to
calculate the values for the derivative
IAE University of Toulouse 2010-2011
190
Sampling from Normal Distribution

The simplest way to sample from f(0,1) :

Generate 12 random numbers between 0.0 & 1.0

use the Excel function alea() (=random())

Sum them up and subtract 6.0

Exercise: calculate the mean and the variance of
V=U1 + U2 … +U12 - 6
In Excel =LOI.NORMALE.INVERSE(ALEA();0;1)
gives a random sample from f(0,1)

IAE University of Toulouse 2010-2011
191
Example: pricing a call option

for i=1…N



Generate standard normal variable Ui
Set Si(T) = S(0) exp[ (r-½σ2)T+ σ √T Ui]
Set Calli = e-rT max(Si(T)-K,0)

Call = (Call1+…+ CallN)/N

Exercise: show that this converges to the result
given by the Black-Scholes formula
IAE University of Toulouse 2010-2011
192
Confidence interval

Calculate the standard deviation of the Monte Carlo result
SD 


1 N
Result i - Average 2

N i 1
For a 95% confidence interval find zδ/2=Ninv(1-δ/2) with δ=5%
 Ninv is the inverse cumulative normal function
 95% confidence interval means δ=5% and zδ/2=1.96
The confidence interval is within the values


Average - zδ/2 · SD/√n
Average + zδ/2 · SD/√n
IAE University of Toulouse 2010-2011
193
Obtain two correlated Normal Samples

Obtain independent normal samples x1 and x2 and set
1  x1
 2  x1  x2 1   2


A procedure known as Cholesky’s decomposition
ρ=[-1…1] measures correlation:



ρ=1 then ε1= ε2
ρ=0 then ε1= x1 and ε2 =x1
ρ=-1 then ε1=-ε2
: perfect correlation
: no correlation
: perfect anti-correlation

Used when samples are required from two (or more) normal variables

Exercise: show that the correlation between ε1 and ε2 is ρ
IAE University of Toulouse 2010-2011
194
Application of Monte Carlo Simulation

Monte Carlo simulation can deal with




path dependent options (e.g. Asians, barriers,…)
options dependent on several underlying state
variables (e.g. Forex & interest rates)
options with complex payoffs
It cannot easily deal with American-style
options
IAE University of Toulouse 2010-2011
195
Example: pricing an Asian call option


An Asian option averages the payoff spot over several intermediate
dates T1,… ,TN
This is a path-dependent option
1
Asian  max 
N

for i=1… nbrPaths

for j=1… N






STi  K ,0 

i 1

N
Generate standard normal variable Ui,j
Set Si(Tj) = S(Tj-1) exp[(r-½σ2)(Tj-Tj-1)+ σ √(Tj-Tj-1) Ui,j]
Set meanSpoti =(Si(T1)+…+Si(TN))/N
Set Calli = e-rT max(meanSpoti-K,0)
Call = (Call1+…+ CallN)/N
IAE University of Toulouse 2010-2011
196
Monte Carlo and barrier options

If the barrier monitored continuously, it requires a simulation with
many points:
ˆ  / 2( t
S (i  1)  S (i) e
2

i1 - t i )   i
( t i1 - t i )
What happens between ti and ti+1 is unknown. Was the barrier
touched ?


Put more points (CPU time increases!), or
Smarter : Compute the pobability of touching the barrier between ti and ti+1
IAE University of Toulouse 2010-2011
197
Monte Carlo and barrier options

Estimating probability of not touching barrier:

Total survival probability:
t 2 t 3
t N 1 t N
t1 t 2
Psurv  Psurv
 Psurv
   Psurv

Knock-out option = DF · Payoff(S) · Psurv
IAE University of Toulouse 2010-2011
198
Monte Carlo and barrier options

For knock-in options we use the decomposition

KI = Vanilla – KO

and we price the two right-hand side instruments
based again on the survival probability formula
IAE University of Toulouse 2010-2011
199
Determining Greek Letters

For 




Make a small change to asset price
Carry out the simulation again using the same random
numbers
Estimate  as the change in the option price divided by the
change in the asset price
Price ( S 0  dS )  Price ( S 0  dS )

2  dS
Proceed in a similar manner for other Greek letters

Price ( S0  dS )  2  Price ( S0 )  Price ( S0  dS )
(dS ) 2
Vega 
IAE University of Toulouse 2010-2011
Price      Price  

200
Demonstration XL
IAE University of Toulouse 2010-2011
201
Finite Difference Methods

Finite difference methods represent the differential
equation as a difference equation

Practically speaking, we transform
P
P 1 2 2  2 P
  S 
   S  2  r  P
t
S 2
S

into
P(t  t )  P(t )
P( S  S )  P( S  S ) 1 2 2 P( S  S )  2 P( S )  P( S  S )
  S 
   S
 rP
2
t
2  S
2
S


and we solve for P(t): the price at the previous time step
μ is the risk-neutral drift
IAE University of Toulouse 2010-2011
202
Finite Difference Methods: the main idea

We form a grid with equally spaced time-values and stock-price values
Spot
fi,j
j
strike
Call payoff: f
today


time
i
maturity
Define ƒi,j as the value of ƒ at time it when the stock price is jS
Knowing the payoff at maturity we solve PDE backwards till T=today
IAE University of Toulouse 2010-2011
203
Finite Difference Methods


Explicit method
Spot derivatives are
calculated at t=(i+1)·Δt


Implicit method
Spot derivatives are
calculated at t=i·Δt
f i 1, j  f i , j
f

t
t
f i 1, j  f i , j
f

t
t
f i 1, j 1  f i 1, j 1
f

S
2  S
f i , j 1  f i , j 1
f

S
2  S
f i 1, j 1  2 f i 1, j  f i 1, j 1
2 f

2
S
(S ) 2
f i , j 1  2 f i , j  f i , j 1
2 f

2
S
(S ) 2
IAE University of Toulouse 2010-2011
204
Explicit method

The difference equation becomes
f i 1, j  f i , j
t

   jS 
f i 1, j 1  f i 1, j 1
2  S
f i 1, j 1  2  f i 1, j  f i 1, j 1
1
  2  ( jS ) 2
 r  f i 1, j
2
(S ) 2
and after some re-arrangement:
1
1
1

1

f i , j  f i 1, j 1   2 j 2 t  jt   f i 1, j 1   2 j 2 t  rt   f i 1, j 1   2 j 2 t  jt 
2
2
2

2


more compactly:
f i , j  f i 1, j 1  A j  f i 1, j  B j  f i 1, j 1  C j


For i+1=Tmat the function fi+1,j is fully known
Solve above equation iteratively for fi,j in every (i,j) until i=today
IAE University of Toulouse 2010-2011
205
Explicit method schematically
time=iΔt

time=(i+1)Δt
To calculate the option value at
the boundary spots


Spot = (j+1) ΔS
Spot = j ΔS

Spot = (j-1) ΔS
Smin (with j=1)
Smax (with j=nbrSpots)
we need extra equations, the
boundary conditions
We obtain these by requiring that
at very low and very high spots
the option has no convexity:
 2C
 0  C ( j  1)  2C ( j )  C ( j  1)  0
S 2

This implies:
C (1)  2C (2)  C (3)
C ( N )  2C ( N  1)  C ( N  2)
IAE University of Toulouse 2010-2011
206
Explicit method at work


PDE solution with
 100 time steps
 100 spots
 Δt = 0.005
 ΔS = 0.025
converges to the correct
Black-Scholes solution
IAE University of Toulouse 2010-2011
207
Explicit method (not) at work

Unstable if number
of time-steps is not
big enough

Oscillations are
produced and
propagate to all
spots
IAE University of Toulouse 2010-2011
208
Implicit method

More complex but avoids instabilities of explicit method

The difference equation becomes
f i 1, j  f i , j
t

   jS 
f i , j 1  f i , j 1
2  S
f i , j 1  2  f i , j  f i , j 1
1
  2  ( jS ) 2
 r  fi, j
2
(S ) 2
and after some re-arrangement:
1
1
 1

 1

f i , j 1    2 j 2 t  jt   f i , j 1   2 j 2 t  rt   f i , j 1    2 j 2 t  jt   f i 1, j
2
2
 2

 2


more compactly:
f i , j 1  A j  f i , j  B j  f i , j 1  C j  f i 1, j


For i+1=Tmat the function fi+1,j is fully known
Solve above equation iteratively for fi,j in every (i,j) until i=today
IAE University of Toulouse 2010-2011
209
Implicit method schematically
time=iΔt
time=(i+1)Δt


Spot = (j+1) ΔS
Spot = j ΔS

Spot = (j-1) ΔS


1 equation, 3 unknowns !
We have to solve the entire
system of equations for
each time step
Linear algebra methods
LU decomposition
Boundary conditions
remain as before
IAE University of Toulouse 2010-2011
210
Explicit vs Implicit methods



In practise we use a combination of the two methods
Crank-Nicolson method
Combines efficiency and stability
IAE University of Toulouse 2010-2011
211
Interest-rate products: introduction

More difficult than derivatives of equities/Forex:



The behavior of a rate is more complex than the price of
a stock or exchange rate (political, macro-economics)
The underlying is a curve and not a price
Every point on this curve can have a different volatility
IAE University of Toulouse 2010-2011
212
Bonds (obligations)

Bond with one unique payment at maturity
(zero-coupon)

PV=CT/(1+r)T
where
PV (present value) is the value of the bond today.
CT is the capital payed at maturity
r is the interest rate payed over a given composition (annual, monthly)
T is the number of periods in the composition of the interest rate
IAE University of Toulouse 2010-2011
213
Bonds: example

Bond of maturity 2 years, face value 100€ (it
pays CT=100€ at maturity)

A) interest = 3% per year, annual composition


B) interest = 3% per year, monthly composition


PV=100/(1+0.03)2= 94.26€
PV=100/(1+0.03/12)24=94.18€
C) interest = 3% per year, continuous composition

PV=100 ∙exp(-0.03 x 2) = 94.176€
IAE University of Toulouse 2010-2011
214
Bonds with periodic coupons

Bond with coupons + payment at maturity
T
i
PV

C
/(1

r)
 i
where
i 1
PV (present value) is the value of the bond today.
Ci is the amount of the ith coupon (where the reimbursement occurs
of the face value if i=T)
r est le taux d’intérêt payé sur une période de composition donnée
(annuelle, mensuelle …)
T is the number of compounding periods = number of interest
payments
IAE University of Toulouse 2010-2011
215
Example / Exercise

Bond of maturity 2 years,




Face value 100€
Coupons 10% / year, semi-annual payment
Interest rate (composition semestriel) 4% /year
PV = 111.42 €
IAE University of Toulouse 2010-2011
216
Bonds: sensitivities

The duration D expresses the sensitivity of
the PV of a bond compared to a change of
the rate.

•
We often use the duration Mc Aulay :

•
T
dPV
D
  i  Ci /(1  r) i 1
dr
i 1
 (1  r ) d ( PV )
1
DMcAulay 

PV
dr
PV
T
 i  C /(1  r)
i 1
i
i
For a bond, D is <0 end DMcAulay>0
IAE University of Toulouse 2010-2011
217

Exercise: a portfolio of interest-rate products
has a McAulay duration of 15 years, and is
currently worth 10 millions €, what does its
value become (approximately) if the interest
rate goes from 4% to 3.9% ?

Answer : 10,144,231 €
IAE University of Toulouse 2010-2011
218
Risk management and
calculation of VAR
IAE University of Toulouse 2010-2011
219
VAR (Value At Risk)

VAR is a measure of market risk on a group of assets.

Def: Maximum loss that can be reached in x days such that
there is a small probability p that the realised loss is bigger.



It can be calculated at different levels: single portfolios, small
group of portfolios, bank portfolios,…
It is not additive (diversification effect)
It computes the amount of capital the bank must hold to
cover its risks

Bassel accord: p=1%, x=10 days.
IAE University of Toulouse 2010-2011
220
VAR: historical approach

identify the parameters of the market that influence the
value of the portfolio:



V=f(S1, S2, …..)
Si: Forex spots, swap rates, market vols, etc
on a large sample of historical data (two or more years),
calculate the daily returns of these market parameters:
S i t   Si t  1
a i (t ) 
Si t  1
IAE University of Toulouse 2010-2011
221
VAR: historical approach

Apply these returns from the past to today’s
market data and recalculate the value of the
portfolio



For each scenario replayed, calculate the profit
or loss:


Vj=f(S1·a1(t0-j), S2·a2(t0-j), …..)
j=1N (number of daily observations)
PLj= Vj- V0
Order the PnL from the smaller (great loss) to the
larger (great gain)
IAE University of Toulouse 2010-2011
222
p=5%
Var is the largest value such that at least (1-p) of
observations are above it
IAE University of Toulouse 2010-2011
223
Temporal extrapolation


The VAR obtained in this way corresponds to a horizon of
« 1-day »
Assuming the daily increments are i.i.d.


Independent
Identically distributed
VAR(n days )  VAR(1 day) n
IAE University of Toulouse 2010-2011
224
Quantile extrapolation


The VAR previously obtained are for p=5%
Assuming the observations of PnL are normally
distributed
VAR( p2 )  VAR( p1 ) 

N 1 ( p2 )
N 1 ( p1 )
N-1(p): inverse cumulative normal function
IAE University of Toulouse 2010-2011
225
Example

The 5% VAR of 1-day is 42,000$, what is the value
of 10-day 1% VAR?
IAE University of Toulouse 2010-2011
226
Disadvantages of historical VAR

It is based on historical data. Implicitly assumes that the markets will behave in the
future as they behaved in the past.

It reduces the measure of risk to a single digit. This does not necessarily represent
the potential damage
The two distributions have the same VAR!
IAE University of Toulouse 2010-2011
227
Conditional VAR (CVAR)

Measurement of the average loss exceeding VAR
The two distributions do not have the same CVAR !
IAE University of Toulouse 2010-2011
228
VAR: different possible implementations

Historical simulation

Advantages



Disadvantages



Easy to calculate
Matches data distributions
Depends on limited experience (past data)
not enough extreme events
Monte-Carlo simulation:
daily returns are randomly sampled based on a model

Advantages


Can generate lots of data & scenarios
Disadvantages

Introduces «model risk»: dependence on the assumed distibution of
daily returns
IAE University of Toulouse 2010-2011
229
VAR: some useful identities

VAR for a continuous distribution

p
 f ( x)dx
VAR
VAR
CVAR 
 xf ( x)dx

VAR
 f ( x)dx

IAE University of Toulouse 2010-2011
230

« Full revaluation VAR » VS. Linear /
Quadratic VAR
IAE University of Toulouse 2010-2011
231
Introduction to Credit Risk
IAE University of Toulouse 2010-2011
232
Credit Loss (loss by default), definition
N
CL   bi  CEi  (1  f i )
i 1



bi : binary indicator: 1 if default, 0 if not
CEi : credit risk exposure
fi : recovery rate in case of default
IAE University of Toulouse 2010-2011
233
Two possible measures of the default probability:

Actuarial: we measure the credit risk on statistical
basis of default of payment. Data produced by rating
agencies.

Implicit: deducing the default risk of certain market
prices (more complex).
IAE University of Toulouse 2010-2011
234
Actuarial measure of the default risk (1)
IAE University of Toulouse 2010-2011
235
Actuarial measure of the default risk (2)
IAE University of Toulouse 2010-2011
236
Actuarial measure of the default risk (3)

Marginal default rate during a period T: Probability of
default during the year T, given that no default has occurred in
previous years dT

Cumulative rate of default between 0 and T:
probability that at least one default occurs between 0 and T: CT
 Link between CT and dT… …

Survival rate between 0 and T :

St=(1-d1)(1-d2)…(1-dT)
IAE University of Toulouse 2010-2011
237
Actuarial measure of the default risk (4)


The measurement of default rates over a long
period of time may be problematic (small sample)
A more robust approach: Transition probability
from one state to another:
Example : a company with a rating « B » has a probability of
12% to be upgraded to « A » within a year.
IAE University of Toulouse 2010-2011
238
Exercise

What is the cumulative probability that a company
currently rated as « A » faces default in the next 3
years?
IAE University of Toulouse 2010-2011
239
Trading in the real world
IAE University of Toulouse 2010-2011
240
Classical theory of financial markets

Efficient market hypothesis



Assumes: All information concerning a financial asset is already
incorporated into the current price
Implies: risk-free profit is impossible, traders are completely rational
Asset increments S (t ) 
S t   S t  1
S (t )
 log
are
S t  1
S (t  1)

Independent from one tick to the next

Identically distributed

Normally distributed
IAE University of Toulouse 2010-2011
241
Market empirical (stylized) facts

Fat tails


Opposite graph




The market-realised distribution of
log-returns is not Normal
S&P500 density of log-returns
Normal density with same mean
and variance
Y-axis in log-scale
Example:



Probability of a daily move of -6%
Market: 0.02%
Normal: 0.000005%
IAE University of Toulouse 2010-2011
242
Market empirical (stylized) facts

Volatility clustering



Periods of high volatility
Periods of low volatility
Not reproduced by a time
series of normal N(0,1)
increments
IAE University of Toulouse 2010-2011
243
Market empirical (stylized) facts

Decaying autocorrelations

Dependence of market-returns
between different times

Graph opposite
Ext  xt  
as function of τ
S t  S t 1
where xt 
S t 1
IAE University of Toulouse 2010-2011
244
A simple trading strategy: Pairs trading

Find two stocks that are consistently correlated

Wait till one of them breaks the pattern

Then buy the cheap one, sell the expensive one

Wait till the trend reverses to the normal pattern

Then close the position
IAE University of Toulouse 2010-2011
245
Pairs trading at work

Several implementations exist. A possible one:

Measure distances between stocks, Sa and Sb, across timeseries
N
d a ,b   S a (ti )  Sb (ti ) 
2
i 0

When the distance is too far away from the mean: trade

Backtest the algorithm and optimise through modifying





Distance threshold (based on e.g. multiple of the standard deviation)
Size of data
Asset classes of stocks
The measure of distance (alternative to above can be correlation)
…
IAE University of Toulouse 2010-2011
246
Pairs trading at work: an example

Algorithm gives signals for distances higher than
1.5·standard deviation of the mean
IAE University of Toulouse 2010-2011
247
Kelly’s criterion

You are a gambler

You know your game and
you win with probability 55%

How much of your capital
should you bet each time ?
Historical background
 J L Kelly (1956)
 Bells’ labs USA
 Develops analysis for
maximizing expected capital
 Mathematician Ed Thorp uses
the analysis at Las Vegas
casinos
 Reportedly made fortune
 Author of best-seller book
“Beat the Dealer” 1962
700,000 copies sold
 Founder of hedge fund
IAE University of Toulouse 2010-2011
248
Kelly’s criterion for coin-tossing
Notation
Strategy

You played N times


Number of times you won: W
Number of times you lost: L
Each time you bet a fraction of your
remaining capital f
Example:

1st time:





Win probability p=W/N
Lose probability q=1-p



2nd time:

Initial capital X0



Capital to bet: f ·X0
Capital that remains: (1- f) ·X0
This time you lose
Capital to bet: f ·(1- f )·X0
Capital that remains: (1- f) ·(1- f) ·X0
…
After n rounds

Capital that remains: (1- f)L ·(1+ f)W ·X0
IAE University of Toulouse 2010-2011
249
Kelly’s criterion for coin-tossing

Remaining capital after n rounds Xn=(1- f)L ·(1+ f)W ·X0

Ratio (in logarithm):
1
n
 Xn 
W
L
  log( 1  f )  log( 1  f )
Gn ( f )  log 
n
n
 X0 

Take expectations:
L
W

g ( f )  E  log( 1  f )  log( 1  f )
n
n

 p  log( 1  f )  q  log( 1  f )
IAE University of Toulouse 2010-2011
250
Kelly’s criterion for coin-tossing
Choose
 fopt maximizes the Kelly function
 This is the optimal fraction that
leads to the maximal expected
capital
Avoid
 “Ruin” fraction fruin that leads to
a negative capital: you lose all
your money

fopt =p-q
IAE University of Toulouse 2010-2011
251
References


Options, futures and other
derivatives
P. Glasserman (2000) Springer
J. Hull (2008) Prentice Hall

Monte Carlo methods in financial
engineering
Monte Carlo Methods in Finance

P. Jäckel (2003) Wiley
Paul Wilmott on Quantitative
Finance 3 Vol Set
Paul Wilmott (2000) Wiley

Stochastic Calculus for Finance II:
Continuous-Time Models
S. Shreve (2004) Springer Finance


Financial Risk Manager Handbook
P. Jorion (2009) Wiley Finance
Pricing Financial Instruments: The
finite-difference method
D. Tavella and C. Randal (2000) Wiley
IAE University of Toulouse 2010-2011
252
Exercises:
1.
Decompose the following strategies into simple Call and Put positions
(short or long). Discuss advantages and disadvantages of each of the
strategies
2.
Integrate numerically the function exp(-x²/2) between –4 and +4, using an
interval of dx=0.01.
3.
Differentiate numerically and analytically the function exp(-x²/2).
4.
Write a program in VBA that calculates the functions min(a,b) and max(a,b)
using the min / max of two numbers.
5.
Write a program in VBA to generate a brownian motion W(t). The input
parameters are: the number of time steps, the final time. As an output, the
function should return the simulated trajectory.
IAE University of Toulouse 2010-2011
253
Exercices:
6.
Use the function of exercise 4 to calculate the variance of the final value
of a brownian trajectory (10 time steps spaced by 3 sec), on the basis of
1000 realisations.
7.
Show that the variance of random variable is given by V(X) = E(X²)(E(X))²
8.
What are (i) the mean (ii) the standard deviation of returns of the index
EUROSTOXX50, if we consider that it follows the law a+bX where X is a
normal gaussian variable (a and b are 2 constants) ?
9.
Calculate the mean and the variance of eaX where X is a guassian
normal random variable
10.
Calculate the expectation of S=e(r-q-²/2)T+X√T where X is a guassian
normal random variable
11.
Write a programe in VBA to compute a Black-Scholes pricer (analytic
formula) for a Call option: Call(S, K, , r, q, T).
IAE University of Toulouse 2010-2011
254
Exercises:
12.
Compare the price of a simple call option to the price call with a barrier
where the barrier level H increases.
13.
What is the value of a 3m call on EUR/USD, rEUR = 4%, rUSD = 5%
vol=25%, K=1.3 for different values of the spot. For each point of the curve
calculate the Delta using finite differences and the analytic formula. If
S=1.27, what is the cost of an option on 1,000,000 EUR notional? And on
an option on 1,000,000 USD notional?
14.
15.
16.
Show that for small t, the relations
u  e  t
e( r q ) t  d
p
ud
d  e  t
are solutions of
ad
2t = pu2 + (1– p )d 2 – e2(r-q)t
p
ud
u = 1/ d
a  e ( r  q ) t
Derive the density function of a logNormal random variable.
Calculate the mean and the variance of a log-normal density with
parameters , .
IAE University of Toulouse 2010-2011
255
Exercises:
17.
18.
19.
20.
Calculate with Monte Carlo the value of an Asian put option and compare
with the value of the corresponding vanilla put. How do you explain the
difference in the prices?
Calculate the number  using a Monte-Carlo method
Programm a VBA function allowing the pricing of a Call with Monte-Carlo:
Call(S, K, s, r, q, T, Nsimu). Compare with the exact solution from BlackScholes formula
Show that the variables ε1, ε2 obtained from Cholesky’s decomposition
have a correlation equal to ρ
 1  x1
 2  x1  x2 1   2
21.
Compute analytically the Delta, Gamma and Vega of a Put option
IAE University of Toulouse 2010-2011
256
Exercises:
22.
23.
Using Itô’s lemma, and starting from the differential equation of Black-Scholes
dS=µSdt+SdW, calculate the differential of ln(S). Derive an expression for
S(t).
Using Itô’s lemma compute the stochastic differential of the variable Z=X/Y
where X and Y are stochastic variables
24.
Calculate the price of a digital option (at maturity it pays 1 unit of underlying if
ST>K). Write a VBA program that calculates with Monte Carlo simulations.
25.
Calculate the price of a knock-out option using Monte Carlo and the formula
for the surviving probabilities
26.
Price a put option using the explicit PDE method and compare the result to
the Black-Scholes formula.
27.
Bachelier vs Black-Scholes: Price a call option with the monte carlo method
using (i) brownian motion (Bachelier model) and (ii) geometric brownian
motion (Black-Scholes model).
IAE University of Toulouse 2010-2011
257
Exercises:
28.
Find the stochastic derivatives of the process: Xt=Wt2-t and Xt=Wt2-Wt ·t
29.
Write a Monte Carlo program in VBA that simulates a coin-tossing game and
verify that the optimal fraction of capital fopt proven by Kelly leads to the
maximum expected capital
30.
Demonstrate that if Wt is a brownian motion then E[(Wt-Ws)2]=t-s
IAE University of Toulouse 2010-2011
258
Download