X$opt$nAsset
integer; number of underlying assets.
X$opt$payType
case; if 0, digital payoff, if 1, best-of payoff, if 2, worst-of payoff.
X$opt$exerType
case; if 0, European exercise, if 1, American exercise.
X$opt$pcFlag
case vector; if 0, call, if 1, put.
X$opt$ttm
scalar; time to maturity.
X$opt$strike
vector; option strikes.
X$opt$rf
scalar; applicable risk-free rate (domestic risk-free rate).
X$opt$q
vector; holding costs of the option's underlyings (dividends, foreign risk-free rates, etc.).
X$opt$vol
vector; volatilities of the option's underlyings.
X$opt$rho
matrix; correlation matrix of the option's underlyings.
X$fd$m
vector; number of spatial steps for each underlying's domain discretization.
X$fd$leftBound
vector; near spatial boundaries of each underlying's domain.
X$fd$kMult
vector; right boundary strike multiples. If 0, far domain boundary calculated via formula given in Kangro and Nicolaides (2000). Otherwise, far domain boundary calculated as the strike multiplied by the strike multiple.
X$fd$density
vector; impacts the concentration of nodes around the option strike. At 0, nodes are uniformly distributed between the near and far boundaries. Increasing the parameter increases the node concentration around the strike.
X$fd$kShift
case vector; if 0, no mesh shifting, if 1, adjusts the node spacing such that the strike falls exactly between two nodes, if 2, adjusts the node spacing such that the strike falls exactly on a node. See Tavella and Randall (2000).
X$fd$theta
scalar; implicitness parameter of the theta method. Chosen between 0 (fully explicit) and 1 (fully implicit).
X$fd$maxSmooth
integer; number of Rannacher smoothing steps. See Rannacher (1984).
X$fd$tol
scalar; error tolerance in penalty iteration for American exercise.
X$fd$maxIter
integer; maximum number of iterations per penalty loop for American exercise.
X$time$tsType
case; if 0, constant timestep size, if 1, adaptive timestep size. See Forsyth and Vetzal (2002).
X$time$N
integer; number of total timesteps if not using adaptive timesteps.
X$time$dtInit
scalar; inital timestep size for adaptive timesteps.
X$time$dNorm
scalar; target relative change for adaptive timesteps.
X$time$D
scalar; normalizing parameter for adaptive timesteps.
The classical order for the state vectors output from the function is illustrated by example. With two underlying assets, option values in each state vector are stored in the order: [11, 21, 31, ... , M1, 12, 22, ... , MN] with M being the total number of nodes used in the first asset spatial discretization and N being the total number of nodes in the second.