Main Content

simTermStructs

Simulate term structures for LIBOR Market Model

Description

example

[ZeroRates,ForwardRates] = simTermStructs(LMM,nPeriods)simulates future zero curve paths using a specifiedLiborMarketModelobject.

example

[ZeroRates,ForwardRates] = simTermStructs(___,Name,Value)adds optional name-value pair arguments.

Examples

collapse all

Create aLMMobject.

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)
LMM = LiborMarketModel属性:ZeroCurve:[1x1 IRDataCurve] VolFunctions: {1x19 cell} Correlation: [19x19 double] NumFactors: NaN Period: 1

Simulate the term structures for the specifiedLMMobject.

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

Input Arguments

collapse all

LiborMarketModelobject, specified using theLMMobject created usingLiborMarketModel.

Data Types:object

Number of simulation periods, specified as a numeric value. ThenPeriods值是由互换期权到期和决定periodicity of the rates of the model. For example, if you were to price a swaption expiring in 5 years with a semiannual LIBOR Market Model (LMM), thennPeriodswould be10.

Data Types:double

Name-Value Arguments

Specify optional comma-separated pairs ofName,Valuearguments.Nameis the argument name andValueis the corresponding value.Namemust appear inside quotes. You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN.

Example:[ZeroRates, ForwardRates] = simTermStructs(LMM, 20,'nTrials',100)

Number of simulated trials (sample paths), specified as the comma-separated pair consisting of'nTrials'and a positive scalar integer value ofnPeriodsobservations each. If you do not specify a value for this argument, the default is1, indicating a single path of correlated state variables.

Data Types:double

Flag indicating whether antithetic sampling is used to generate the Gaussian random variates that drive the zero-drift, unit-variance rate Brownian vectordW(t), specified as the comma-separated pair consisting of'antithetic'and a Boolean scalar flag. For details on the Brownian vector, seesimBySolution.

Data Types:logical

Direct specification of the dependent random noise process, specified as the comma-separated pair consisting of'Z'and a numeric value. TheZvalue is used to generate the zero-drift, unit-variance rate Brownian vectordW(t) that drives the simulation. For details, seesimBySolutionfor the GBM model.

Data Types:double

Maturities to compute at each time step, specified as the comma-separated pair consisting of'Tenor'and a numeric vector.

Tenorenables you to choose a different set of rates to output than the underlying rates. For example, you may want to simulate quarterly data but only report annual rates; this can be done by specifying the optional inputTenor.

The default fortenoris the number of rates in theLiborMarketModelobject as specified by theCorrelationandVolFuncinput arguments for theLiborMarketModelobject.

Data Types:double

Output Arguments

collapse all

Simulated zero-rate term structures, returned as anPeriods+1-by-nTenors-by-nTrialsmatrix.

Simulated zero-rate term structures, returned as anPeriods+1-by-nTenors-by-nTrialsmatrix.

Introduced in R2013a