# maxassetsensbystulz

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

## Syntax

## Description

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

= maxassetsensbystulz(`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`

= maxassetsensbystulz(___,`Name,Value`

)

## Examples

### Compute Rainbow Option Prices and Sensitivities Using the Stulz Option Pricing Model

Consider a European rainbow option that gives the holder the right to buy either $100,000 of an equity index at a strike price of 1000 (asset 1) or $100,000 of a government bond (asset 2) with a strike price of 100% of face value, whichever is worth more at the end of 12 months. On January 15, 2008, the equity index is trading at 950, pays a dividend of 2% annually, and has a return volatility of 22%. Also on January 15, 2008, the government bond is trading at 98, pays a coupon yield of 6%, and has a return volatility of 15%. The risk-free rate is 5%. Using this data, calculate the price and sensitivity of the European rainbow option if the correlation between the rates of return is -0.5, 0, and 0.5.

Since the asset prices in this example are in different units, it is necessary to work in either index points (for asset 1) or in dollars (for asset 2). The European rainbow option allows the holder to buy the following: 100 units of the equity index at $1000 each (for a total of $100,000) or 1000 units of the government bonds at $100 each (for a total of $100,000). To convert the bond price (asset 2) to index units (asset 1), you must make the following adjustments:

Multiply the strike price and current price of the government bond by 10 (1000/100).

Multiply the option price by 100, considering that there are 100 equity index units in the option.

Once these adjustments are introduced, the strike price is the same for both assets ($1000). First, create the `RateSpec`

:

Settle = 'Jan-15-2008'; Maturity = 'Jan-15-2009'; Rates = 0.05; 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.9512
Rates: 0.0500
EndTimes: 1
StartTimes: 0
EndDates: 733788
StartDates: 733422
ValuationDate: 733422
Basis: 1
EndMonthRule: 1

Create the two `StockSpec`

definitions.

AssetPrice1 = 950; % Asset 1 => Equity index AssetPrice2 = 980; % Asset 2 => Government bond Sigma1 = 0.22; Sigma2 = 0.15; Div1 = 0.02; Div2 = 0.06; StockSpec1 = stockspec(Sigma1, AssetPrice1, 'continuous', Div1)

`StockSpec1 = `*struct with fields:*
FinObj: 'StockSpec'
Sigma: 0.2200
AssetPrice: 950
DividendType: {'continuous'}
DividendAmounts: 0.0200
ExDividendDates: []

`StockSpec2 = stockspec(Sigma2, AssetPrice2, 'continuous', Div2)`

`StockSpec2 = `*struct with fields:*
FinObj: 'StockSpec'
Sigma: 0.1500
AssetPrice: 980
DividendType: {'continuous'}
DividendAmounts: 0.0600
ExDividendDates: []

Calculate the price and delta for different correlation levels.

Strike = 1000 ; Corr = [-0.5; 0; 0.5]; OutSpec = {'price'; 'delta'}; OptSpec = 'call'; [Price, Delta] = maxassetsensbystulz(RateSpec, StockSpec1, StockSpec2,... Settle, Maturity, OptSpec, Strike, Corr,'OutSpec', OutSpec)

`Price = `*3×1*
111.6683
103.7715
92.4412

`Delta = `*3×2*
0.4594 0.3698
0.4292 0.3166
0.4053 0.2512

The output `Delta`

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

with respect to the equity index (asset 1), and the second column represents the `Delta`

with respect to the government bond (asset 2). The value 0.4595 represents `Delta`

with respect to one unit of the equity index. Since there are 100 units of the equity index, the overall `Delta`

would be 45.94 (100 * 0.4594 ) for a correlation level of -0.5. To calculate the `Delta`

with respect to the government bond, remember that an adjusted price of 980 was used instead of 98. Therefore, for example, the `Delta`

with respect to government bond, for a correlation of 0.5 would be 251.2 (0.2512 * 100 * 10 ).

## Input Arguments

`RateSpec`

— Annualized, continuously compounded rate term structure

structure

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

.

**Data Types: **`structure`

`StockSpec1`

— Stock specification for asset 1

structure

Stock specification for asset 1, specified
using `stockspec`

.

**Data Types: **`structure`

`StockSpec2`

— Stock specification for asset 2

structure

Stock specification for asset 2, specified
using `stockspec`

.

**Data Types: **`structure`

`Settle`

— Settlement or trade dates

vector

Settlement or trade dates, specified as an
`NINST`

-by-`1`

vector of numeric dates.

**Data Types: **`double`

`Maturity`

— Maturity dates

vector

Maturity dates, specified as an
`NINST`

-by-`1`

vector.

**Data Types: **`double`

`OptSpec`

— Option type

cell 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 prices

vector

Strike prices, specified as an
`NINST`

-by-`1`

vector.

**Data Types: **`double`

`Corr`

— Correlation between the underlying asset prices

vector

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

-by-`1`

vector.

**Data Types: **`double`

### Name-Value Arguments

Specify optional pairs of arguments as
`Name1=Value1,...,NameN=ValueN`

, where `Name`

is
the argument name and `Value`

is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.

*
Before R2021a, use commas to separate each name and value, and enclose*
`Name`

*in quotes.*

**Example: **```
[PriceSens] =
maxassetsensbystulz(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`

## Output Arguments

`PriceSens`

— Expected prices or sensitivities

vector

Expected prices or sensitivities, returned
as an
`NINST`

-by-`1`

or
`NINST`

-by-`2`

vector.

## More About

### Rainbow Option

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.

## Version History

**Introduced in R2009a**

## Comando MATLAB

Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:

Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.

Select a Web Site

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: .

You can also select a web site from the following list:

## How to Get Best Site Performance

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

### Americas

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

### Europe

- 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)