IAE University of Toulouse 2010-20111 Computational Methods in
Finance Nikos Skantzos
Slide 2
IAE University of Toulouse 2010-2011 2 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
Slide 3
IAE University of Toulouse 2010-2011 3 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
Slide 4
IAE University of Toulouse 2010-2011 4 Volatility smile and
market models Risk Management Calculation of VAR Introduction to
credit risk Real world markets Stylised facts Pairs trading: an
example strategy Kellys criterion Course Organisation
Slide 5
IAE University of Toulouse 2010-2011 5 Introduction Pictures
from a dealing room
Slide 6
IAE University of Toulouse 2010-2011 6 Introduction A more
realistic picture of the dealing room Cartoon by Adam Zyglis
Slide 7
IAE University of Toulouse 2010-2011 7 Introduction The
presence and interaction of different units in a dealing room
Trader Quant IT Client Sales Structurer Risk ManagementQuant,
IT
Slide 8
IAE University of Toulouse 2010-2011 8 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
Slide 9
IAE University of Toulouse 2010-2011 9 Inside the dealing room:
Traders Traders Hedge the position that the structurers open. They
buy sell/options to minimise the sensitivity of the banks portfolio
to movements of the underlying. Prop-traders Take position based on
their expectation about the markets next move.
Slide 10
IAE University of Toulouse 2010-2011 10 Introduction: Quants
Who: Develop and implement mathematical models to price the
products of structurers and calculate the risk for the bank. Where:
Investment banks, hedge funds and more generally in any financial
institution dealing with derivatives and market risk. Background:
Mathematics, Physics, Engineering, Economy.
Slide 11
IAE University of Toulouse 2010-2011 11 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
Slide 12
IAE University of Toulouse 2010-2011 12 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 dont 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
Slide 13
IAE University of Toulouse 2010-2011 13 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.
Slide 14
IAE University of Toulouse 2010-2011 14 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
Slide 15
IAE University of Toulouse 2010-2011 15 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
Slide 16
IAE University of Toulouse 2010-2011 16 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 ?
Slide 17
IAE University of Toulouse 2010-2011 17 Derivatives: finding
the fair price Fair price = average profit Average profit = 100 +
200 = 75 + 50 = 125 Options fair price = 125 A (75%) B (25%) 100
200 Horse race
Slide 18
IAE University of Toulouse 2010-2011 18 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 e rT 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
Slide 19
IAE University of Toulouse 2010-2011 19 Derivative products: a
reminder History 6 th 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.
Slide 20
IAE University of Toulouse 2010-2011 20 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
Slide 21
IAE University of Toulouse 2010-2011 21 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 (S T ). Long Call payout = max(0, S T - K) Go Long a Call if
you think the underlying will increase K STST Call Long ( the case
of a buyer of a call) Short (the case of a seller of a call) payout
= S T -K
Slide 22
IAE University of Toulouse 2010-2011 22 Derivative products: a
reminder Long Put payout = max(0, K- S T ) Go long a Put if you
think the underlying will go lower Calls and Puts are called
vanillas Vanilla flavour = simple. K STST Put Long ( the case for
an owener of a Put) Short (the case for a seller of a Put) payout =
K- S T
Slide 23
IAE University of Toulouse 2010-2011 23 Derivative products: a
reminder Barrier options Advantage: Cheaper than vanilla options
Disadvantage: More risky K STST At maturity (T) Regular barrier
Reverse barrier Knock-In = the option is activated if the spot hits
the barrier Knock-Out = the option is disactivated if the spot hits
the barrier
Slide 24
IAE University of Toulouse 2010-2011 24 Derivative products: a
reminder Price of an option KSTST Call payout = S T -K At maturity
(T) Today (t
IAE University of Toulouse 2010-2011 28 Some derivative
strategies Call spread(K 1, K 2 ) = Call(K 1 )- Call(K 2 ) =
Cheaper than a simple call Profit is limited to K 2 -K 1 for
spots>K 2 +Call(K 1 ) -Call(K 2 ) K1K1 K2K2 K1K1 K2K2
Slide 29
IAE University of Toulouse 2010-2011 29 Some derivative
strategies Straddle(K) = Call(K) + Put(K) Expensive If S T >K:
gives the right to buy cheap If S T
IAE University of Toulouse 2010-2011 33 Mathematical reminder
LN(e)=1 e ln(x) = x, or ln(e x ) = x Logarithm in base e Defined
only for x>0 The function LN (Neperian logarithm):
Slide 34
IAE University of Toulouse 2010-2011 34 Mathematical reminder
The derivative of a function: slope of a function at 1 point
Numerical approximation: or The 2 nd derivative : curvature of a
function in 1 point Numerical approximation:
Slide 35
IAE University of Toulouse 2010-2011 35 Some analytical
derivatives
Slide 36
IAE University of Toulouse 2010-2011 36 Mathematical reminder
Integral of a function
Slide 37
IAE University of Toulouse 2010-2011 37 Mathematical reminder
Primitives of some commonly used functions
Slide 38
IAE University of Toulouse 2010-2011 38 Mathematical reminder
Numerical integration of a function Method of lower rectangles
Method of upper rectangles Trapezoidal method
Slide 39
IAE University of Toulouse 2010-2011 39 Mathematical reminder
Taylor series: approximating a function around a point x 0 Converts
a complex function into a simple power-series Examples exp(x)
around x 0 =0: cos(x) around x 0 =0: around x 0 =0:
Slide 40
IAE University of Toulouse 2010-201140 Random variables and
stochastic processes Basic notions
Slide 41
IAE University of Toulouse 2010-2011 41 Random variables and
stochastic processes Random variable a number whose value is
determined by the outcome of an experiment We dont know its value
only how likely it is 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:
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
Slide 42
IAE University of Toulouse 2010-2011 42 Properties of random
variables Probability of an event: 0Prob(event) 1 Prob=0: certainty
that event will not happen Prob=1: certainty that event will happen
Probability of all events: Prob(ev 1 )+ +Prob(ev N ) =1 Prob(ev 1
OR ev 2 ) = Prob(ev 1 ) + Prob(ev 2 ) Example: probability that a
dice is either 1 or 2 = 1/6 + 1/6 If ev 1 is independent of ev 2
then: Prob(ev 1 AND ev 2 ) = Prob(ev 1 ) Prob(ev 2 ) Example: Prob
that two dice are both 1 = 1/6 1/6
Slide 43
IAE University of Toulouse 2010-2011 43 Random variables
Characterised by: The probability density distribution function
f(x) Prob that event x will happen The cumulative distribution
function Prob that the outcome of the experiment will be less than
x The mathematical expectation (mean) The average by repeating the
experiment many times The moments (order n) : First moment is the
mean Second moment is related to the variance Third moment is
related to the skewness...
Slide 44
IAE University of Toulouse 2010-2011 44 a b 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 :
Slide 45
IAE University of Toulouse 2010-2011 45 Central moments The
central moments (of order n): remove the mean The variance (n=2),
characterises the amplituded around the mean: Standard Deviation =
variance,
Slide 46
IAE University of Toulouse 2010-2011 46 Skewness (n=3),
describes the asymmetry: Kurtosis (n=4), describes the effects of
fat tails: 3 : distribution leptokurtic Central moments
Slide 47
IAE University of Toulouse 2010-2011 47 Skewness & kurtosis
Asymmetry: skewness Fat tails: kurtosis
Slide 48
IAE University of Toulouse 2010-2011 48 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
Slide 49
IAE University of Toulouse 2010-2011 49 Examples of fat tails
Fat tails means that the extreme-event probability is low, but much
higher than we expect !
Slide 50
IAE University of Toulouse 2010-2011 50 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 ?
Slide 51
IAE University of Toulouse 2010-2011 51 Distribution vs
cumulative Some important properties Definition or and Distribution
function is normalized: Cumulative is between 0 and 1, always
increasing f(x)F(x)
Slide 52
IAE University of Toulouse 2010-2011 52 Some important
properties Integral of the distribution: probability that the
random variable will be less than a certain value Probability that
the random variable is between two values:
Slide 53
IAE University of Toulouse 2010-2011 53 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
Slide 54
IAE University of Toulouse 2010-2011 54 Use of distributions in
finance Financial derivatives require us to calculate the
expectation of a function of a random variable Example: a Call
option where (S T ) is the distribution function of the final
spot
Slide 55
IAE University of Toulouse 2010-2011 55 Normal Distribution
Normal Distribution N(, ) Special case: = 0 and = 1 denoted N(0,1)
= mean = standard deviation
Slide 56
IAE University of Toulouse 2010-2011 56 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 e X 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
Slide 57
IAE University of Toulouse 2010-2011 57 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=e X is
distributed log-normally. Relations between the function of X and
Y, related by X = f(Y): Exercise: recover the Log- Normal
distribution law
Slide 58
IAE University of Toulouse 2010-2011 58 Log-normal Distribution
Starting from a normal distribution for X We find the log-normal
law for Y=e X Exercise: Calculate the mean and variance of a
log-normal function with parameters ,
Slide 59
IAE University of Toulouse 2010-2011 59 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, x 1,, x N each with mean m,
variance s The random variable x 1 + x 2 + x N follows
Slide 60
IAE University of Toulouse 2010-2011 60 Central Limit Theorem
at work For N = 5, 20, 100 Sample N random variables from some
distribution (here lognormal) and sum them: x 1 ++ x N 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
Slide 61
IAE University of Toulouse 2010-2011 61 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.
Slide 62
IAE University of Toulouse 2010-2011 62 Commutation of
integration & differentiation The order of integration and
differentiation can be interchanged Example: the derivative of a
call with respect to strike since the expectation is simply an
integral
Slide 63
IAE University of Toulouse 2010-2011 63 Commutation of
integration & differentiation We can use this trick to compute
moments of a distribution Example, 2 nd moment of a central normal
distribution:
Slide 64
IAE University of Toulouse 2010-2011 64 Commutation of
expectation in a function Which is bigger? Denote and Taylor expand
f(x) around x 0 Apply the expectation If then
Slide 65
IAE University of Toulouse 2010-2011 65 Relation between mean
and variance Variance in terms of simple expectations Var[x] = E[x
2 ]-E 2 [x] Derivation:
Slide 66
IAE University of Toulouse 2010-201166 Basic notions of VBA
Excel
Slide 67
IAE University of Toulouse 2010-2011 67 Basic notions of VBA
Excel Enter the VBA environment : Alt+F11
Slide 68
IAE University of Toulouse 2010-2011 68 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)
Slide 69
IAE University of Toulouse 2010-2011 69 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
Slide 70
IAE University of Toulouse 2010-2011 70 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
Slide 71
IAE University of Toulouse 2010-2011 71 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
Slide 72
IAE University of Toulouse 2010-2011 72 Basic notions of VBA
Excel Some useful functions Tracer lhistogramme dune distribution:
Utiliser la fonction frequence dans Excel In Excel ALEA()
LOI.NORMALE.STANDARD( x ) LOI.NORMALE.INVERSE(x ;0;1) In VBA Excel
Rnd NormaleCumul(x) (faite maison) Application.WorksheetFunction.No
rmSInv( x )
Slide 73
IAE University of Toulouse 2010-201173 Numerical methods in
finance: some background history
Slide 74
IAE University of Toulouse 2010-2011 74 Brownian Motion Robert
Bown (botanist) Observed motion of pollen particles suspended in
water (1827).
Slide 75
IAE University of Toulouse 2010-2011 75 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
Slide 76
IAE University of Toulouse 2010-2011 76 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 thorie de la spculation to
describe stock prices Albert Einstein (1905) makes a statistical
theory that explains Brownian motion and allows predictions
Slide 77
IAE University of Toulouse 2010-2011 77 Why Brownian motion in
finance? Paths resemble stock market indices Problem: Brownian
motion can turn negative !
Slide 78
IAE University of Toulouse 2010-2011 78 How to model Brownian
motion? Brownian motion is stochastic process (=sequence of r.v.)
W(0), W(1), W(2),... Main properties: 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
Slide 79
IAE University of Toulouse 2010-2011 79 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
Slide 80
IAE University of Toulouse 2010-2011 80 Brownian motion: an
example Notation: X t position at time t T=24hr t 0 =21hr X t0 =X 0
=0 Random-walk model: Position at next step X t+1 given position at
previous step X t Randomness comes through the increment W t
~N(0,t) What is the meaning of and ? Bob takes first step: in this
model is average speed = 0.125 km/hr Small : random walk is
confined Large : random walk can make big jumps
Slide 81
IAE University of Toulouse 2010-2011 81 Brownian motion: an
example After several steps Bob arrives home The model describes
his random walk as In the limit t0: We are facing a problem: What
is the meaning of an integral over a stochastic differential ?
Stochastic calculus
Slide 82
IAE University of Toulouse 2010-2011 82 Kiyoshi It (1940s)
develops stochastic calculus It integral : with stochastic
differential dW Its lemma: differentiation of stochastic functions
Robert Merton (1969) introduces stochastic calculus in finance to
explain the price of financial products S ~ e W(t) >0 : The
value of an underlying stays always positive! Stochastic calculus
in mathematical finance
Slide 83
IAE University of Toulouse 2010-2011 83 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) Option pricing
with stochastic calculus
Slide 84
IAE University of Toulouse 2010-2011 84 Stochastic integral
Definition: A useful property: The mean of a stochastic integral is
zero Derivation Independents increments Mean of N(0,1)=0
Slide 85
IAE University of Toulouse 2010-201185 The Black & Scholes
model
Slide 86
IAE University of Toulouse 2010-2011 86 The Black-Scholes model
Cartoon by S Harris
Slide 87
IAE University of Toulouse 2010-2011 87 The Black & Scholes
model Simple brownian motion dS = dW Black & Scholes model dS =
S dt + S dW S : value of underlying stock, foreign exchange rate,
etc : drift the price of risk-free interest rate annualised
dividend: r-q (Equity) Domestic minus foreign interest risk-free
rates: r dom -r for (Forex) : volatility (annualised) t : time
(expressed in years) W: Wiener process (Brownian)
Slide 88
IAE University of Toulouse 2010-2011 88 The Black & Scholes
model dt Differential equation of Black & Scholes Random
variable, distributed according to a normal distribution of 0 mean
& variance t Solution of the differential equation of Black
& Scholes It calculus
Slide 89
IAE University of Toulouse 2010-2011 89 The three forms of the
B&S model Stochastic differential equation Solution of the
stochastic differential equation Partial differential equation
governing the evolution of the price of a derivative (pricing
equation)
Slide 90
IAE University of Toulouse 2010-2011 90 Its Lemma Its process:
x solution of dx=a(x,t) dt + b(x,t) dW Consider a function G(x,t):
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 Additional
term from stochastic calculus
Slide 91
IAE University of Toulouse 2010-2011 91 Its Lemma Exercise:
Black-Scholes What is the differential of ln(S) ? What is the value
of S(T) ?
Slide 92
IAE University of Toulouse 2010-2011 92 Derivation of the
Black-Scholes PDE Composition of portfolio: 1 option of value
V(S,t) An amount of the underlying 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: 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) Classic differential calculus
Additional term in stochastic differential calculus
Slide 93
IAE University of Toulouse 2010-2011 93 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:
Slide 94
IAE University of Toulouse 2010-2011 94 Derivation of the
Black-Scholes PDE We suppress all sources of risk (risk=randomness)
of the underlying (dS): delta of an option 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 PDE of Black-Scholes
Slide 95
IAE University of Toulouse 2010-2011 95 Call and Put options
Solution of the Black & Scholes model
Slide 96
IAE University of Toulouse 2010-2011 96 Derivation of the Call
price for the Black-Scholes model At maturity, the call value is
g(S T ) = max(0,S T -K) (S T -K) + Call price: expectation of the
payoff, discounted to the value of today S (S T ): Distribution
function of the random variable S T The assumed process for the
random variable S T has solution where X a normal random variable
(mean 0, variance 1) S T : spot K: strike e -rT : Discount
factor
Slide 97
IAE University of Toulouse 2010-2011 97 AB Derivation of
Black-Scholes call price
Slide 98
IAE University of Toulouse 2010-2011 98 The easy part: The more
difficult part: We would like to bring this to an integral of the
form Complete the square Most common way to do this is:
Slide 99
IAE University of Toulouse 2010-2011 99 Finaly the value of the
Call: Equivalently, in the standard notation: Exercise: calculate
the price of a digital option (it pays at maturity 1 unit of
underlying if S T >K)
Slide 100
IAE University of Toulouse 2010-2011 100 Interpretation of the
Black-Scholes formula N(d 2 ): probability that spot finishes in
the money N(d 1 ): 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
Slide 101
IAE University of Toulouse 2010-2011 101 Black-Scholes and
risk-neutrality The Black-Scholes formula 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
Slide 102
IAE University of Toulouse 2010-2011 102 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
Slide 103
IAE University of Toulouse 2010-2011 103 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
Slide 104
IAE University of Toulouse 2010-2011 104 Call-Put parity
relation Call-Put = = Se -qT -Ke -rT =(F-K)e -rT The price of a
call is linked to the price of a put through the forward
Slide 105
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 in : the option is activated only
if the barrier is touched Barrier out : the option is dead if the
barrier is touched
Slide 106
IAE University of Toulouse 2010-2011 106 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
Slide 107
IAE University of Toulouse 2010-2011 107 The Black &
Scholes model Parity relations: c = c ui + c uo c = c di + c do p =
p ui + p uo p = p di + p do
Slide 108
IAE University of Toulouse 2010-2011 108 The Black &
Scholes model Price of barrier options
Slide 109
IAE University of Toulouse 2010-2011 109 The Black &
Scholes model Price of touch options One-Touch Up with S o H
Slide 110
IAE University of Toulouse 2010-2011 110 Important identities
in the B&S model (1) and Derivation:
Slide 111
IAE University of Toulouse 2010-2011 111 Important identities
in the B&S model (2) and and similarly and Derivation
Slide 112
IAE University of Toulouse 2010-2011 112 Important identities
in the B&S model (3) where and Derivation We will show that
Start from right-hand side
Slide 113
IAE University of Toulouse 2010-2011 113 The Greek Letters
Delta : Gamma : Vega : Theta : The most important quantity for the
daily management of the trading books
Slide 114
IAE University of Toulouse 2010-2011 114 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
Slide 115
IAE University of Toulouse 2010-2011 115 Greeks Analytic
expressions for the Greeks ( here for a Call) : N(x) = (x)
probability density of a normal random variable
Slide 116
IAE University of Toulouse 2010-2011 116 Demonstration: Delta
and Derivation: Now use the fact that and And also the identity we
proved: to eliminate the two right-most terms and obtain the
result
Slide 117
IAE University of Toulouse 2010-2011 117 Example A bank has
sold European call option for $300,000 on 100,000 shares of a
non-dividend paying stock Market parameters are S 0 = 49 = 20%, K =
50 T = 20 weeks r = 5% The Black-Scholes value of the option is
$240,000 How does the bank hedge its risk to lock in a $60,000
profit?
Slide 118
IAE University of Toulouse 2010-2011 118 Naked & Covered
Positions Naked position Take no action Covered position Buy
100,000 shares today Both strategies leave the bank exposed to
significant risk
Slide 119
IAE University of Toulouse 2010-2011 119 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 A B Slope = Stock
price
Slide 120
IAE University of Toulouse 2010-2011 120 Delta: an important
interpretation Remember: What does N(d 1 ) 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. where
Slide 121
IAE University of Toulouse 2010-2011 121 Delta Hedging This
involves maintaining a delta neutral portfolio Delta neutral: 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
Slide 122
IAE University of Toulouse 2010-2011 122 Delta: an example Call
option with: Premium 400 Delta 50% Spot today is at S 0 =100 This
means that If spot moves to S 0 =110 (10% move) The premium will
move to 420 (10%50% move) (with all other market parameters
unchanged)
Slide 123
IAE University of Toulouse 2010-2011 123 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.
Slide 124
IAE University of Toulouse 2010-2011 124 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)
Slide 125
IAE University of Toulouse 2010-2011 125 Gamma Gamma ( ) is the
rate of change of delta ( ) with respect to the price of the
underlying asset Gamma is small Delta is stable under spot
movements Gamma is large Delta is not stable under spot movements
Gamma neutral hedge: 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
Slide 126
IAE University of Toulouse 2010-2011 126 Interpretation of
Gamma Gamma Addresses Delta Hedging Errors Caused By Curvature S C
Stock price S'S' Call price C '' C'C'
Slide 127
IAE University of Toulouse 2010-2011 127 Relationship Between
Delta, Gamma, and Theta For a portfolio of derivatives on a stock
paying a continuous dividend yield at rate q
Slide 128
IAE University of Toulouse 2010-2011 128 Vega Vega ( )
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
Slide 129
IAE University of Toulouse 2010-2011 129 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
Slide 130
IAE University of Toulouse 2010-2011 130 Managing Delta, Gamma,
& Vega can be changed by taking a position in the underlying To
adjust & it is necessary to take a position in an option or
other derivative
Slide 131
IAE University of Toulouse 2010-2011 131 Call option, strike
1.25 PriceDelta Gamma Vega Option price becomes linear for large
spots Delta ~ cumulative function Convexity risk (Gamma) highest
at-the-money Vol risk (vega) is highest at-the-money Spotladders:
vanilla
Slide 132
IAE University of Toulouse 2010-2011 132 Spotladders: barrier
option Knock-out option, strike 1.25, barrier 1.35 PriceDelta Gamma
Vega Option price: 0 at barrier and out-of-the-money Delta, Gamma,
Vega can be negative unlike vanilla!
Slide 133
IAE University of Toulouse 2010-2011 133 Rho Rho is the rate of
change of the value of a derivative with respect to the interest
rate
Slide 134
IAE University of Toulouse 2010-2011 134 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
Slide 135
IAE University of Toulouse 2010-2011 135 AOA: example on EURUSD
EURUSD = 1.3 = S o (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 e qT (=1 + q T + ) I convert today my EUR to USD, I
receive S o USD I enter into a Forward contract (for free),
allowing me to change USD into EUR within a year, at a fixed rate F
o. I deposit S o USD into an american bank with interest rate r.
After 1 year I receive: S o e rT After 1 year, I will have gained
(without taking any risk): - e qT (money to pay back in european
bank) + S o e rT / F o (money I receive from american bank in EUR)
AOA implies that the forward contract has value F o = S o e
(r-q)T
Slide 136
IAE University of Toulouse 2010-2011136 Volatility smile A
practinioners introduction
Slide 137
IAE University of Toulouse 2010-2011 137 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
Slide 138
IAE University of Toulouse 2010-2011 138 Spot probability
density (market) Distribution of terminal spot (given initial spot)
obtained from Fat tails: Market implies that the probability that
the spot visits low-spot values is higher than what is implied by
Black-Scholes Main causes: Spot dynamics is not lognormal Spot
fluctuations (vol) are not constant Market observable
Slide 139
IAE University of Toulouse 2010-2011 139 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. Black-Scholes volatility smile
Slide 140
IAE University of Toulouse 2010-2011 140 Black-Scholes
volatility smile equities change 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
Slide 141
IAE University of Toulouse 2010-2011 141 Reflect real-world
distributions: 1) Use a "naive" model (BS, vol assumed constant) in
which the volatility is adapted according to the strike of the
option price 2) use more sophisticated models capable of
reproducing the realistic distributions Black-Scholes volatility
smile
Slide 142
IAE University of Toulouse 2010-2011 142 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: measure of
historical fluctuations It does not give information about the
dynamics BS pricer
Slide 143
IAE University of Toulouse 2010-2011 143 Historical vs implied
volatility Historical Volatility: Represents the size of
fluctuations in the process S Implied Volatility: Represents the
price of a vanilla option today
Slide 144
IAE University of Toulouse 2010-2011 144 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
Slide 145
IAE University of Toulouse 2010-2011 145 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 Volatility depends on the time and spot This model can
reproduce the smile Stochastic Volatility model Spot: Geometric
Brownian motion Vol: modeled as a stochastic variable that returns
to a long-term mean value
Slide 146
IAE University of Toulouse 2010-2011 146 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
Slide 147
IAE University of Toulouse 2010-2011147 Numerical methods
Slide 148
IAE University of Toulouse 2010-2011 148 Models, numerical
methods and payouts Payout describes the derivative product, the
rights and obligations of the owner and of the issuer (no maths!).
Model 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
Slide 149
IAE University of Toulouse 2010-2011 149 Models, numerical
methods and payouts Models : Black-Scholes Stochastic Vol Local Vol
Jump Diffusion Numerical methods: analytic solution Static
replication Binomial tree Monte Carlo Finite differences Payout :
Call, Put, barriers, european, american Callable, touch A model
associated with a numerical method allows us to give the price of a
payout (derivative product)
Slide 150
IAE University of Toulouse 2010-2011 150 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
Slide 151
IAE University of Toulouse 2010-2011 151 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
Slide 152
IAE University of Toulouse 2010-2011 152 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
Slide 153
IAE University of Toulouse 2010-2011 153 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 (
IAE University of Toulouse 2010-2011 175 Example American Call
Cells in red: Immediate exercise more interesting than keeping the
option Can occur for a call if r1 (q) >0 Can occur for a put if
r2 (r) >0
Slide 176
IAE University of Toulouse 2010-2011 176 Demo binomial tree
(american)
Slide 177
IAE University of Toulouse 2010-2011 177 Pricing of a KO put
with binomial tree KO Barrier level = 1.5
Slide 178
IAE University of Toulouse 2010-2011 178 Demo binomial tree
(Barrier)
Slide 179
IAE University of Toulouse 2010-2011179 Monte Carlo Method
Slide 180
IAE University of Toulouse 2010-2011 180 Monte Carlo method
Cartoon by S Harris
Slide 181
IAE University of Toulouse 2010-2011 181 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
Slide 182
IAE University of Toulouse 2010-2011 182 Monte Carlo Each
simulation describes a randomly chosen path of the underlying The
name Monte Carlo comes from the resemblance to casino games
Slide 183
IAE University of Toulouse 2010-2011 183 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:
where f(x) is the probability density of x in the interval [a,b]
Example where (S T ) is the spot terminal density in the interval
[0,] call(S T ) = max(S T -K,0)
Slide 184
IAE University of Toulouse 2010-2011 184 Monte Carlo method
Obtain estimator of G by producing large number of realisations of
x: (x 1,x 2 ,x N ). Estimator Theoretical mean The larger the N,
the more accurate the estimator
Slide 185
IAE University of Toulouse 2010-2011 185 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.
Slide 186
IAE University of Toulouse 2010-2011 186 Monte Carlo Simulation
and Calculate by randomly sampling points in the square?
Exercice
Slide 187
IAE University of Toulouse 2010-2011 187 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
Slide 188
IAE University of Toulouse 2010-2011 188 Sampling Stock Price
Movements In a risk neutral world the process for a stock price is
We can simulate a path by choosing time steps of length t and using
the discrete version of this where is a random sample from (0,1)
=LOI.NORMALE.INVERSE(ALEA();0;1)
Slide 189
IAE University of Toulouse 2010-2011 189 An alternative
approach More accurate in most cases The options with a european
payout require only one time step =LOI.NORMALE.INVERSE(ALEA();0;1)
Often instead of using the BS stochastic differential equation, we
use its solution:
Slide 190
IAE University of Toulouse 2010-2011 190 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
Slide 191
IAE University of Toulouse 2010-2011 191 Sampling from Normal
Distribution The simplest way to sample from (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=U 1 + U 2 +U 12 - 6 In Excel
=LOI.NORMALE.INVERSE(ALEA();0;1) gives a random sample from
(0,1)
Slide 192
IAE University of Toulouse 2010-2011 192 Example: pricing a
call option for i=1N Generate standard normal variable U i Set S i
(T) = S(0) exp[ (r- 2 )T+ T U i ] Set Call i = e -rT max(S i
(T)-K,0) Call = (Call 1 ++ Call N )/N Exercise: show that this
converges to the result given by the Black-Scholes formula
Slide 193
IAE University of Toulouse 2010-2011 193 Confidence interval
Calculate the standard deviation of the Monte Carlo result For a
95% confidence interval find z /2 =N inv (1-/2) with =5% N inv 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
Slide 194
IAE University of Toulouse 2010-2011 194 Obtain two correlated
Normal Samples Obtain independent normal samples x 1 and x 2 and
set A procedure known as Choleskys decomposition =[-11] measures
correlation: =1 then 1 = 2 : perfect correlation =0 then 1 = x 1
and 2 =x 1 : no correlation =-1 then 1 =- 2 : perfect
anti-correlation Used when samples are required from two (or more)
normal variables Exercise: show that the correlation between 1 and
2 is
Slide 195
IAE University of Toulouse 2010-2011 195 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
Slide 196
IAE University of Toulouse 2010-2011 196 Example: pricing an
Asian call option An Asian option averages the payoff spot over
several intermediate dates T 1,,T N This is a path-dependent option
for i=1 nbrPaths for j=1 N Generate standard normal variable U i,j
Set S i (T j ) = S(T j-1 ) exp[(r- 2 )(T j -T j-1 )+ (T j -T j-1 )
U i,j ] Set meanSpot i =(S i (T 1 )++S i (T N ))/N Set Call i = e
-rT max(meanSpot i -K,0) Call = (Call 1 ++ Call N )/N
Slide 197
IAE University of Toulouse 2010-2011 197 Monte Carlo and
barrier options If the barrier monitored continuously, it requires
a simulation with many points: What happens between t i and t i+1
is unknown. Was the barrier touched ? Put more points (CPU time
increases!), or Smarter : Compute the pobability of touching the
barrier between t i and t i+1
Slide 198
IAE University of Toulouse 2010-2011 198 Monte Carlo and
barrier options Estimating probability of not touching barrier:
Total survival probability: Knock-out option = DF Payoff(S) P
surv
Slide 199
IAE University of Toulouse 2010-2011 199 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
Slide 200
IAE University of Toulouse 2010-2011 200 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
Proceed in a similar manner for other Greek letters
Slide 201
IAE University of Toulouse 2010-2011 201 Demonstration XL
Slide 202
IAE University of Toulouse 2010-2011 202 Finite Difference
Methods Finite difference methods represent the differential
equation as a difference equation Practically speaking, we
transform into and we solve for P(t): the price at the previous
time step is the risk-neutral drift
Slide 203
IAE University of Toulouse 2010-2011 203 Finite Difference
Methods: the main idea We form a grid with equally spaced
time-values and stock-price values 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 time Spot today maturity strike
Call payoff: f f i,j i j
Slide 204
IAE University of Toulouse 2010-2011 204 Finite Difference
Methods Explicit method Spot derivatives are calculated at t=(i+1)t
Implicit method Spot derivatives are calculated at t=it
Slide 205
IAE University of Toulouse 2010-2011 205 Explicit method The
difference equation becomes and after some re-arrangement: more
compactly: For i+1=T mat the function f i+1,j is fully known Solve
above equation iteratively for f i,j in every (i,j) until
i=today
Slide 206
IAE University of Toulouse 2010-2011 206 Explicit method
schematically To calculate the option value at the boundary spots S
min (with j=1) S max (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: This implies:
time=ittime=(i+1)t Spot = (j+1) S Spot = j S Spot = (j-1) S
Slide 207
IAE University of Toulouse 2010-2011 207 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
Slide 208
IAE University of Toulouse 2010-2011 208 Explicit method (not)
at work Unstable if number of time-steps is not big enough
Oscillations are produced and propagate to all spots
Slide 209
IAE University of Toulouse 2010-2011 209 Implicit method More
complex but avoids instabilities of explicit method The difference
equation becomes and after some re-arrangement: more compactly: For
i+1=T mat the function f i+1,j is fully known Solve above equation
iteratively for f i,j in every (i,j) until i=today
Slide 210
IAE University of Toulouse 2010-2011 210 Implicit method
schematically 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
time=ittime=(i+1)t Spot = (j+1) S Spot = j S Spot = (j-1) S
Slide 211
IAE University of Toulouse 2010-2011 211 Explicit vs Implicit
methods In practise we use a combination of the two methods
Crank-Nicolson method Combines efficiency and stability
Slide 212
IAE University of Toulouse 2010-2011 212 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
Slide 213
IAE University of Toulouse 2010-2011 213 Bonds (obligations)
Bond with one unique payment at maturity (zero-coupon) PV=C T
/(1+r) T where PV (present value) is the value of the bond today. C
T 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
Slide 214
IAE University of Toulouse 2010-2011 214 Bonds: example Bond of
maturity 2 years, face value 100 (it pays C T =100 at maturity) A)
interest = 3% per year, annual composition PV=100/(1+0.03) 2 =
94.26 B) interest = 3% per year, monthly composition
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
Slide 215
IAE University of Toulouse 2010-2011 215 Bonds with periodic
coupons Bond with coupons + payment at maturity where PV (present
value) is the value of the bond today. C i is the amount of the i
th coupon (where the reimbursement occurs of the face value if i=T)
r est le taux dintrt pay sur une priode de composition donne
(annuelle, mensuelle ) T is the number of compounding periods =
number of interest payments
Slide 216
IAE University of Toulouse 2010-2011 216 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
Slide 217
IAE University of Toulouse 2010-2011 217 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 : For a bond, D is 0
Slide 218
IAE University of Toulouse 2010-2011 218 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
Slide 219
IAE University of Toulouse 2010-2011219 Risk management and
calculation of VAR
Slide 220
IAE University of Toulouse 2010-2011 220 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.
Slide 221
IAE University of Toulouse 2010-2011 221 VAR: historical
approach identify the parameters of the market that influence the
value of the portfolio: V=f(S 1, S 2, ..) S i : 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:
Slide 222
IAE University of Toulouse 2010-2011 222 Apply these returns
from the past to todays market data and recalculate the value of
the portfolio V j =f(S 1 1 (t 0 -j), S 2 2 (t 0 -j), ..) j=1 N
(number of daily observations) For each scenario replayed,
calculate the profit or loss: PL j = V j - V 0 Order the PnL from
the smaller (great loss) to the larger (great gain) VAR: historical
approach
Slide 223
IAE University of Toulouse 2010-2011 223 p=5% Var is the
largest value such that at least (1-p) of observations are above
it
Slide 224
IAE University of Toulouse 2010-2011 224 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
Slide 225
IAE University of Toulouse 2010-2011 225 Quantile extrapolation
The VAR previously obtained are for p=5% Assuming the observations
of PnL are normally distributed N -1 (p): inverse cumulative normal
function
Slide 226
IAE University of Toulouse 2010-2011 226 Example The 5% VAR of
1-day is 42,000$, what is the value of 10-day 1% VAR?
Slide 227
IAE University of Toulouse 2010-2011 227 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!
Slide 228
IAE University of Toulouse 2010-2011 228 Conditional VAR (CVAR)
Measurement of the average loss exceeding VAR The two distributions
do not have the same CVAR !
Slide 229
IAE University of Toulouse 2010-2011 229 VAR: different
possible implementations Historical simulation Advantages Easy to
calculate Matches data distributions Disadvantages 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
Slide 230
IAE University of Toulouse 2010-2011 230 VAR for a continuous
distribution VAR: some useful identities
Slide 231
IAE University of Toulouse 2010-2011 231 Full revaluation VAR
VS. Linear / Quadratic VAR
Slide 232
IAE University of Toulouse 2010-2011232 Introduction to Credit
Risk
Slide 233
IAE University of Toulouse 2010-2011 233 Credit Loss (loss by
default), definition b i : binary indicator: 1 if default, 0 if not
CE i : credit risk exposure f i : recovery rate in case of
default
Slide 234
IAE University of Toulouse 2010-2011 234 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).
Slide 235
IAE University of Toulouse 2010-2011 235 Actuarial measure of
the default risk (1)
Slide 236
IAE University of Toulouse 2010-2011 236 Actuarial measure of
the default risk (2)
Slide 237
IAE University of Toulouse 2010-2011 237 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 d T Cumulative rate of default between 0
and T: probability that at least one default occurs between 0 and
T: C T Link between C T and d T Survival rate between 0 and T :
St=(1-d 1 ) (1-d 2 ) (1-d T )
Slide 238
IAE University of Toulouse 2010-2011 238 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.
Slide 239
IAE University of Toulouse 2010-2011 239 What is the cumulative
probability that a company currently rated as A faces default in
the next 3 years? Exercise
Slide 240
IAE University of Toulouse 2010-2011240 Trading in the real
world
Slide 241
IAE University of Toulouse 2010-2011 241 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 are Independent
from one tick to the next Identically distributed Normally
distributed
Slide 242
IAE University of Toulouse 2010-2011 242 Market empirical
(stylized) facts Fat tails The market-realised distribution of
log-returns is not Normal Opposite graph 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%
Slide 243
IAE University of Toulouse 2010-2011 243 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
Slide 244
IAE University of Toulouse 2010-2011 244 Market empirical
(stylized) facts Decaying autocorrelations Dependence of
market-returns between different times Graph opposite as function
of where
Slide 245
IAE University of Toulouse 2010-2011 245 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
Slide 246
IAE University of Toulouse 2010-2011 246 Pairs trading at work
Several implementations exist. A possible one: Measure distances
between stocks, S a and S b, across timeseries 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)
Slide 247
IAE University of Toulouse 2010-2011 247 Pairs trading at work:
an example Algorithm gives signals for distances higher than
1.5standard deviation of the mean
Slide 248
IAE University of Toulouse 2010-2011 248 Kellys 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
Slide 249
IAE University of Toulouse 2010-2011 249 Kellys criterion for
coin-tossing Notation You played N times Number of times you won: W
Number of times you lost: L Win probability p=W/N Lose probability
q=1-p Initial capital X 0 Strategy Each time you bet a fraction of
your remaining capital f Example: 1 st time: Capital to bet: f X 0
Capital that remains: (1- f) X 0 This time you lose 2 nd time:
Capital to bet: f (1- f )X 0 Capital that remains: (1- f) (1- f) X
0 After n rounds Capital that remains: (1- f) L (1+ f) W X 0
Slide 250
IAE University of Toulouse 2010-2011 250 Kellys criterion for
coin-tossing Remaining capital after n rounds X n =(1- f) L (1+ f)
W X 0 Ratio (in logarithm): Take expectations:
Slide 251
IAE University of Toulouse 2010-2011 251 Kellys criterion for
coin-tossing Choose f opt maximizes the Kelly function This is the
optimal fraction that leads to the maximal expected capital Avoid
Ruin fraction f ruin that leads to a negative capital: you lose all
your money f opt =p-q
Slide 252
IAE University of Toulouse 2010-2011 252 References Options,
futures and other derivatives J. Hull (2008) Prentice Hall Monte
Carlo Methods in Finance P. Jckel (2003) Wiley Stochastic Calculus
for Finance II: Continuous-Time Models S. Shreve (2004) Springer
Finance Pricing Financial Instruments: The finite-difference method
D. Tavella and C. Randal (2000) Wiley Monte Carlo methods in
financial engineering P. Glasserman (2000) Springer Paul Wilmott on
Quantitative Finance 3 Vol Set Paul Wilmott (2000) Wiley Financial
Risk Manager Handbook P. Jorion (2009) Wiley Finance
Slide 253
IAE University of Toulouse 2010-2011 253 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.
Slide 254
IAE University of Toulouse 2010-2011 254 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 e aX 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).
Slide 255
IAE University of Toulouse 2010-2011 255 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, r EUR = 4%, r USD = 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. Show that for small
t, the relations 15. Derive the density function of a logNormal
random variable. 16. Calculate the mean and the variance of a
log-normal density with parameters , . are solutions of 2 t = pu 2
+ (1 p )d 2 e 2(r-q) t u = 1/ d
Slide 256
IAE University of Toulouse 2010-2011 256 Exercises: 17.
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? 18. Calculate the number
using a Monte-Carlo method 19. 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 Black- Scholes formula 20.
Show that the variables 1, 2 obtained from Choleskys decomposition
have a correlation equal to 21. Compute analytically the Delta,
Gamma and Vega of a Put option
Slide 257
IAE University of Toulouse 2010-2011 257 Exercises: 22. Using
Its 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). 23. Using Its 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 S T >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).
Slide 258
IAE University of Toulouse 2010-2011 258 Exercises: 28. Find
the stochastic derivatives of the process: X t =W t 2 -t and X t =W
t 2 -W t t 29. Write a Monte Carlo program in VBA that simulates a
coin-tossing game and verify that the optimal fraction of capital f
opt proven by Kelly leads to the maximum expected capital 30.
Demonstrate that if W t is a brownian motion then E[(W t -W s ) 2
]=t-s