Documentation Center

  • Trials
  • Product Updates

simTermStructs

Class: HullWhite1F

Simulate term structures for Hull-White one-factor model

Syntax

[ZeroRates,ForwardRates] = simTermStructs(nPeriods)
[ZeroRates,ForwardRates] = simTermStructs(nPeriods,
Name,Value)

Description

[ZeroRates,ForwardRates] = simTermStructs(nPeriods) simulates future zero curve paths using a specified HullWhite1F object.

[ZeroRates,ForwardRates] = simTermStructs(nPeriods,
Name,Value)
simulates future zero curve paths using a specified HullWhite1F object with additional options specified by one or more Name,Value pair arguments.

Input Arguments

nPeriods

Number of simulation periods.

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.

'deltaTime'

Scalar time step between periods.

Default: 1

'nTrials'

Positive scalar integer number of simulated trials (sample paths) of NPERIODS observations each. If you do not specify a value for this argument, the default is 1, indicating a single path of correlated state variables.

Default: 1

'antithetic'

Boolean scalar flag indicating whether antithetic sampling is used to generate the Gaussian random variates that drive the zero-drift, unit-variance rate Brownian vector dW(t). For details, see simBySolution.

Default: false

'Z'

Direct specification of the dependent random noise process used to generate the zero-drift, unit-variance rate Brownian vector dW(t) that drives the simulation. For details, see simBySolution for the HWV model.

Default: Uses default for simBySolution. If you do not specify a value for Z, simBySolution generates Gaussian variates.

'Tenor'

Numeric vector of maturities to compute at each time step.

Default: tenor of the HullWhite1F object's zero curve

Output Arguments

ZeroRates

nPeriods+1-by-nTenors-by-nTrials matrix of simulated zero-rate term structures.

ForwardRates

nPeriods+1-by-nTenors-by-nTrials matrix of simulated forward-rate term structures.

Attributes

Accesspublic
Staticfalse
Hiddenfalse

To learn about attributes of methods, see Method Attributes in the MATLAB® Object-Oriented Programming documentation.

Examples

expand all

Simulate Term Structures for the HullWhite1F Model

Create a HW1F 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);

alpha = .1;
sigma = .01;

HW1F = HullWhite1F(irdc,alpha,sigma)
HW1F = 

  HullWhite1F with properties:

    ZeroCurve: [1x1 IRDataCurve]
        Alpha: @(t,V)inAlpha
        Sigma: @(t,V)inSigma

Simulate the term structures for the specified HW1F object.

SimPaths = HW1F.simTermStructs(10,'nTrials',100);

See Also

Was this topic helpful?