simTermStructs
Simulate term structures for Hull-White one-factor model
Syntax
Description
[
simulates future zero curve paths using a specified ZeroRates,ForwardRates] = simTermStructs(HW1F,nPeriods)HullWhite1F object.
[
adds optional name-value pair arguments. ZeroRates,ForwardRates] = simTermStructs(___,Name,Value)
Examples
Create a HW1F object.
Settle = datetime(2007,12,15);
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: [1×1 IRDataCurve]
Alpha: @(t,V)inAlpha
Sigma: @(t,V)inSigma
Simulate the term structures for the specified HW1F object.
SimPaths = simTermStructs(HW1F, 10,'nTrials',100);Input Arguments
HullWhite1F object, specified using the HW1F
object created using HullWhite1F.
Data Types: object
Number of simulation periods, specified as a numeric value. For example, to
simulate 12 years with an annual spacing, specify 12 as the
nPeriods input and 1 as the optional
deltaTime input (note that the default value for
deltaTime is 1).
Data Types: double
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: [ZeroRates,ForwardRates] =
simTermStructs(HW1F,NPeriods,'nTrials',100,'deltaTime',dt)
Time step between nPeriods measured in years, specified as
the comma-separated pair consisting of 'deltaTime' and a scalar
numeric value. For example, to simulate 12 years with an annual spacing, specify
12 as the nPeriods input and
1 as the optional deltaTime input (note that
the default value for deltaTime is 1).
Data Types: double
Number of simulated trials (sample paths), specified as the comma-separated pair
consisting of 'nTrials' and a positive scalar integer value 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.
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 vector
dW(t), specified as the comma-separated pair
consisting of 'antithetic' and a Boolean scalar flag. For details,
see simBySolution.
Data Types: logical
Direct specification of the dependent random noise process, specified as the
comma-separated pair consisting of 'Z' and a numeric value. The
Z value is 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. If you do not specify a value for
Z, simBySolution generates Gaussian
variates.
Data Types: double
Maturities to compute at each time step, specified as the comma-separated pair
consisting of 'Tenor' and a numeric vector.
Tenor enables 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 input
Tenor.
Data Types: double
Output Arguments
Simulated zero-rate term structures, returned as a
nPeriods+1-by-nTenors-by-nTrials
matrix.
Simulated zero-rate term structures, returned as a
nPeriods+1-by-nTenors-by-nTrials
matrix. The ForwardRates output is computed using the simulated
short rates and by using the model definition to recover the entire yield curve at
each simulation date.
Version History
Introduced in R2013a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)