Determine European rainbow option prices or sensitivities on minimum of two risky assets using Stulz option pricing model

computes option prices using the Stulz option
pricing model.`PriceSens`

= minassetsensbystulz(`RateSpec`

,`StockSpec1`

,`StockSpec2`

,`Settle`

,`Maturity`

,`OptSpec`

,`Strike`

,`Corr`

)

specifies options using one or more optional
name-value pair arguments in addition to the input
arguments in the previous syntax.`PriceSens`

= minassetsensbystulz(___,`Name,Value`

)

Consider a European rainbow put option that gives the holder the right to sell either stock A or stock B at a strike of 50.25, whichever has the lower value on the expiration date May 15, 2009. On November 15, 2008, stock A is trading at 49.75 with a continuous annual dividend yield of 4.5% and has a return volatility of 11%. Stock B is trading at 51 with a continuous dividend yield of 5% and has a return volatility of 16%. The risk-free rate is 4.5%. Using this data, if the correlation between the rates of return is -0.5, 0, and 0.5, calculate the price and sensitivity of the minimum of two assets that are European rainbow put options. First, create the `RateSpec`

:

Settle = 'Nov-15-2008'; Maturity = 'May-15-2009'; Rates = 0.045; Basis = 1; RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle,... 'EndDates', Maturity, 'Rates', Rates, 'Compounding', -1, 'Basis', Basis)

`RateSpec = `*struct with fields:*
FinObj: 'RateSpec'
Compounding: -1
Disc: 0.9778
Rates: 0.0450
EndTimes: 0.5000
StartTimes: 0
EndDates: 733908
StartDates: 733727
ValuationDate: 733727
Basis: 1
EndMonthRule: 1

Create the two `StockSpec`

definitions.

```
AssetPriceA = 49.75;
AssetPriceB = 51;
SigmaA = 0.11;
SigmaB = 0.16;
DivA = 0.045;
DivB = 0.05;
StockSpecA = stockspec(SigmaA, AssetPriceA, 'continuous', DivA)
```

`StockSpecA = `*struct with fields:*
FinObj: 'StockSpec'
Sigma: 0.1100
AssetPrice: 49.7500
DividendType: {'continuous'}
DividendAmounts: 0.0450
ExDividendDates: []

`StockSpecB = stockspec(SigmaB, AssetPriceB, 'continuous', DivB)`

`StockSpecB = `*struct with fields:*
FinObj: 'StockSpec'
Sigma: 0.1600
AssetPrice: 51
DividendType: {'continuous'}
DividendAmounts: 0.0500
ExDividendDates: []

Calculate price and delta for different correlation levels.

Strike = 50.25; Corr = [-0.5;0;0.5]; OptSpec = 'put'; OutSpec = {'Price'; 'delta'}; [P, D] = minassetsensbystulz(RateSpec, StockSpecA, StockSpecB,... Settle, Maturity, OptSpec, Strike, Corr, 'OutSpec', OutSpec)

`P = `*3×1*
3.4320
3.1384
2.7694

`D = `*3×2*
-0.4183 -0.3496
-0.3746 -0.3189
-0.3304 -0.2905

The output `Delta`

has two columns: the first column represents the `Delta`

with respect to the stock A (asset 1), and the second column represents the `Delta`

with respect to the stock B (asset 2). The value 0.4183 represents `Delta`

with respect to the stock A for a correlation level of -0.5. The `Delta`

with respect to stock B, for a correlation of zero is -0.3189.

`RateSpec`

— Annualized, continuously compounded rate term structurestructure

Annualized, continuously compounded rate
term structure, specified using `intenvset`

.

**Data Types: **`structure`

`StockSpec1`

— Stock specification for asset 1structure

Stock specification for asset 1, specified
using `stockspec`

.

**Data Types: **`structure`

`StockSpec2`

— Stock specification for asset 2structure

Stock specification for asset 2, specified
using `stockspec`

.

**Data Types: **`structure`

`Settle`

— Settlement or trade datesvector

Settlement or trade dates, specified as an
`NINST`

-by-`1`

vector of numeric dates.

**Data Types: **`double`

`Maturity`

— Maturity datesvector

Maturity dates, specified as an
`NINST`

-by-`1`

vector.

**Data Types: **`double`

`OptSpec`

— Option typecell array of character vectors with a value of

`'call'`

or
`'put'`

Option type, specified as an
`NINST`

-by-`1`

cell array of character vectors with a value of
`'call'`

or
`'put'`

.

**Data Types: **`cell`

`Strike`

— Strike pricesvector

Strike prices, specified as an
`NINST`

-by-`1`

vector.

**Data Types: **`double`

`Corr`

— Correlation between the underlying asset pricesvector

Correlation between the underlying asset
prices, specified as an
`NINST`

-by-`1`

vector.

**Data Types: **`double`

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

arguments. `Name`

is
the argument name and `Value`

is the corresponding value.
`Name`

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

.

```
[PriceSens] =
minassetsensbystulz(RateSpec,
StockSpecA,StockSpecB,Settle,Maturity,OptSpec,Strike,Corr,'OutSpec',OutSpec)
```

`'OutSpec'`

— Define outputs`{'Price'}`

(default) | cell array of character vectors with values
`'Price'`

,
`'Delta'`

,
`'Gamma'`

,
`'Vega'`

,
`'Lambda'`

,
`'Rho'`

,
`'Theta'`

, and
`'All'`

Define outputs, specified as the
comma-separated pair consisting of
`'OutSpec'`

and a
`NOUT`

- by-`1`

or `1`

-by-`NOUT`

cell array of character vectors or string array
with possible values of
`'Price'`

,
`'Delta'`

,
`'Gamma'`

,
`'Vega'`

,
`'Lambda'`

,
`'Rho'`

,
`'Theta'`

, and
`'All'`

.

`OutSpec = {'All'}`

specifies that the output is
`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: **`cell`

`PriceSens`

— Expected prices or sensitivitiesvector

Expected prices or sensitivities, returned
as an
`NINST`

-by-`1`

or
`NINST`

-by-`2`

vector.

A *rainbow option* payoff
depends on the relative price performance of two or more
assets.

A rainbow option gives the holder the right to buy or sell the best or worst of two securities, or options that pay the best or worst of two assets. Rainbow options are popular because of the lower premium cost of the structure relative to the purchase of two separate options. The lower cost reflects the fact that the payoff is generally lower than the payoff of the two separate options.

Financial Instruments Toolbox™ supports two types of rainbow options:

Minimum of two assets — The option holder has the right to buy(sell) one of two risky assets, whichever one is worth less.

Maximum of two assets — The option holder has the right to buy(sell) one of two risky assets, whichever one is worth more.

For more information, see Rainbow Option.

A modified version of this example exists on your system. Do you want to open this version instead?

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)