Interest-rate term structure (annualized and continuously compounded),
specified by the `RateSpec`

obtained from `intenvset`

. For information on the interest-rate
specification, see `intenvset`

.

**Data Types: **`struct`

Stock specification for the underlying asset. For information
on the stock specification, see `stockspec`

.

`stockspec`

can handle
several types of underlying assets. For example, for physical commodities
the price is represented by `StockSpec.Asset`

, the
volatility is represented by `StockSpec.Sigma`

, and
the convenience yield is represented by `StockSpec.DividendAmounts`

.

**Data Types: **`struct`

Definition of option as `'call'`

or `'put'`

,
specified as a `NINST`

-by-`1`

cell
array of strings.

**Data Types: **`char`

| `cell`

Option strike price values, specified as an integer using a `NINST`

-by-`1`

vector
of strike price values.

**Data Types: **`single`

| `double`

Settlement or trade date for the lookback option, specified
as a date string or as nonnegative integers using a `NINST`

-by-`1`

vector
or cell array of dates.

**Data Types: **`char`

| `cell`

Matrix of exercise callable or puttable dates for European or
American options, specified as a date string or as nonnegative integers
as follows:

European option — `NINST`

-by-`1`

vector
of exercise dates. For a European option, there is only one exercise
date which is the option expiry date.

American option — `NINST`

-by-`2`

vector
of exercise date boundaries. For each instrument, the option is exercised
on any coupon date between or including the pair of dates on that
row. If only one non-`NaN`

date is listed, or if `ExerciseDates`

is
a `NINST`

-by-`1`

vector of serial
date numbers or cell array of strings, the option is exercised between `Settle`

and
the single listed exercise date.

**Data Types: **`char`

| `cell`

Specify optional comma-separated pairs of `Name,Value`

arguments.
`Name`

is the argument
name and `Value`

is the corresponding
value. `Name`

must appear
inside single quotes (`' '`

).
You can specify several name and value pair
arguments in any order as `Name1,Value1,...,NameN,ValueN`

.

**Example: **`PriceSens = lookbacksensbyls(RateSpec,StockSpec1,StockSpec2,Settle,Maturity,OptSpec,Strike,Corr,'AmericanOpt',1,'OutSpec',{'All'})`

Option type, specified as an integer scalar flag with these
values:

For American options, the Longstaff-Schwartz least squares method
calculates the early exercise premium.

**Data Types: **`single`

| `double`

Scalar number of independent sample paths (simulation trials),
specified as a nonnegative integer.

**Data Types: **`single`

| `double`

Scalar number of simulation periods per trial, specified as
a nonnegative integer. `NumPeriods`

is considered
only when pricing European lookback options. For American lookback
options, `NumPeriod`

is equal to the number of exercise
days during the life of the option.

**Data Types: **`single`

| `double`

Time series array of dependent random variates, specified as
a `NumPeriods`

-by-`1`

-by-`NumTrials`

3-D
array. The `Z`

value generates the Brownian motion
vector (that is, Wiener processes) that drives the simulation.

**Data Types: **`single`

| `double`

Indicator for antithetic sampling, specified with a value of `true`

or `false`

.

**Data Types: **`logical`

Define outputs, specifying a `NOUT`

- by-`1`

or
a `1`

-by-`NOUT`

cell array of strings
with possible values of `'Price'`

, `'Delta'`

, `'Gamma'`

, `'Vega'`

, `'Lambda'`

, `'Rho'`

, `'Theta'`

,
and `'All'`

.

`OutSpec = {'All'}`

specifies that the output
should be `Delta`

, `Gamma`

, `Vega`

, `Lambda`

, `Rho`

, `Theta`

,
and `Price`

, in that order. This is the same as specifying `OutSpec`

to
include each sensitivity.

**Example: **`OutSpec = {'delta','gamma','vega','lambda','rho','theta','price'}`

**Data Types: **`char`

| `cell`