Calculate European spread option prices or sensitivities using Kirk pricing model

returns the European spread option prices or
sensitivities using the Kirk pricing model.`PriceSens`

= spreadbykirk(`RateSpec`

,`StockSpec1`

,`StockSpec2`

,`Settle`

,`Maturity`

,`OptSpec`

,`Strike`

,`Corr`

)

adds optional name-value pair arguments.`PriceSens`

= spreadsensbykirk(___,`Name,Value`

)

Define the spread option dates.

Settle = '01-Jun-2012'; Maturity = '01-Sep-2012';

Define asset 1. Price and volatility of RBOB gasoline

Price1gallon = 2.85; % $/gallon Price1 = Price1gallon * 42; % $/barrel Vol1 = 0.29;

Define asset 2. Price and volatility of WTI crude oil

```
Price2 = 93.20; % $/barrel
Vol2 = 0.36;
```

Define the correlation between the underlying asset prices of asset 1 and asset 2.

Corr = 0.42;

Define the spread option.

```
OptSpec = 'call';
Strike = 20;
```

Define the `RateSpec`

.

rates = 0.05; Compounding = -1; Basis = 1; RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle, ... 'EndDates', Maturity, 'Rates', rates, ... 'Compounding', Compounding, 'Basis', Basis)

`RateSpec = `*struct with fields:*
FinObj: 'RateSpec'
Compounding: -1
Disc: 0.9876
Rates: 0.0500
EndTimes: 0.2500
StartTimes: 0
EndDates: 735113
StartDates: 735021
ValuationDate: 735021
Basis: 1
EndMonthRule: 1

Define the `StockSpec`

for the two assets.

StockSpec1 = stockspec(Vol1, Price1)

`StockSpec1 = `*struct with fields:*
FinObj: 'StockSpec'
Sigma: 0.2900
AssetPrice: 119.7000
DividendType: []
DividendAmounts: 0
ExDividendDates: []

StockSpec2 = stockspec(Vol2, Price2)

`StockSpec2 = `*struct with fields:*
FinObj: 'StockSpec'
Sigma: 0.3600
AssetPrice: 93.2000
DividendType: []
DividendAmounts: 0
ExDividendDates: []

Compute the spread option price and sensitivities based on the Kirk model.

OutSpec = {'Price', 'Delta', 'Gamma'}; [Price, Delta, Gamma] = spreadsensbykirk(RateSpec, StockSpec1, StockSpec2, Settle, ... Maturity, OptSpec, Strike, Corr, 'OutSpec', OutSpec)

Price = 11.1904

`Delta = `*1×2*
0.6722 -0.6067

`Gamma = `*1×2*
0.0191 0.0217

`StockSpec1`

— Stock specification for underlying asset 1structure

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

.

`stockspec`

can handle other 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`

`StockSpec2`

— Stock specification for underlying asset 2structure

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

.

`stockspec`

can handle other 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`

`Settle`

— Settlement dates for spread optionserial date number | vector of serial date numbers | date character vector | cell array of character vectors

Settlement dates for the spread option,
specified as date character vectors or as serial
date numbers using a
`NINST`

-by-`1`

vector or cell array of character vector
dates.

**Data Types: **`char`

| `cell`

| `double`

`Maturity`

— Maturity date for spread optionserial date number | vector of serial date numbers | date character vector | cell array of character vectors

Maturity date for spread option, specified
as date character vectors or as serial date
numbers using a
`NINST`

-by-`1`

vector or cell array of character vector dates.

**Data Types: **`char`

| `cell`

| `double`

`OptSpec`

— Definition of option character vector with values

`'call'`

or
`'put'`

| cell array of character vectorsDefinition of option as
`'call'`

or
`'put'`

, specified as a
`NINST`

-by-`1`

cell array of character vectors.

**Data Types: **`char`

| `cell`

`Strike`

— Option strike price valuesinteger | vector of integers

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

-by-`1`

vector of strike price values.

If `Strike`

is equal to
zero, this function computes the price and
sensitivities of an exchange option.

**Data Types: **`single`

| `double`

`Corr`

— Correlation between underlying asset pricesinteger | vector of integers

Correlation between underlying asset prices,
specified as an integer using as
`NINST`

-by-`1`

vector.

**Data Types: **`single`

| `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 =
spreadsensbykirk(RateSpec,StockSpec1,StockSpec2,Settle,Maturity,OptSpec,Strike,Corr,OutSpec,{'All'})
```

`'OutSpec'`

— Define outputs`{'Price'}`

(default) | character vector with values
`'Price'`

,
`'Delta'`

,
`'Gamma'`

,
`'Vega'`

, ```
'Lambda'
```

, `'Rho'`

,
`'Theta'`

, and
`'All'`

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

`PriceSens`

— Expected price or sensitivities values of spread optionvector

Expected price or sensitivities values
(defined by `OutSpec`

) of the
spread option, returned as a
`NINST`

-by-`1`

or
`NINST`

-by-`2`

vector.

A *spread option* is an option written on the
difference of two underlying assets.

For example, a European call on the difference of two assets *X1* and
*X2* would have the following pay off at maturity:

$$\mathrm{max}(X1-X2-K,0)$$

where:

*K* is the strike price.

For more information, see Spread Option.

[1] Carmona, R., Durrleman, V. “Pricing and Hedging Spread
Options.” *SIAM Review.* Vol. 45, No.
4, pp. 627–685, Society for Industrial and Applied Mathematics,
2003.

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)