models of heston type - university college london

59
Stochastic Volatility Models of Heston Type Prof William Shaw King's College London [2009 update for Mathematica 7 and yet another branch cut discussion]

Upload: others

Post on 27-Oct-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Models of Heston Type - University College London

Stochastic VolatilityModels of Heston Type

Prof William ShawKing's College London[2009 update for Mathematica 7 and yet another branch cut discussion]

Page 2: Models of Heston Type - University College London

Coupled SDEs for Stochastic Volatility

We begin by writing down the usual Geometric Brownian Motion SDE where the volatility s is written as the square root of a variance v :

d S = S m d t + S v d Z1

The variance v is constant in the original Black-Scholes model. Now it is assumed to follow its own SDE in the form

Page 3: Models of Heston Type - University College London

d v = Hw - q vL d t + e vg d Z2

This representation models mean-reversion in the volatility or variance. We allow for a correlation r between d Z1and d Z2.

Page 4: Models of Heston Type - University College London

Applying Ito to the Hedging Portfolio

We cannot hold or "short" volatility as is, but we can hold a position in a second option to do the hedging. So if we consider the valuation of a volatility dependent instrument V , we shall assume that we can take long or short positions in a second (vol dep't) instrument U as well as in the underlying S. So our candidate for an instantaneously risk-neutral portfolio P is (q is just the "vol delta" here)

P = V - f S - qU

As is by now standard, we apply Ito's Lemma to this portfolio to obtain:

Page 5: Models of Heston Type - University College London

As is by now standard, we apply Ito's Lemma to this portfolio to obtain:

d P = a d S + b d v + c d t

where, with D the yield on the asset S.

a =∂V∂S

- f - q∂U∂S

b =∂V∂v

- q∂U∂v

Page 6: Models of Heston Type - University College London

c =∂V∂ t

+12v S2

∂2V∂S2

+ e r S vg+12

∂2V∂S ∂v

+12e2 v2 g

∂2V∂v2

- fD S

- q∂U∂ t

+12v S2

∂2U∂S2

+ e r S vg+12

∂2U∂S ∂v

+12e2 v2 g

∂2U∂v2

Risk-Neutralization and No-Arbitrage

Clearly we wish to eliminate the stochastic component of risk by setting a = b = 0, so we obtain the hedge parameters in the form:

Page 7: Models of Heston Type - University College London

q =∂V∂v

ì∂U∂v

f =∂V∂S

- q∂U∂S

Note that f is the net delta once both options are taken into account.

The avoidance of arbitrage, once these choices of q, f are made, is the condition:

d P = rP dt

These last 3 equations in combination result in a superficially messy equation, which (after some cleaning up!) results in a condition we write as:

Page 8: Models of Heston Type - University College London

These last 3 equations in combination result in a superficially messy equation, which (after some cleaning up!) results in a condition we write as:

∂V∂ t

+12v S2

∂2V∂S2

+ e r S vg+12

∂2V∂S ∂v

+

12e2 v2 g

∂2V∂v2

+ Hr -DL S∂V∂S

- r V ì∂V∂v

=

∂U∂ t

+12v S2

∂2U∂S2

+ e r S vg+12

∂2U∂S ∂v

+

12e2 v2 g

∂2U∂v2

+ Hr -DL S∂U∂S

- r U ì∂U∂v

Now V , U are an arbitrary pair of derivative contracts, so both sides of this equation are equal to some function depending only on S, v , t . So we write both sides as -f HS, v , tL, where f is the real-world drift term less the market price of risk:

Page 9: Models of Heston Type - University College London

Now V , U are an arbitrary pair of derivative contracts, so both sides of this equation are equal to some function depending only on S, v , t . So we write both sides as -f HS, v , tL, where f is the real-world drift term less the market price of risk:

f = w - v q - L

This results in the following partial differential equation for V :

∂V∂ t

+12v S2

∂2V∂S2

+ e r S vg+12

∂2V∂S ∂v

+

12e2 v2 g

∂2V∂v2

+ Hr -DL S∂V∂S

+ HHw - v qL - LL∂V∂v

- r V = 0

The Heston Model

Page 10: Models of Heston Type - University College London

The Heston Model

This is a special case of this scheme where g = 1 ê2, and the market price of risk function L = l v . Furthermore, the real-world volatility drift is re-parametrized in the form

w - v q = k Hq - vL

Heston's paper (see the Risk book on Volatility) argues there is evidence for this choice of L. The Heston PDE is then

Page 11: Models of Heston Type - University College London

∂V∂ t

+12v S2

∂2V∂S2

+ e r S v∂2V∂S ∂v

+12e2 v2

∂2V∂v2

+

Hr -DL S∂V∂S

+ Hk q - Hk + lL vL∂V∂v

- r V = 0

The SDEs for Simulation and the general PDE:

If one wishes to use a Monte Carlo scheme to calculate risk-neutral expectations, we can now write it down the relevant SDEs as the pair, (with correlation r between the noise terms):

Page 12: Models of Heston Type - University College London

d S = S Hr -DL d t + S v d Z1

d v = Hk Hq - vL - LL d t + e vg d Z2

We abbreviate the second of these in the form

d v = bHvL d t + aHvL d Z2

In doing so we are following the notation established in the book by Lewis. In this notation the PDE is

Page 13: Models of Heston Type - University College London

∂V∂ t

+12v S2

∂2V∂S2

+ r S v aHvL∂2V∂S ∂v

+

12a2HvL

∂2V∂v2

+ Hr -DL S∂V∂S

+ bHvL∂V∂v

- r V = 0

This allows us to consider how to solve without reference to the particular volatility SDE - in practice we shall be driven back to the Heston class for tractability, but (see e.g. Lewis again) we can establish the principle of solution for this more general case.

Page 14: Models of Heston Type - University College London

Transformation of the PDE

ü A Preliminary Change of Variables

With regard to discounting and its S-dependence, there is a lot of similarity between this PDE and the original Black-Scholes PDE. So we begin by applying a similar set of transformations. We let, with T the maturity of the contract:

t = T - t

x = logHSL + Hr -DL HT - tL

Page 15: Models of Heston Type - University College London

V = WHx, v, tL ‰-r HT-tL

Some routine calculus using the chain rule leads to a PDE for W in the form:

12v

∂2W∂x2

-∂W∂x

+

r,v aHvL

∂2W∂x∂v

+12a2HvL

∂2W∂v2

+ bHvL∂W∂v

=∂W∂t

Page 16: Models of Heston Type - University College London

ü Fourier Transformation

We introduce the Fourier Transform (FT) in the form

WHx, v, tL =12 p ‡

¶‰- w xW

èHw, v, tL „w

WèHw, v, tL = ‡

¶‰Â w xWHx, v, tL „ x

At maturity, where t = 0, we have

Page 17: Models of Heston Type - University College London

WèHw, v, 0L = ‡

¶‰Â w xWHx, v, 0L „ x = ‡

¶‰Â w x VHx, v, 0L „ x

which is the FT of the payoff expressed in terms of the log of the asset price.

ü The Transforms of some useful payoffs

We will need to be able to deal with a few common types of payoff, so it is a good idea to see how these are calculated. Their role in generating solutions to the PDE will be considered shortly.

Page 18: Models of Heston Type - University College London

„ The Vanilla Call

Here the payoff is Max@S -K , 0D in terms of our original variables. In terms of our logarithmic variables we have

VHx, v, 0L =MaxH‰x - K, 0L

so the Fourier transform of the payoff is of the form:

Page 19: Models of Heston Type - University College London

WCèHw, v, 0L = ‡

¶‰Â w x VHx, v, 0L „ x = ‡

¶‰Â w xMaxH‰x - K, 0L „ x

= ‡Log@KD

¶‰Â w x H‰x - KL „ x = ‡

Log@KD

¶I‰H1+ wL x - K ‰Â w xM „ x

We need to check when this integral actually converges, and bear in mind that w can be any complex number. We need the exponentials to decay as x becomes large so that the integral converges. This will ONLY happen if ImHwL > 1. When this is true we can evaluate the integral, some simplification of which (exercise) gives:

Page 20: Models of Heston Type - University College London

WCèHw, v, 0L =

KH1+Â wL

 w - w2

„ The Vanilla Put

Here matters go through very similarly, except that this time the integral converges only if ImHwL < 0. When this is true we find we get an identical transform:

WPèHw, v, 0L =

KH1+Â wL

 w - w2

The difference in this approach between the Call and the Put is in where the transform is defined, and hence where the inversion contour lies.

Page 21: Models of Heston Type - University College London

The difference in this approach between the Call and the Put is in where the transform is defined, and hence where the inversion contour lies.

„ Digital Calls and Puts

For a Digital Call the transformed payoff is

WèDCHw, v, 0L =

-KÂ w

 w

subject to ImHwL > 0. For a digital put we have

WèDPHw, v, 0L =

+KÂ w

 w

subject to the condition Im(w) < 0.

Page 22: Models of Heston Type - University College London

subject to the condition Im(w) < 0.

Transformed PDE

Recall that the Hx , v , tL PDE for W was

12v

∂2W∂x2

-∂W∂x

+

r v aHvL∂2W∂x∂v

+12a2HvL

∂2W∂v2

+ bHvL∂W∂v

=∂W∂t

We now have:

Page 23: Models of Heston Type - University College London

We now have:

WHx, v, tL =12 p ‡

¶‰- w xW

èHw, v, tL „w

so that differentiation w.r.t x bcomes multiplication by -i w in the transform.

12a2HvL

∂2Wè

∂v2+ IbHvL - Â w r v aHvLM

∂Wè

∂v-12v Iw2 - Â wMW

è=

∂Wè

∂t

Page 24: Models of Heston Type - University College London

The Fundamental Solution

Suppose that we can find a solution of this PDE, say GHw, v , tL, with the property that GHw, v , 0L = 1. Then the solution to the transformed PDE with payoff condition W

èHw, v , 0L (which does

NOT in fact depend on v ) is just the product of this with G. Then the solution to our original PDE is just the discounted value of this with our various coordinate changes unwound:

V =12 p

‰-r HT-tL ‡Â c-¶

 c+¶‰- w xW

èHw, v, 0LGHw, v, T - tL „w

where

Page 25: Models of Heston Type - University College London

where

x = logHSL + Hr -DL HT - tL

„ Greeks for free(-ish)

Before figuring out G, we should point out that this is a remarkably useful representation! If you want to differentiate V with respect to S to obtain D you merely multiply the integrand by

-HÂ wL ê S

and for G the integrand is multiplied by

Page 26: Models of Heston Type - University College London

-w2

S2

This representation also makes obvious the link between r and D. (Check it by noting that r appears in two places).

Page 27: Models of Heston Type - University College London

„ Finding the Fundamental Solution

So far we have done a lot of fancy analysis without yet solving a PDE. Now we really do have to. We need to find G. The book by Lewis discusses how to do this with more general market price of risk functions, but here we will stick to Heston specification in this regard. Keeping g general for a moment longer, but otherwise inserting the forms of a and b specific to Heston's model, we now have:

Page 28: Models of Heston Type - University College London

∂G∂t

=12e2 v2 g

∂2G∂v2

-12v Iw2 - Â wMG +

Ik Hq - vL - l v - Â w e r vg+1ê2M∂G∂v

subject to the condition GHw, v , 0L = 1.

So far as your lecturer is aware, it is only known how to solve this in the case g = 1 ê2. In this case the PDE coefficients all become linear in v :

∂G∂t

=12e2 v

∂2G∂v2

-12v Iw2 - Â wMG + Hk Hq - vL - l v - Â w e r vL

∂G∂v

What Heston did (though he did not quite present things this way, doing instead an analysis of vanilla calls in detail) was to try to find a solution in the form

Page 29: Models of Heston Type - University College London

What Heston did (though he did not quite present things this way, doing instead an analysis of vanilla calls in detail) was to try to find a solution in the form

G = ‰C@t,wD+v D@t,wD

You may recall such a device was used to deal with bond-pricing equations in affine models. Here it works just as neatly. We also demand that

C@0, wD = 0 = D@0, wD

in order to satisfy the condition that G = 1 at maturity. If we substitute this assumption for the form of G into the PDE we obtain the condition (the dots denote the t-derivative):

Page 30: Models of Heston Type - University College London

in order to satisfy the condition that G = 1 at maturity. If we substitute this assumption for the form of G into the PDE we obtain the condition (the dots denote the t-derivative):

C°+ v D

°=12D2 v e2 +D HHq - vL k - l v - Â w e r vL -

12v Iw2 - Â wM

This must be true for all v so we separately equate the terms that are independent of v and linear in v , to obtain the pair of ODEs

C°= q kD

D°=12D2 e2 -D H k + l + Â w e r L -

12Iw2 - Â wM

The second of these must be solved first, for D; then the first must be solved for C. The solutions are most easily expressed in terms of some auxiliary functions d , g defined as follows:

Page 31: Models of Heston Type - University College London

The second of these must be solved first, for D; then the first must be solved for C. The solutions are most easily expressed in terms of some auxiliary functions d , g defined as follows:

d = ,IIw2 - Â wM e2 + Hk + l + Â e r wL2M

g = Hk + l + Â e r w + dL ê Hk + l + Â e r w - dL

The function D is then given by

D = Hk + l + Â e r w + dL ë e2 I1 - ‰d tM ë I1 - g ‰d tM

and a further integration leads to the anlaytical representation of C in the form:

Page 32: Models of Heston Type - University College London

and a further integration leads to the anlaytical representation of C in the form:

C = Hk qL ë e2 IHk + l + Â e r w + dL t - 2 LogA I1 - g ‰d tM ë H1 - gLEM

It is however, better, if slower to do direct numerical integration of the ODE for C as you avoid the branch cut difficulties arising from the choice of the branch of the complex log. Alternatively one can rewrite the solution to manage the log in a different way. This concludes the solution of the model. All that remains, to price instruments, is to work out the inverse transform integrals.

Implementation

Page 33: Models of Heston Type - University College London

Implementation

How you implement these things depends a LOT on how complex-number-friendly your computing environment is. If the system can cope with complex functions and their integrals, you just get on with it.

First we do the reliable but slow version where the Log is avoided in favour of a numerical integration:

Page 34: Models of Heston Type - University College London

In[1]:= GFundTrans@t_, w_, v_, k_, l_, q_, e_, r_D :=Module@8s,d = Sqrt@Hk + l + r * e * I * w L^2 + e^2 Hw^2 - I * wLD,g, DD, CC<,

g = Hk + l + r * e * I * w + dL ê Hk + l + r * e * I * w - dL;DD@s_D := HHk + l + r * e * I * w + dL ê e^2L *

H1 - Exp@d * sDL ê H1 - g * Exp@d * sDL;CC := k * q * NIntegrate@DD@sD, 8s, 0, t<D;Exp@CC + DD@tD * vDD

Page 35: Models of Heston Type - University College London

In[2]:= HestonCall@S_, K_, s_, r_, D_, t_, T_, k_, q_,e_, r_, l_, trunc_D :=

Module@8v = s ^2, t = T - t, im = 2<,Exp@-r * HT - tLD ê H2 * PiLChop@NIntegrate@

Exp@-I * Hw + I * imL * HLog@SD + Hr - DL * tLD *GFundTrans@t, w + I * im, v, k, l, q, e, rD *K ^H1 + I * Hw + I * imLL êHI * Hw + I * imL - Hw + I * imL^2L,

8w, -trunc, trunc<, MaxRecursion Ø 16,Compiled Ø FalseDDD

Page 36: Models of Heston Type - University College London

In[3]:= HestonPut@S_, K_, s_, r_, D_, t_, T_, k_, q_,e_, r_, l_, trunc_D :=

Module@8v = s ^2, t = T - t, im = -1 ê 4<,Exp@-r * HT - tLD ê H2 * PiLChop@NIntegrate@

Exp@-I * Hw + I * imL * HLog@SD + Hr - DL * tLD *GFundTrans@t, w + I * im, v, k, l, q, e, rD *K ^H1 + I * Hw + I * imLL êHI * Hw + I * imL - Hw + I * imL^2L,

8w, -trunc, trunc<, MaxRecursion Ø 30,WorkingPrecision Ø 20, Compiled Ø FalseDDD

Mathematica 6 and 7 are increasingly fussy and spew out some complaints about convergence that can generally be ignored, so we suppress them as follows.

Page 37: Models of Heston Type - University College London

Mathematica 6 and 7 are increasingly fussy and spew out some complaints about convergence that can generally be ignored, so we suppress them as follows.

In[4]:= Off@NIntegrate::inumrDOff@NIntegrate::slwconD

In[6]:= hcbase = HestonCall@1, 1, 0.183, [email protected],[email protected], 0, 2, 1.29, 0.223^2, 0.431, -0.514,0, 250D

Out[6]=

0.102466

Let's explore the "branch cut problem", first using direct numerical integration, which works well:

Page 38: Models of Heston Type - University College London

Let's explore the "branch cut problem", first using direct numerical integration, which works well:

In[7]:= numheston =Table@HestonCall@100, 100, 0.2, 0.05, 0, 0, t,

2, 0.09, 1, -0.3, 0, 500D , 8t, 4, 20, 1<D

Out[7]=

829.9435, 34.4503, 38.5152, 42.2215, 45.6266,48.7723, 51.6906, 54.4069, 56.9418, 59.3125, 61.5336,63.6177, 65.5756, 67.417, 69.1505, 70.7837, 72.3235<

Page 39: Models of Heston Type - University College London

In[8]:= ListPlot@%D

Out[8]=

5 10 15

40

50

60

70

On the other hand, if we just use the orginal formula, analytically:

Page 40: Models of Heston Type - University College London

On the other hand, if we just use the orginal formula, analytically:

In[9]:= GFundTransAnalBad@t_, w_, v_, k_, l_, q_, e_, r_D :=Module@8s,d = Sqrt@Hk + l + r * e * I * w L^2 + e^2 Hw^2 - I * wLD,g, DD, CC<,

g = Hk + l + r * e * I * w + dL ê Hk + l + r * e * I * w - dL;DD@s_D := HHk + l + r * e * I * w + dL ê e^2L *

H1 - Exp@d * sDL ê H1 - g * Exp@d * sDL;CC@s_D := HHk * qL ê e^2L *

HHk + l + I * e * r * w + dL * s -2 * Log@Hg * Exp@d * sD - 1L ê Hg - 1LDL;

Exp@CC@tD + DD@tD * vDD

Page 41: Models of Heston Type - University College London

In[10]:=

HestonCallBad@S_, K_, s_, r_, D_, t_, T_, k_,q_, e_, r_, l_, trunc_D :=

Module@8v = s ^2, t = T - t, im = 2<,Exp@-r * HT - tLD ê H2 * PiLChop@NIntegrate@

Exp@-I * Hw + I * imL * HLog@SD + Hr - DL * tLD *GFundTransAnalBad@t, w + I * im, v, k, l, q, e, rD *K ^H1 + I * Hw + I * imLL êHI * Hw + I * imL - Hw + I * imL^2L,

8w, -trunc, trunc<, MaxRecursion Ø 16,WorkingPrecision Ø 16, Compiled Ø FalseDDD

Page 42: Models of Heston Type - University College London

In[11]:=

Off@NIntegrate::ncvbD

In[12]:=

Table@HestonCallBad@100, 100, 0.2, 0.05, 0, 0,t, 2, 0.09, 1, -0.3, 0, 500D , 8t, 4, 20, 1<D

Out[12]=

829.9435, 34.399, 36.73, 38.1939, 39.8134, 41.9644, 44.7881,48.3503, 52.6773, 57.8207, 63.7842, 70.6268, 78.4064, 87.3188,48.6401 + 1.26425 Â, 54.3025 + 0.51456 Â, 60.6018 - 0.571827 Â<

Page 43: Models of Heston Type - University College London

In[13]:=

ListPlot@Abs@%DD

Out[13]=

5 10 15

40

50

60

70

80

That is clearly rubbish. The Appled Mathematical Finance paper by Guo and Hung proposed (as indeed did others, notably Lord) that instead of the closed-form integral

Page 44: Models of Heston Type - University College London

That is clearly rubbish. The Appled Mathematical Finance paper by Guo and Hung proposed (as indeed did others, notably Lord) that instead of the closed-form integral

CC@t_D :=HHk * qL ê e^2L *HHk + l + I * e * r * w + dL * t -

2 * Log@Hg * Exp@d * tD - 1L ê Hg - 1LDL

we use instead the form:

Page 45: Models of Heston Type - University College London

CCnew@t_D :=HHk * qL ê e^2L *HHk + l + I * e * r * w - dL * t -

2 * Log@Hg - Exp@-d * tDL ê Hg - 1LDL

These are mathematically equivalent, as you can see by factoring out the Log of Exp[-d t], or using the computer:

Simplify@PowerExpand@CC@tD - CCnew@tDDD

0

We redefine the analytical implementation then as follows

Page 46: Models of Heston Type - University College London

We redefine the analytical implementation then as follows

Page 47: Models of Heston Type - University College London

In[14]:=

GFundTransNew@t_, w_, v_, k_, l_, q_, e_, r_D :=Module@8s,d = Sqrt@Hk + l + r * e * I * w L^2 + e^2 Hw^2 - I * wLD,g, DD, CC<,

g = Hk + l + r * e * I * w + dL ê Hk + l + r * e * I * w - dL;DD@s_D := HHk + l + r * e * I * w + dL ê e^2L *

H1 - Exp@d * sDL ê H1 - g * Exp@d * sDL;CCnew@s_D :=HHk * qL ê e^2L *HHk + l + I * e * r * w - dL * s -

2 * Log@Exp@-d * sD * Hg * Exp@d * sD - 1L ê Hg - 1LDL;Exp@CCnew@tD + DD@tD * vDD

Page 48: Models of Heston Type - University College London

In[15]:=

HestonCallNew@S_, K_, s_, r_, D_, t_, T_, k_,q_, e_, r_, l_, trunc_D :=

Module@8v = s ^2, t = T - t, im = 2<,Exp@-r * HT - tLD ê H2 * PiLChop@NIntegrate@

Exp@-I * Hw + I * imL * HLog@SD + Hr - DL * tLD *GFundTransNew@t, w + I * im, v, k, l, q, e, rD *K ^H1 + I * Hw + I * imLL êHI * Hw + I * imL - Hw + I * imL^2L,

8w, -trunc, trunc<, MaxRecursion Ø 16,WorkingPrecision Ø 16, Compiled Ø FalseDDD

Page 49: Models of Heston Type - University College London

In[16]:=

newanaldata =Table@HestonCallNew@100, 100, 0.2, 0.05, 0, 0,

t, 2, 0.09, 1, -0.3, 0, 500D , 8t, 4, 20<D

Out[16]=

829.9435, 34.4503, 38.5152, 42.2215, 45.6266,48.7723, 51.6906, 54.4069, 56.9418, 59.3125, 61.5336,63.6177, 65.5756, 67.417, 69.1505, 70.7837, 72.3235<

To compare with the robust numerical integration.

Page 50: Models of Heston Type - University College London

In[17]:=

newanaldata - numheston

Out[17]=

9-1.56319µ 10-13, -2.4869µ 10-12, 2.34479µ 10-12,-9.45022µ 10-13, 8.17835µ 10-12, 1.91847µ 10-12, 3.2685µ 10-12,1.48503µ 10-12, -2.51532µ 10-12, -1.29319µ 10-11,-1.48077µ 10-11, 9.82681µ 10-12, 4.09557µ 10-11, -1.9142µ 10-11,-5.41576µ 10-11, -2.84217µ 10-14, 5.68434µ 10-14=

which is good, and could be made even smaller if we fiddle with the integration parameters. A lot of ink has been spilled on the branch cut issue. If people had consistently worked out the complex log by a proper integration there would never have been a problem.

Page 51: Models of Heston Type - University College London

which is good, and could be made even smaller if we fiddle with the integration parameters. A lot of ink has been spilled on the branch cut issue. If people had consistently worked out the complex log by a proper integration there would never have been a problem.

Generating a Skew

We can work out the Black-Scholes implied volatility by applying an implied calculator to the Heston price data, for fixed S and various strikes (or indeed maturity)

In[29]:=

Ncdf[(z_)?NumberQ] := N[0.5*Erf[z/Sqrt[2]] + 0.5];Ncdf[x_] := (1 + Erf[x/Sqrt[2]])/2

Page 52: Models of Heston Type - University College London

In[31]:=

done[s_, s_, k_, t_, r_, q_] := ((r - q)*t + Log[s/k])/(s*Sqrt[t]) + (s*Sqrt[t])/2; dtwo[s_, s_, k_, t_, r_, q_] := ((r - q)*t + Log[s/k])/(s*Sqrt[t]) - (s*Sqrt[t])/2;

In[37]:=

BlackScholesCall[s_, k_, v_, r_, q_, t_] := s*Exp[-q*t]*Ncdf[done[s, v, k, t, r, q]]-k*Exp[-r*t]*Ncdf[dtwo[s, v, k, t, r, q]]; BlackScholesPut[s_, k_, v_, r_, q_, t_] := k*Exp[-r*t]*Ncdf[-dtwo[s, v, k, t, r, q]]-s*Exp[-q*t]*Ncdf[-done[s, v, k, t, r, q]]

Page 53: Models of Heston Type - University College London

In[42]:=

BlackScholesCallImpVol[s_,k_,r_,q_,t_,optionprice_]:=sd /. FindRoot[BlackScholesCall[s,k, sd, r, q, t]== optionprice,{sd,0.2}];

BlackScholesPutImpVol[s_,k_,r_,q_,t_,optionprice_] :=sd /. FindRoot[BlackScholesPut[s,k, sd, r, q, t]== optionprice,{sd,0.2}];

In[44]:=

ivdata =Table@8K, BlackScholesCallImpVol@1, K, [email protected],

[email protected], 2.0, HestonCallNew@1, K, 0.183,[email protected], [email protected], 0, 2.0, 1.29,0.223^2, 0.431, -0.514, 0, 250DD<,

8K, 0.7, 1.3, 0.02<D ;

Page 54: Models of Heston Type - University College London

In[45]:=

ivplotw = ListPlot@ivdata, PlotRange Ø All,PlotStyle Ø [email protected]`DD

Out[45]=

0.8 0.9 1.0 1.1 1.2 1.3

0.18

0.19

0.20

0.21

0.22

0.23

ü Calibration Issues

Page 55: Models of Heston Type - University College London

ü

Calibration Issues

The selection on the non-trivial parameters can be time-consuming. Ideally one selects some market data and fits the various relevant numbers. This can be time-consuming witih the full transform model. The temptation is to use an analytic expansion, e.g. in terms of volatility - this is discussed by Lewis. My recent experience is that this tracks the full Heston model well (for 20%- ish class vols) for a narrow range of moneyness and times up to about 2 years.

Page 56: Models of Heston Type - University College London

ü Simulation Issues for Exotics

If you want to do Heston with exotics, where there is not just a simple European payoff, but there is no early exercise, then Monte Carlo simulation is called for. In sharp contrast to ordinary Black-Scholes, the coupled pair of SDEs

d S = S Hr -DL d t + S v d Z1

d v = Hk Hq - vL - LL d t + e v1ê2 d Z2

Page 57: Models of Heston Type - University College London

cannot readily be treated in terms of long jumps between dates relevant to the contract. With a simple Euler scheme

D S = S Hr -DLD t + S v D Z1

D v = Hk Hq - vL - LLD t + e v1ê2 D Z2

The paths have to be very finely sampled to get agreement with the exact transform solution. A full vector Milstein scheme can be written down, but it involves non-trivial double stochastic integrals, the main issue being the computation of the "Levy Stochastic Area". The second SDE is not a poblem. The first one is the hard one, because v varies stochastically during the one-time-step evolution of S. Computation of the Levy Area can be done by sub-sampling, but then you may be on safer ground going back to Euler with finer paths! See Kloeden and Platen.section 10.3 if you want to be clever with a scheme with OID t3ê2M error. It is a lot less hairy working with Euler, with an OHD tL error, and just making D t small.

Page 58: Models of Heston Type - University College London

The paths have to be very finely sampled to get agreement with the exact transform solution. A full vector Milstein scheme can be written down, but it involves non-trivial double stochastic integrals, the main issue being the computation of the "Levy Stochastic Area". The second SDE is not a poblem. The first one is the hard one, because v varies stochastically during the one-time-step evolution of S. Computation of the Levy Area can be done by sub-sampling, but then you may be on safer ground going back to Euler with finer paths! See Kloeden and Platen.section 10.3 if you want to be clever with a scheme with OID t3ê2M error. It is a lot less hairy working with Euler, with an OHD tL error, and just making D t small.

References

P.E. Kloeden and E. Platen, Numerical Solution of Stochastic Differential Equations, Springer 1999.

Guo, J-H. and M.-W. Hung (2007). “A note on the discontinuity problem in Hestonʼs stochastic volatility model”, Applied Mathematical Finance, vol. 14, no. 4, pp. 339-345.

See also, Lord, AMF forthcoming (last word?)

S.L. Heston, Closed-Form Solution for Options with Stochastic Volatility, most easily found in "Volatility", ed. R. Jarrow, RISK books.

A.L. Lewis, Option Valuation Under Stochastic Volatility, Finance Press.

Page 59: Models of Heston Type - University College London

P.E. Kloeden and E. Platen, Numerical Solution of Stochastic Differential Equations, Springer 1999.

Guo, J-H. and M.-W. Hung (2007). “A note on the discontinuity problem in Hestonʼs stochastic volatility model”, Applied Mathematical Finance, vol. 14, no. 4, pp. 339-345.

See also, Lord, AMF forthcoming (last word?)

S.L. Heston, Closed-Form Solution for Options with Stochastic Volatility, most easily found in "Volatility", ed. R. Jarrow, RISK books.

A.L. Lewis, Option Valuation Under Stochastic Volatility, Finance Press.