Finance - Maple Help

Online Help

All Products    Maple    MapleSim


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

Finance

  

LocalVolatilitySurface

  

create new local volatility term structure

 

Calling Sequence

Parameters

Options

Description

Examples

References

Compatibility

Calling Sequence

LocalVolatilitySurface(volatility, T, S, opts)

LocalVolatilitySurface(riskfreerate, dividendyield, times, strikes, prices, interpolation, delta, opts)

LocalVolatilitySurface(riskfreerate, dividendyield, dates, strikes, prices, interpolation, delta, opts)

LocalVolatilitySurface(riskfreerate, dividendyield, price, T, K, opts)

LocalVolatilitySurface(times, volatilities, opts)

LocalVolatilitySurface(dates, volatilities, opts)

LocalVolatilitySurface(times, underlyings, volatilities, opts)

LocalVolatilitySurface(dates, underlyings, volatilities, opts)

Parameters

volatility

-

algebraic expression, operator or procedure; local volatility

T

-

name; variable representing time to maturity

S

-

name; variable representing the value of the underlying

riskfreerate

-

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

dividendyield

-

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

times

-

list or Vector; times (in years)

strikes

-

list, Vector, listlist or Matrix; strike prices of European call options

prices

-

list, Vector, listlist or Matrix; prices of European call options

dates

-

list; dates

price

-

algebraic expression or procedure; price of a European call option

K

-

name; variable representing the strike price

volatilities

-

list, Vector, listlist or Matrix; volatilities

underlyings

-

list or Vector; values of the underlying

opts

-

equations of the form option = value where option is one of daycounter or referencedate; specify options for the LocalVolatilitySurface command

Options

• 

daycounter = Actual360, Actual365Fixed, AFB, Bond, Euro, Historical, ISDA, ISMA, OneDay, Simple, Thirty360BondBasis, Thirty360EuroBondBasis, Thirty360European, Thirty360Italian, Thirty360USA, or a day counter data structure -- This option specifies the convention used to convert the amount of time between two dates to year fractions.

• 

referencedate = date in any of the formats recognized by the Finance[ParseDate] command -- This option specifies the reference date (date when the discount factor is equal to 1).

Description

• 

The LocalVolatilitySurface command creates a new local-volatility term structure with the given parameters. This term structure is represented as a module. This module can be passed to other commands of the Finance package that expect a local volatility term structure as one of the parameters; it can also be used as if it were a procedure. Assume, for example, that the module returned by LocalVolatilitySurface was assigned to the name V. Then for any positive constants T and S, VT,S will return the corresponding value of the local volatility. If one of the parameters T or S is non-numeric, VT,S will return unevaluated.

• 

The LocalVolatilitySurface(times, volatilities, opts) and  LocalVolatilitySurface(dates, volatilities, opts) calling sequences create a local-volatility term structure based on a piecewise interpolation of the specified local volatilities at the given times or dates. The times parameter is a list or Vector of times for which local volatilities are available. In this case the value of the local volatility at any time is assumed to be independent of the value of the underlying. The dates parameter must be a list of dates given in any of the formats recognized by the Finance[ParseDate] command. The volatilities parameter is a list or Vector of known volatilities.

• 

The LocalVolatilitySurface(times, underlyings, volatilities, opts) and LocalVolatilitySurface(times, underlyings, volatilities, opts) calling sequences create a local-volatility term structure based on a piecewise interpolation of the specified local volatilities at the given times or dates. The underlyings parameter is a list or a Vector of values of the underlying process for which local volatilities are available. In this case the volatilities parameter must be a Matrix. The number of rows of the volatilities matrix must be equal to the number of elements in the underlyings vector. Columns of the volatilities matrix correspond to elements of times or dates. So, volatilityi,j is the local volatility at timesj (or datesj) if the value of the underlying is underlyingsi.

• 

The LocalVolatilitySurface(volatilityfunction, T, S, opts) calling sequence constructs a local-volatility term structure based with the specified volatility function. The parameter volatility can be either a procedure or an algebraic expression. In the first case, the volatility procedure must accept two parameters, T (the time) and S (the value of the underlying), and return the corresponding value of the local volatility. If volatility is given as an algebraic expression, then the variables representing the time and the underlying must be explicitly specified as the second and third parameters.

• 

The LocalVolatilitySurface(volatility, T, S, opts) calling sequence constructs a local-volatility term structure based on the given volatility function. The parameter volatility is local volatility given as a function of time from reference and value of the underlying. It can be given either as a Maple procedure or as an algebraic expression. If volatility is given as a procedure it must accept two parameters, time and value of the underlying, and return the corresponding local volatility as a floating-point number. Finally, if volatility is an algebraic expression, it must depend on two variables. In this case the parameters T and S will be used to determine which variable represents time and which variable represents the value of the underlying.

