Calculate price and sensitivities for European or American basket options using Monte Carlo simulations

`[`

calculates price and sensitivities for European or American basket options using the
Longstaff-Schwartz model. `PriceSens`

,`Paths`

,`Times`

,`Z`

] = basketsensbyls(`RateSpec`

,`BasketStockSpec`

,`OptSpec`

,`Strike`

,`Settle`

,`ExerciseDates`

)

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

[1] Longstaff, F.A., and E.S.
Schwartz. “Valuing American Options by Simulation: A Simple Least-Squares
Approach.” *The Review of Financial Studies.* Vol. 14, No. 1,
Spring 2001, pp. 113–147.