opt_rainbow_2d_lattice
[Previous] [Main] [Next]

Prototype

Function opt_rainbow_2d_lattice(S1 As Double,
S2 As Double,
X As Double,
sigma1 As Double,
sigma2 As Double,
rho As Double,
q1 As Double,
q2 As Double,
opt_mat As Double,
r As Double,
is_american As Long,
opt_type As Long,
putcall As Long,
n_steps As Long) As Variant

Description

This function uses a lattice method to calculate the value of either a European or American
rainbow option on two dividend paying assets. Options on the maximum or minimum of two assets and spread options can be valued.

Arguments

S1 - Double : The current value of asset 1.

S2 - Double : The current value of asset 2.

X - Double : The strike price.

sigma1 -Double : The volatility of asset 1.

sigma2 -Double : The volatility of asset 2.

rho -Double : The correlation between S1 and S2.

q1 -Double : The continuously compounded dividend rate for asset 1.

q2 -Double : The continuously compounded dividend rate for asset 2.

opt_mat - Double : The option maturity (in years).

r - Double : The continuously compounded interest rate.

is_american - Long : Indicates whether the option is American or European.
If is_American = 0 then the option is European,
if is_American = 1 then it is American.

opt_type - Long : Indicates the option type
If opt_type = 0 then an option on the maximum of two assets.
if opt_type = 1 then an option on the minimum of two assets.
if opt_type = 2 then a spread option.

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.

n_steps - Long : The number of time steps in the lattice.

Returned Values

The value of the option is returned.

Other Information

Information on enumeration types
List of available routines