compute the local volatilities given option prices - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Financial Instruments : Finance/LocalVolatility

Finance[LocalVolatility] - compute the local volatilities given option prices

Calling Sequence

LocalVolatility(C, S, T, r, d, t, K)

Parameters

C

-

algebraic expression or a procedure; price of a European call option

S

-

list or Vector; values of the underlying asset

T

-

list or Vector; time (in years)

r

-

non-negative constant, algebraic expression or a yield term structure; risk-free rate

d

-

non-negative constant, algebraic expression or a yield term structure; dividend yield

t

-

name; variable representing time to maturity

K

-

name; variable representing the strike price

Description

• 

The LocalVolatility command computes local volatilities of the underlying asset implied by the specified prices of European call options. It is assumed that the underlying asset evolves according to the stochastic differential equation

dStSt=rtdtσSt,t22dt+σSt,tdWt

where

– 

r=rt is the risk-free rate,

– 

d=dt is the dividend yield,

– 

σ=σS,t is the local volatility,

and

– 

Wt is the standard Wiener process.

• 

Note that the local volatility is a function of both time and the value of the underlying asset.

• 

Let P=Pt,K denote the undiscounted price of the European call option with strike price K and maturity time t drawn on the underlying asset. If P(t, K) is known for all 0t and 0K, then the local volatility sigma(S, t) of the underlying asset can be determined using the following equation:

tPt,K=σt,K2K22K2Pt,K2+rtdtPt,KKKPt,K

• 

The parameter C is the discounted price of the European call option given as a function of the maturity time t and the strike price K.

• 

The parameter S specifies values of the underlying asset for which local volatilities are to be computed. The parameter T specifies times for which local volatilities are to be computed. The LocalVolatility command returns a matrix V such that Vi,j is the local volatility of the underlying asset at time Tj when the value of the underlying asset is Si.

• 

The r and d parameters are the risk-free rate and the dividend yield. These parameters can be given in either the algebraic form or the operator form. If any of the parameters C, r, or d are given in the algebraic form, the parameters t and K must be specified to determine which variable represents time and which variable represents the strike price.

Examples

withFinance:

r:=0.05

r:=0.05

(1)

d:=0.03

d:=0.03

(2)

S0:=100

S0:=100

(3)

σ:=t→0.3

σ:=t→0.3

(4)

C:=BlackScholesPrice100,K,t,σ,r,d

C:=100.ⅇ0.03000000000t0.5000000000+0.5000000000erf2.357022602ln100.K+0.06500000000tt1.ⅇ0.05000000000tK0.5000000000+0.5000000000erf2.357022603ln100.K+0.06500000000tt0.2121320343t

(5)

L:=LocalVolatilityC,S,T,r,d,t,K

L:=20.03ⅇ0.05T100.ⅇ0.03000000000T0.5000000000+0.5000000000erf2.357022602ln100.S+0.06500000000TT1.ⅇ0.05000000000TS0.5000000000+0.5000000000erf2.357022603ln100.S+0.06500000000TT0.2121320343T+ⅇ0.05T3.000000000ⅇ0.03000000000T0.5000000000+0.5000000000erf2.357022602ln100.S+0.06500000000TT+56.41895835ⅇ0.03000000000Tⅇ5.555555546ln100.S+0.06500000000T2T0.1532064691T1.178511301ln100.S+0.06500000000TT3/2+0.05000000000ⅇ0.05000000000TS0.5000000000+0.5000000000erf2.357022603ln100.S+0.06500000000TT0.2121320343T0.5641895835ⅇ0.05000000000TSⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T20.0471404520T1.178511302ln100.S+0.06500000000TT3/2+0.02Sⅇ0.05T132.9807600ⅇ0.03000000000Tⅇ5.555555546ln100.S+0.06500000000T2TST1.ⅇ0.05000000000T0.5000000000+0.5000000000erf2.357022603ln100.S+0.06500000000TT0.2121320343T+1.329807601ⅇ0.05000000000Tⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T2TS2ⅇ0.05T1477.563997ⅇ0.03000000000Tln100.S+0.06500000000Tⅇ5.555555546ln100.S+0.06500000000T2TT3/2S2+132.9807600ⅇ0.03000000000Tⅇ5.555555546ln100.S+0.06500000000T2TS2T+1.329807601ⅇ0.05000000000Tⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T2ST+6.268773146ⅇ0.05000000000T2.357022603ln100.S+0.06500000000TT0.2121320343Tⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T2ST

(6)

plot3dL,S=80..120,T=0.2..2,axes=BOXED

First you obtain a symbolic expression for the local volatility in terms of time and underlying value.

LocalVolatilityC,S,T,r,d,t,K

20.03ⅇ0.05T100.ⅇ0.03000000000T0.5000000000+0.5000000000erf2.357022602ln100.S+0.06500000000TT1.ⅇ0.05000000000TS0.5000000000+0.5000000000erf2.357022603ln100.S+0.06500000000TT0.2121320343T+ⅇ0.05T3.000000000ⅇ0.03000000000T0.5000000000+0.5000000000erf2.357022602ln100.S+0.06500000000TT+56.41895835ⅇ0.03000000000Tⅇ5.555555546ln100.S+0.06500000000T2T0.1532064691T1.178511301ln100.S+0.06500000000TT3/2+0.05000000000ⅇ0.05000000000TS0.5000000000+0.5000000000erf2.357022603ln100.S+0.06500000000TT0.2121320343T0.5641895835ⅇ0.05000000000TSⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T20.0471404520T1.178511302ln100.S+0.06500000000TT3/2+0.02Sⅇ0.05T132.9807600ⅇ0.03000000000Tⅇ5.555555546ln100.S+0.06500000000T2TST1.ⅇ0.05000000000T0.5000000000+0.5000000000erf2.357022603ln100.S+0.06500000000TT0.2121320343T+1.329807601ⅇ0.05000000000Tⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T2TS2ⅇ0.05T1477.563997ⅇ0.03000000000Tln100.S+0.06500000000Tⅇ5.555555546ln100.S+0.06500000000T2TT3/2S2+132.9807600ⅇ0.03000000000Tⅇ5.555555546ln100.S+0.06500000000T2TS2T+1.329807601ⅇ0.05000000000Tⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T2ST+6.268773146ⅇ0.05000000000T2.357022603ln100.S+0.06500000000TT0.2121320343Tⅇ2.357022603ln100.S+0.06500000000TT0.2121320343T2ST

(7)

Alternatively, you can compute values of the local volatility for any given value of S and T.

S:=90,95,100,105,110

S:=9095100105110

(8)

T:=0.5,1.0,1.5

T:=0.51.01.5

(9)

LocalVolatilityC,S,T,r,d,t,K

0.2999999999666666530.2999999994666666670.2999999995666666750.3000000000333333250.2999999997000000200.2999999998000000280.2999999999000000360.2999999997333333560.2999999998333333640.2999999999999999890.30000000000.29999999980.3000000004666666940.30000000000.2999999999

(10)

See Also

Finance[AmericanOption], Finance[BarrierOption], Finance[BlackScholesDelta], Finance[BlackScholesGamma], Finance[BlackScholesPrice], Finance[BlackScholesRho], Finance[BlackScholesTheta], Finance[BlackScholesVega], Finance[EuropeanOption], Finance[LatticePrice], Finance[LocalVolatility]

References

  

Gatheral, J., The Volatility Surface: A Practitioner's Guide, (with foreword by Nassim Taleb), Wiley, 2006.

  

Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam