# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# LiborMarketModel

Create LIBOR Market Model

## Description

The LIBOR Market Model (LMM) is an interest-rate model that 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 drifts of the forward rates based on no-arbitrage arguments. Specifically, under the Spot LIBOR measure, 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:

${\rho }_{i,j}$ represents the input argument `Correlation`.

${\sigma }_{j}\left(t\right)$ represents the input argument `VolFunc`.

${F}_{j}\left(t\right)$ represents the computation of the input argument for `ZeroCurve`.

${\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)$`

## Creation

### Syntax

``LMM = LiborMarketModel(ZeroCurve,VolFunc,Correlation)``
``LMM = LiborMarketModel(___,Name,Value)``

### Description

example

````LMM = LiborMarketModel(ZeroCurve,VolFunc,Correlation)` creates a `LiborMarketModel` (`LMM`) object using the required arguments for `ZeroCurve`, `VolFunc`, `Correlation`.```

example

````LMM = LiborMarketModel(___,Name,Value)` sets Properties using name-value pairs. For example, ```LMM = LiborMarketModel(irdc,VolFunc,Correlation,'Period',1)```. You can specify multiple name-value pairs. Enclose each property name in single quotes.```

### Input Arguments

expand all

Zero curve used to evolve the path of future interest rates, specified as an output from `IRDataCurve` or a `RateSpec` that is obtained from `intenvset`. The `ZeroCurve` input sets the ZeroCurve property.

Data Types: `object` | `struct`

Volatility function, specified using a `NumRates`-by-`1` cell array of function handles and sets the VolFunc property. Each function handle must take time as an input and, return a scalar volatility.

### Note

The number of rates to simulate using the `simTermStructs` function is determined by the size of the `VolFunc` and `Correlation` inputs which must be consistent. These can be any value and, together with the `Period` property, determines the kinds and number of rates being simulated. For example, if the `Period` is set to `4` (quarterly) and `VolFunc` has length of `120` and `Correlation` has size `120`-by-`120`, then `120` quarterly rates are simulated. In other words, 30 years of the yield curve are simulated (0-3mos, 3mos-6mos, 6mos-9mos, and so on, all the way up to 30 years). Therefore, if `VolFunc` and `Correlation` have size `120`, the output of a call to `simTermStructs` is (`nPeriods`+`1`) -by-`121`-by-`nTrials`.

Data Types: `cell`

Correlation matrix, specified using a `NumRates`-by-`NumRates` correlation matrix and sets the Correlation property.

### Note

The number of rates to simulate using the `simTermStructs` function is determined by the size of the `VolFunc` and `Correlation` inputs which must be consistent. These can be any value and, together with the `Period` property, determines the kinds and number of rates being simulated. For example, if the `Period` is set to `4` (quarterly) and `VolFunc` has length of `120` and `Correlation` has size `120`-by-`120`, then `120` quarterly rates are simulated. In other words, 30 years of the yield curve are simulated (0-3mos, 3mos-6mos, 6mos-9mos, and so on, all the way up to 30 years). Therefore, if `VolFunc` and `Correlation` have size `120`, the output of a call to `simTermStructs` is (`nPeriods`+`1`) -by-`121`-by-`nTrials`.

Data Types: `double`

## Properties

expand all

Zero curve, specified as an output from `IRDataCurve` or a `RateSpec` that is obtained from `intenvset`.

Data Types: `object` | `struct`

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

Data Types: `cell`

Correlation matrix, specified using a `NumRates`-by-`NumRates` correlation matrix.

Data Types: `double`

Number of Brownian factors, specified as a numeric value. The default is `NaN`, where the number of factors is equal to the number of rates.

Data Types: `double`

Period of the forward rates, specifically the number of rates per year, specified as a numeric value of `1`, `2`, `4`, or `12`. The default value is `2`, meaning forward rates are spaced at `0`, `.5`, `1`, `1.5`, and so on.

Data Types: `double`

## Object Functions

 `simTermStructs` Simulate term structures for LIBOR Market Model

## Examples

expand all

Create a `LMM` object using an `IRDataCurve`.

```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)',meshgrid(1:numRates),Beta); LMM = LiborMarketModel(irdc,VolFunc,Correlation,'Period',1)```
```LMM = LiborMarketModel with properties: ZeroCurve: [1x1 IRDataCurve] VolFunctions: {20x1 cell} Correlation: [20x20 double] NumFactors: NaN Period: 1 ```

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

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

Create a `LMM` object using a `RateSpec`.

```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); RateSpec = intenvset('Rates',ZeroRates,'EndDates',CurveDates,'StartDate',Settle); 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)',meshgrid(1:numRates),Beta); LMM = LiborMarketModel(RateSpec,VolFunc,Correlation,'Period',1)```
```LMM = LiborMarketModel with properties: ZeroCurve: [1x1 IRDataCurve] VolFunctions: {20x1 cell} Correlation: [20x20 double] NumFactors: NaN Period: 1 ```

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

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

expand all

## References

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