Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: finance
See also: volsurf ImplVola volsurfplot lplocband EBBS

Quantlet: volsurfEBBS
Description: computes the implied volatility surface using a local polynomial estimation with an automatic bandwidth selection algorithm. The metric is either moneyness, i.e. strike devided by the (implied) forward price of the underlying, or the original strikes.

Reference(s):

Usage: {IVsurf, IVpoints} = volsurfEBBS(x, stepwidth, firstXF, lastXF, firstMat, lastMat, metric, bandwidthGrid{, global{, IVmethod}})
Input:
x n x 6 data matrix, where the first column contains the underlying asset prices, the second the strikes, the third the interest rates, the fourth maturities [years], the fifth the option prices and the sixth contains the types of the option (1 means a call, 0 a put).
stepwidth 2 x 1 vector determining the stepwidth of the volatility surface; the first entry refers to the strike dimension, the second to the time to maturity
firstXF scalar giving the lowest limit in the strike dimension of the volatility surface
lastXF scalar giving the highest limit in the strike dimension of the volatility surface; depending on stepwidth lastXF can be lastXf+1
firstMat scalar giving the lowest limit of time to maturity in the volatility surface
lastMat scalar giving the highest limit of time to maturity in the volatility surface; depending on stepwidth lastMat can be lastMat+1
metric scalar taking the values 1 or 0; specifies whether you like to have the implied volatility surface in a moneyness metric of X/F (metric=0) or in the original strike metric (metric=1)
bandwidthGrid l x 1 vector representing a grid of bandwidths. The volatility surface is estimated on standardized data, that is why each bandwidth in the grid must be a scalar.
global (optional) scalar determining if the bandwidths selected by EBBS should be local (global=0) or global (global=1). By default, the bandwidth is selected globally.
IVmethod (optional) string if IVmethod = "bisect" the bisection method is used, default is Newton-Raphson.
Output:
IVsurf matrix containing all coordinates in R2 of the IVpoints computed for the implied volatility surface. The first column contains the moneyness, the second the maturity, and the third the implied volatility.
IVpoints matrix which contains the coordinates in R2 of the options used to determine the surface. The first column contains the moneyness, the second the maturity, and the third the implied volatility.

Example:
library("finance")
library("smoother")
library("plot")
data=read("XFGData9701.dat")
surface=paf(data,(data[,1]==3))
mat=surface[,5]./365
IR=surface[,9]
SpotPrice=surface[,8]
RawData=SpotPrice~surface[,6]~IR~mat~surface[,7]~surface[,4]
global=1
stepwidth=0.05|(0.1)
bandwidthGrid=grid(0.05,0.1,10)|grid(1.2,0.3,18)
firstXF=0.8
lastXF=1.15
firstMat=0
lastMat=1
metric=0
AdjustToSurface=1
{IVSurface,IVpoints}=volsurfEBBS(RawData, stepwidth,firstXF,lastXF,firstMat,lastMat, metric, bandwidthGrid, global)
volsurfplot(IVSurface,IVpoints,AdjustToSurface)

Result:
A plot of the implied volatility surface with the moneyness
between 0.8 and 1.15 and a maturity between 0 and 0.5 years.



Author: M. R. Fengler, P. Kervalla, W. Haerdle, 20001010 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006