Prototype
Function opt_gfd(theta_meth As Double,
S As Double,
sigma As Double,
r As Double,
opt_mat As Double,
X As Double,
method As Long,
putcall As Long,
log_transform As Long,
q As Double,
ns_steps As Long,
nt_steps As Long,
smax As Double) As Variant
Description
This function calculates the value and hedge statistics of a either an American or European
option on a stock paying continuous dividends. A finite difference theta method on a rectangular grid is used.
Arguments
theta_meth - Double : The value of theta to use.
Note: theta_meth = 0 corresponds to the implicit method,
theta_meth = 0.5 corresponds to the Crank-Nicolson method,
and theta_meth = 1.0 corresponds to the explicit method.
S - Double : The current value of the stock.
sigma - Double : The volatility of the stock.
r - Double : The continuously compounded interest rate.
opt_mat - Double : The option maturity in years.
X - Double : The strike price.
method - Long : If method = 0 then the option is European,
If method = 1 then it is American.
Only method < 2 is valid for this routine.
putcall - Long : Indicates whether the option is a put or call.
If putcall = 0 then the option is a call , if putcall = 1 then it is a put.
log_transform - Indicates whether a logarithmic transformation is to be used.
If log_transform = 0 then no logarithmic transformation is used,
if log_transform = 1 then a logarithmic transformation is used.
q - Double: The continuously compounded dividend rate.
ns_steps - Long : The number of asset steps to be used.
nt_steps - Long : The number of time steps to be used.
method - Long : If method = 0 then the option is European,
If method = 1 then it is American.
when method is greater than 1 this indicates a type of
calculation method to be used. See below for more information
concerning these values.
smax - Double : The maximum asset value on the grid.
Returned Values
The first element in the output array is the option value. This is followed the greeks in the following order :
gamma, delta, theta.
Other Information
Information on enumeration types
List of available routines