opt_downout_call
[Previous] [Main] [Next]

Prototype

Function opt_downout_call(barrier As Double,
theta_m As Double,
S0 As Double,
sigma As Variant,
sigma_times As Variant,
r As Double,
opt_mat As Double,
X As Double,
q As Double,
ns_below_S0 As Long,
ns_above_S0 As Long,
nt As Long,
smax As Double) As Variant


Description

This function calculates the value and hedge statistics of a down and out call option.
A finite difference theta method on a rectangular grid is used and the time dependence
of the volatility is specified by the user.

Arguments

barrier - Double : The level of the barrier.

theta_m - Double : The value of theta to use.
Note: theta_m = 0 corresponds to the implicit method,
theta_m = 0.5 corresponds to the Crank-Nicolson method,
and theta_m = 1.0 corresponds to the explicit method.

S0 - Double : The current value of the stock.

sigma - Variant (containing a single column of Double values) : The values of the volatilities.

sigma_times - Variant (containing a single column of Double values) : The times at which the
volatilities occur.

r - Double : The continuously compounded interest rate.

opt_mat - Double : The option maturity in years.

X - Double : The strike price.

q - Double: The continuously compounded dividend rate.

ns_above_S0 - Long : The number of asset steps to be used above the current asset price.

ns_below_S0 - Long : The number of asset steps to be used below the current asset price.

nt - Long : The number of time steps to be used.

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