• 

The LocalVolatilitySurface(riskfreerate, dividendyield, callprice, T, S, opts) calling sequence constructs a local-volatility term structure implied by the available prices of European call options. The parameter riskfreerate is the instantaneous interest rate, which may be time-dependent. The parameter initialvalue is the initial value of the underlying asset. The parameter callprice is the price of the European call option given as a function of time to maturity and strike price. This parameter can be given either as a procedure or as an algebraic expression. In the first case, callprice must accept two parameters, time to maturity and strike price, and return the corresponding option price. In the second case, callprice must be an algebraic expression depending on at most two variables. The parameters T and K will specify which variable represents time to maturity and which variable represents the strike price.

• 

The LocalVolatilitySurface(riskfreerate, dividendyield, times, strikes, prices, opts) and LocalVolatilitySurface(riskfreerate, dividendyield, dates, strikes, prices, opts) calling sequences are similar to the above except that the price function will be determined based on an interpolation of known prices.

Examples

withFinance:

r0.05

r:=0.05

(1)

d0.01

d:=0.01

(2)

σ0.3

σ:=0.3

(3)

First you will construct a local volatility term structure based on:

CBlackScholesPrice100,K,T,σ,r,d,call

C:=100.ⅇ0.01000000000T0.5000000000+0.5000000000erf2.357022602ln100.K+0.08500000000TT1.ⅇ0.05000000000TK0.5000000000+0.5000000000erf2.357022603ln100.K+0.08500000000TT0.2121320343T

(4)

LVLocalVolatilitySurfacer,d,C,T,K

LV:=moduleend module

(5)

LV1.0,50

0.2999999978

(6)

LV1.0,150

0.3000000008

(7)

The following example is based on a piecewise approximation of known local volatilities.

V0.30,0.29,0.3|0.31,0.30,0.31|0.32,0.31,0.33|0.33,0.32,0.35

V:=0.300.310.320.330.290.300.310.320.30.310.330.35

(8)

T0.5,1.0,1.5,2.0

T:=0.51.01.52.0

(9)

S95,100,105

S:=95100105

(10)

LV2LocalVolatilitySurfaceT,S,V,Bicubic,referencedate=Jun-7-2006

LV2:=moduleend module

(11)

LV20.5,105

0.3000000000

(12)

LV20.5,100

0.2900000000

(13)

LV2Jun-7-2007,105

0.3100000000

(14)

LV2Jun-7-2007,110

0.3200000000

(15)

Get the interval between the reference date and June 7, 2007 as a fraction of the year.

tYearFractionJun-7-2006,Jun-7-2007

t:=1.

(16)

LV2t,110

0.3200000000

(17)

In this example you use bi-linear and bi-cubic interpolation of known prices.

Tseq0.1i,i=1..20

T:= 1 .. 20 VectorcolumnData Type: anythingStorage: rectangularOrder: Fortran_order

(18)

Kseq90+i,i=1..20

K:= 1 .. 20 VectorcolumnData Type: anythingStorage: rectangularOrder: Fortran_order

(19)

AMatrixseqseqBlackScholesPrice100,Ki,Tj,σ,r,d,j=1..20,i=1..20,datatype=float[8]

A:= 20 x 20 MatrixData Type: float8Storage: rectangularOrder: Fortran_order

(20)

LV3LocalVolatilitySurfacer,d,T,K,A,Bilinear,0.001

LV3:=moduleend module

(21)

LV4LocalVolatilitySurfacer,d,T,K,A,Bicubic,0.001

LV4:=moduleend module

(22)

Compute local volatilities based on the bi-linear interpolation.

LV31,100

0.008782621029

(23)

LV31,105

0.008904767770

(24)

LV31.5,100

0.008467326870

(25)

LV31.5,105

0.008628708973

(26)

Compute local volatilities based on the bi-cubic interpolation.

LV41,100

0.2814266129

(27)

LV41,105

0.2848304402

(28)

LV41.5,100

0.2703781495

(29)

LV41.5,105

0.2751210861

(30)

References

  

Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice, Springer Verlag, 2001.

  

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, Prentice Hall, 2003.

Compatibility

• 

The Finance[LocalVolatilitySurface] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

Finance[BlackScholesProcess]

Finance[DiscountCurve]

Finance[ForwardCurve]

Finance[ForwardRate]

Finance[MertonJumpDiffusion]

Finance[ParRate]

Finance[ZeroCurve]

 


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