Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Calculate price and sensitivities for European, Bermudan, or American vanilla options using Monte Carlo simulations

`PriceSens = optstocksensbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,ExerciseDates)`

`PriceSens = optstocksensbyls(___,Name,Value)`

```
[PriceSens,Path,Times,Z]
= optstocksensbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,ExerciseDates)
```

```
[PriceSens,Path,Times,Z]
= optstocksensbyls(___,Name,Value)
```

returns vanilla option prices or sensitivities using the Longstaff-Schwartz model.
`PriceSens`

= optstocksensbyls(`RateSpec`

,`StockSpec`

,`OptSpec`

,`Strike`

,`Settle`

,`ExerciseDates`

)`optstocksensbyls`

computes prices or sensitivities of European,
Bermudan, and American vanilla options.

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

adds
optional name-value pair arguments.`PriceSens`

= optstocksensbyls(___,`Name,Value`

)