Prototype
Function opt_gfd_div(dividends As Variant,
divs_t As Variant,
div_type As Long,
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,
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 discrete dividends. A finite difference theta method on a rectangular grid is used.
Arguments
dividends - Variant (containing a single column of Double values) : The value of the dividends.
divs_t - Variant (containing a single column of Double values) : The time (in years) when the dividends are paid.
div_type - Long : The type of dividend that is paid.
If div_type = 0 then a percentage dividend is paid,
if div_type = 1 then a cash dividend is paid.
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.
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