Price European or American spread options using Monte Carlo simulations

returns
the price of a European or American call or put spread option using
Monte Carlo simulations.`Price`

= spreadbyls(`RateSpec`

,`StockSpec1`

,`StockSpec2`

,`Settle`

,`Maturity`

,`OptSpec`

,`Strike`

,`Corr`

)

For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium.

returns
the price of a European or American call or put spread option using
Monte Carlo simulations using optional name-value pair arguments.`Price`

= spreadbyls(___,`Name,Value`

)

`[`

returns
the `Price`

,`Paths`

,`Times`

,`Z`

]
= spreadbyls(___,`Name,Value`

)`Price`

, `Paths`

, `Times`

,
and `Z`

of a European or American call or put spread
option using Monte Carlo simulations using optional name-value pair
arguments.

[1] Carmona, R., Durrleman, V. “Pricing and Hedging Spread
Options.” *SIAM Review.* Vol. 45, No. 4,
pp. 627–685, Society for Industrial and Applied Mathematics,
2003.