Local Volatility Examples - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Financial Instruments : Local Volatility Examples

Compute Local Volatility and Implied Volatility Using the Finance Package

 

Fitting Implied Volatility Surface

Modeling with Local Volatility

Fitting Implied Volatility Surface

 

First let us import prices of S&P 500 call options available on October 27, 2006.

This data can be stored in a DataFrame.

 

Extract data from this DataFrame.

(1.1)

Value of the underlying, risk-free rate and dividend yield.

(1.2)

(1.3)

(1.4)

 

Extract exercise dates and times for which data is available.

Implied volatilities for options maturing in December 2006.

(1.5)

Extract a subset of the DataFrame corresponding to the observations in December 2006:

Compute the implied volatility for these dates and plot the results:

 

Implied volatilities for options maturing in December 2007.

(1.6)

Extract a subset of the DataFrame corresponding to the observations in December 2007:

Compute the implied volatility for these dates and plot the results:

 

We will use the following model for the volatility surface.

(1.7)

 

We can compute the corresponding Black-Scholes price as a function of strike and maturity.

(1.8)

 

We can use non-linear fitting routines from the statistics data to find the values of that best fit our data. Construct a matrix of parameters and a vector of the corresponding value of the objective function.

(1.9)

 

Here is the corresponding implied volatility function.

(1.10)

 

Here is another way to estimate these parameters.

(1.11)

 

Here is the corresponding implied volatility function.

(1.12)

 

We can compare both fits with the actual implied volatilities.

Modeling with Local Volatility

 

We will consider the same model for the local volatility except that in this case we will use parameters that were fit to some market data.

(2.1)

(2.2)

(2.3)

 

Consider two functions. The first one returns the Black-Scholes price of a European call option for our model. The second one returns the Black-Scholes price of a European put option for our model. We will assume that these functions are given two us (e.g. obtained by interpolating the market data) and will try to determine the corresponding local volatility term structure.

 

 

Construct the corresponding local volatility surface.

 

We can construct the corresponding local volatility surface and implied volatility surface.

 

We can now construct a Black-Scholes process which has the volatility structure we just obtained.

(2.4)

 

As an alternative, we can use the implied volatility surface to construct an implied trinomial tree.

(2.5)

(2.6)

 

Compute some option prices. We can use Monte-Carlo simulation to price European-style options and lattice methods to price American-style options.

(2.7)

(2.8)

 

Here is an example of an Asian-type option with European exercise.

(2.9)

 


Download Help Document