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. |