Finance
LocalVolatility
compute the local volatilities given option prices
Calling Sequence
Parameters
Description
Examples
References
Compatibility
LocalVolatility(C, S, T, r, d, t, K)
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
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
dS⁡tS⁡t=r⁡t−d⁡t−σ⁡S⁡t,t22⁢dt+σ⁡S⁡t,t⁢dW⁡t
where
r=r⁡t is the risk-free rate,
d=d⁡t is the dividend yield,
σ=σ⁡S,t is the local volatility,
and
W⁡t 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=P⁡t,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 0≤t and 0≤K, then the local volatility sigma(S, t) of the underlying asset can be determined using the following equation:
∂∂tP⁡t,K=σ⁡t,K2⁢K2⁢∂2∂K2P⁡t,K2+r⁡t−d⁡t⁢P⁡t,K−K⁢∂∂KP⁡t,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.
with⁡Finance:
r≔0.05
d≔0.03
S0≔100
σ≔t↦0.3
C≔BlackScholesPrice⁡100,K,t,σ,r,d
C≔100.⁢ⅇ−0.03000000000⁢t⁢0.5000000000+0.5000000000⁢erf⁡2.357022602⁢ln⁡100.K+0.06500000000⁢tt−1.⁢ⅇ−0.05000000000⁢t⁢K⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.K+0.06500000000⁢tt−0.2121320343⁢t
L≔LocalVolatility⁡C,S,T,r,d,t,K
L≔2⁢0.03⁢ⅇ0.05⁢T⁢100.⁢ⅇ−0.03000000000⁢T⁢0.5000000000+0.5000000000⁢erf⁡2.357022602⁢ln⁡100.S+0.06500000000⁢TT−1.⁢ⅇ−0.05000000000⁢T⁢S⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T+ⅇ0.05⁢T⁢−3.000000000⁢ⅇ−0.03000000000⁢T⁢0.5000000000+0.5000000000⁢erf⁡2.357022602⁢ln⁡100.S+0.06500000000⁢TT+56.41895835⁢ⅇ−0.03000000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2T⁢0.1532064691T−1.178511301⁢ln⁡100.S+0.06500000000⁢TT32+0.05000000000⁢ⅇ−0.05000000000⁢T⁢S⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T−0.5641895835⁢ⅇ−0.05000000000⁢T⁢S⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2⁢0.0471404520T−1.178511302⁢ln⁡100.S+0.06500000000⁢TT32+0.02⁢S⁢ⅇ0.05⁢T⁢−132.9807600⁢ⅇ−0.03000000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2TS⁢T−1.⁢ⅇ−0.05000000000⁢T⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T+1.329807601⁢ⅇ−0.05000000000⁢T⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2TS2⁢ⅇ0.05⁢T⁢−1477.563997⁢ⅇ−0.03000000000⁢T⁢ln⁡100.S+0.06500000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2TT32⁢S2+132.9807600⁢ⅇ−0.03000000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2TS2⁢T+1.329807601⁢ⅇ−0.05000000000⁢T⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2S⁢T+6.268773146⁢ⅇ−0.05000000000⁢T⁢2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2S⁢T
plot3d⁡L,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.
LocalVolatility⁡C,S,T,r,d,t,K
2⁢0.03⁢ⅇ0.05⁢T⁢100.⁢ⅇ−0.03000000000⁢T⁢0.5000000000+0.5000000000⁢erf⁡2.357022602⁢ln⁡100.S+0.06500000000⁢TT−1.⁢ⅇ−0.05000000000⁢T⁢S⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T+ⅇ0.05⁢T⁢−3.000000000⁢ⅇ−0.03000000000⁢T⁢0.5000000000+0.5000000000⁢erf⁡2.357022602⁢ln⁡100.S+0.06500000000⁢TT+56.41895835⁢ⅇ−0.03000000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2T⁢0.1532064691T−1.178511301⁢ln⁡100.S+0.06500000000⁢TT32+0.05000000000⁢ⅇ−0.05000000000⁢T⁢S⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T−0.5641895835⁢ⅇ−0.05000000000⁢T⁢S⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2⁢0.0471404520T−1.178511302⁢ln⁡100.S+0.06500000000⁢TT32+0.02⁢S⁢ⅇ0.05⁢T⁢−132.9807600⁢ⅇ−0.03000000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2TS⁢T−1.⁢ⅇ−0.05000000000⁢T⁢0.5000000000+0.5000000000⁢erf⁡2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T+1.329807601⁢ⅇ−0.05000000000⁢T⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2TS2⁢ⅇ0.05⁢T⁢−1477.563997⁢ⅇ−0.03000000000⁢T⁢ln⁡100.S+0.06500000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2TT32⁢S2+132.9807600⁢ⅇ−0.03000000000⁢T⁢ⅇ−5.555555546⁢ln⁡100.S+0.06500000000⁢T2TS2⁢T+1.329807601⁢ⅇ−0.05000000000⁢T⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2S⁢T+6.268773146⁢ⅇ−0.05000000000⁢T⁢2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T⁢ⅇ−2.357022603⁢ln⁡100.S+0.06500000000⁢TT−0.2121320343⁢T2S⁢T
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
T≔0.5,1.0,1.5
T≔0.51.01.5
0.2999999999666666530.2999999994666666670.2999999995666666750.3000000000333333250.2999999997000000200.2999999998000000280.2999999999000000360.2999999997333333560.2999999998333333640.2999999999999999890.30000000000.29999999980.3000000004666666940.30000000000.2999999999
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.
The Finance[LocalVolatility] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
Finance[AmericanOption]
Finance[BarrierOption]
Finance[BlackScholesDelta]
Finance[BlackScholesGamma]
Finance[BlackScholesPrice]
Finance[BlackScholesRho]
Finance[BlackScholesTheta]
Finance[BlackScholesVega]
Finance[EuropeanOption]
Finance[LatticePrice]
Finance[LocalVolatility]
Download Help Document