# swaptionbylg2f

Price European swaption using Linear Gaussian two-factor model

## Syntax

• `Price = swaptionbylg2f(ZeroCurve,a,b,sigma,eta,rho,Strike,ExerciseDate,Maturity)` example
• `Price = swaptionbylg2f(___, Name,Value)` example

## Description

example

````Price = swaptionbylg2f(ZeroCurve,a,b,sigma,eta,rho,Strike,ExerciseDate,Maturity)` returns the European swaption price for a two-factor additive Gaussian interest-rate model.```

example

````Price = swaptionbylg2f(___, Name,Value)` returns the Eurpoean swaption price for two-factor additive Gaussian interest-rate model using optional name-value pairs.```

## Examples

collapse all

### Price a European Swaption Using a Linear Gaussian Two-Factor Model

Define the `ZeroCurve`, `a`, `b`, `sigma`, `eta`, and `rho` parameters to compute the price of the swaption.

```Settle = datenum('15-Dec-2007'); ZeroTimes = [3/12 6/12 1 5 7 10 20 30]'; ZeroRates = [0.033 0.034 0.035 0.040 0.042 0.044 0.048 0.0475]'; CurveDates = daysadd(Settle,360*ZeroTimes,1); irdc = IRDataCurve('Zero',Settle,CurveDates,ZeroRates); a = .07; b = .5; sigma = .01; eta = .006; rho = -.7; Reset = 1; ExerciseDate = daysadd(Settle,360*5,1); Maturity = daysadd(ExerciseDate,360*[3;4],1); Strike = .05; Price = swaptionbylg2f(irdc,a,b,sigma,eta,rho,Strike,ExerciseDate,Maturity,'Reset',Reset) ```
```Price = 1.1870 1.5633 ```

## Input Arguments

collapse all

### `ZeroCurve` — Zero-curve for Linear Gaussian two-factor modelstructure

Zero-curve for the Linear Gaussian two-factor model, specified using `IRDataCurve` or `RateSpec`.

Data Types: `struct`

### `a` — Mean reversion for first factor for Linear Gaussian two-factor modelscalar

Mean reversion for first factor for the Linear Gaussian two-factor model, specified as a scalar.

Data Types: `single` | `double`

### `b` — Mean reversion for second factor for Linear Gaussian two-factor modelscalar

Mean reversion for second factor for the Linear Gaussian two-factor model, specified as a scalar.

Data Types: `single` | `double`

### `sigma` — Volatility for first factor for Linear Gaussian two-factor modelscalar

Volatility for first factor for the Linear Gaussian two-factor model, specified as a scalar.

Data Types: `single` | `double`

### `eta` — Volatility for second factor for Linear Gaussian two-factor modelscalar

Volatility for second factor for the Linear Gaussian two-factor model, specified as a scalar.

Data Types: `single` | `double`

### `rho` — Scalar correlation of the factorsscalar

Scalar correlation of the factors, specified as a scalar.

Data Types: `single` | `double`

### `Strike` — Swaption strike pricenonnegative integer | vector of nonnegative integers

Swaption strike price, specified as a nonnegative integer using a `NumSwaptions`-by-`1` vector.

Data Types: `single` | `double`

### `ExerciseDate` — Swaption exercise datesnonnegative integer | vector of nonnegative integers

Swaption exercise dates, specified as a `NumSwaptions`-by-`1` vector of serial date numbers or date strings.

Data Types: `single` | `double`

### `Maturity` — Underlying swap maturity datenonnegative integer | vector of nonnegative integers | string of dates

Underlying swap maturity date, specified using a `NumSwaptions`-by-`1` vector of serial date numbers or date strings.

Data Types: `single` | `double` | `cell`

### Name-Value Pair Arguments

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: `Price = swaptionbylg2f(irdc,a,b,sigma,eta,rho,Strike,ExerciseDate,Maturity,'Reset',1,'Notional',100,‘OptSpec','call')`

### `'Reset'` — Frequency of swaption payments per year`2` (default) | positive integer from the set`[1,2,3,4,6,12]` | vector of positive integers from the set `[1,2,3,4,6,12]`

Frequency of swaption payments per year, specified as positive integers for the values `1,2,4,6,12]` in a `NumSwaptions`-by-`1` vector.

Data Types: `single` | `double`

### `'Notional'` — Notional value of swaption`100` (default) | nonnegative integer | vector of nonnegative integers

Notional value of swaption, specified as a nonnegative integer using a `NumSwaptions`-by-`1` vector of notional amounts.

Data Types: `single` | `double`

### `'OptSpec'` — Option specification for the swaption`'call'` (default) | string with value of `'call'` or `'put'` | cell array of string with values of `'call'` or `'put'`

Option specification for the swaption, specified as a string or a `NumSwaptions`-by-`1` cell array of strings with a value of `'call'` or `'put'`.

A `‘call'` swaption or Payer swaption allows the option buyer to enter into an interest-rate swap in which the buyer of the option pays the fixed rate and receives the floating rate.

A `'put'` swaption or Receiver swaption allows the option buyer to enter into an interest-rate swap in which the buyer of the option receives the fixed rate and pays the floating rate.

Data Types: `char` | `cell`

## Output Arguments

collapse all

### `Price` — Swaption pricescalar | vector

Swaption price, returned as a scalar or an `NumSwaptions`-by-`1` vector.

collapse all

### Algorithms

The following defines the swaption price for a two-factor additive Gaussian interest-rate model, given the `ZeroCurve`, `a`, `b`, `sigma`, `eta`, and `rho` parameters:

$r\left(t\right)=x\left(t\right)+y\left(t\right)+\varphi \left(t\right)$

where $d{W}_{1}\left(t\right)d{W}_{2}\left(t\right)=\rho dt$ is a two-dimensional Brownian motion with correlation ρ and ϕ is a function chosen to match the initial zero curve.

## References

[1] Brigo, D. and F. Mercurio, Interest Rate Models - Theory and Practice, Springer Finance, 2006.

Get trial now