# LiborMarketModel class

Create LIBOR Market Model

## Description

The LIBOR Market Model (LMM) differs from short rate models in that it evolves a set of discrete forward rates. Specifically, the lognormal LMM specifies the following diffusion equation for each forward rate

$\frac{d{F}_{i}\left(t\right)}{{F}_{i}}=-{\mu }_{i}dt+{\sigma }_{i}\left(t\right)d{W}_{i}$

where:

W is an N-dimensional geometric Brownian motion with

$d{W}_{i}\left(t\right)d{W}_{j}\left(t\right)={\rho }_{ij}$

The LMM relates the drifts of the forward rates based on no-arbitrage arguments. Specifically, under the Spot LIBOR measure, the drifts are expressed as

${\mu }_{i}\left(t\right)=-{\sigma }_{i}\left(t\right)\sum _{j=q\left(t\right)}^{i}\frac{{\tau }_{j}{\rho }_{i,j}{\sigma }_{j}\left(t\right){F}_{j}\left(t\right)}{1+{\tau }_{j}{F}_{j}\left(t\right)}$

where:

${\tau }_{i}$ is the time fraction associated with the i th forward rate

q(t) is an index defined by the relation

${T}_{q\left(t\right)-1}

and the Spot LIBOR numeraire is defined as

$B\left(t\right)=P\left(t,{T}_{q\left(t\right)}\right)\prod _{n=0}^{q\left(t\right)-1}\left(1+{\tau }_{n}{F}_{n}\left({T}_{n}\right)\right)$

## Construction

`OBJ = LiborMarketModel(ZeroCurve,VolFunc,Correlation)` constructs a LIBOR Market Model object.

For example:

```Settle = datenum('15-Dec-2007'); CurveTimes = [1:5 7 10 20]'; ZeroRates = [.01 .018 .024 .029 .033 .034 .035 .034]'; CurveDates = daysadd(Settle,360*CurveTimes,1); irdc = IRDataCurve('Zero',Settle,CurveDates,ZeroRates); LMMVolFunc = @(a,t) (a(1)*t + a(2)).*exp(-a(3)*t) + a(4); LMMVolParams = [.3 -.02 .7 .14]; numRates = 20; VolFunc(1:numRates-1) = {@(t) LMMVolFunc(LMMVolParams,t)}; Beta = .08; CorrFunc = @(i,j,Beta) exp(-Beta*abs(i-j)); Correlation = CorrFunc(meshgrid(1:numRates-1)',meshgrid(1:numRates-1),Beta); LMM = LiborMarketModel(irdc,VolFunc,Correlation,'Period',1);```

## Properties

The following properties are from the `LiborMarketModel` class.

`ZeroCurve`

`ZeroCurve` is specified using the output from `IRDataCurve` or `RateSpec`. This is the zero curve used to evolve the path of future interest rates.

Attributes:

 `SetAccess` `public` `GetAccess` `public`

`VolFunc`

`NumRates`-by-`1` cell array of function handles. Each function handle must take time as an input and, return a scalar volatility.

Attributes:

 `SetAccess` `public` `GetAccess` `public`

`Correlation`

`NumRates`-by-`NumRates` correlation matrix.

Attributes:

 `SetAccess` `public` `GetAccess` `public`

`NumFactors`

Number of Brownian factors. The default is `NaN`, where the number of factors is equal to the number of rates.

Attributes:

 `SetAccess` `public` `GetAccess` `public`

`Period`

Period of the forward rates. The default is `2`, meaning forward rates are spaced at `0`, `.5`, `1`, `1.5`, and so on. Possible values for `Period` are: 1, 2, 4, and 12.

 Note:   `Correlation` and `VolFunc` are sized with `NumRates`-by-`1` since the first rate is locked in and essentially dead.

Attributes:

 `SetAccess` `public` `GetAccess` `public`

## Methods

 simTermStructs Simulate term structures for LIBOR Market Model

## Definitions

### LIBOR Market Model

The LIBOR Market Model, also called the BGM Model (Brace, Gatarek, Musiela Model) is a financial model of interest rates. The quantities that are modeled are a set of forward rates (also called forward LIBORs) which have the advantage of being directly observable in the market, and whose volatilities are naturally linked to traded contracts.

## Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® documentation.

## Examples

collapse all

### Construct a LIBOR Market Model

Construct a `LMM` object.

```Settle = datenum('15-Dec-2007'); CurveTimes = [1:5 7 10 20]'; ZeroRates = [.01 .018 .024 .029 .033 .034 .035 .034]'; CurveDates = daysadd(Settle,360*CurveTimes,1); irdc = IRDataCurve('Zero',Settle,CurveDates,ZeroRates); LMMVolFunc = @(a,t) (a(1)*t + a(2)).*exp(-a(3)*t) + a(4); LMMVolParams = [.3 -.02 .7 .14]; numRates = 20; VolFunc(1:numRates-1) = {@(t) LMMVolFunc(LMMVolParams,t)}; Beta = .08; CorrFunc = @(i,j,Beta) exp(-Beta*abs(i-j)); Correlation = CorrFunc(meshgrid(1:numRates-1)',meshgrid(1:numRates-1),Beta); LMM = LiborMarketModel(irdc,VolFunc,Correlation,'Period',1); ```

Simulate the term structures for the specified `LMM` object.

```[ZeroRates, ForwardRates] = simTermStructs(LMM, 10,'nTrials',100); ```

## References

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