Simulate Zero-Coupon Bond Prices using G2++ Model

rpriceg2plus(
  n = 10L,
  horizon = 5L,
  freq = "semi-annual",
  u = 1:30,
  txZC = c(0.01422, 0.01309, 0.0138, 0.01549, 0.01747, 0.0194, 0.02104, 0.02236, 0.02348,
    0.02446, 0.02535, 0.02614, 0.02679, 0.02727, 0.0276, 0.02779, 0.02787, 0.02786,
    0.02776, 0.02762, 0.02745, 0.02727, 0.02707, 0.02686, 0.02663, 0.0264, 0.02618,
    0.02597, 0.02578, 0.02563),
  a = 0.5,
  b = 0.3541203,
  sigma = 0.09416266,
  eta = 0.08439934,
  rho = -0.99855687,
  maturities = c(5, 7, 10),
  start_ = c(2000, 1),
  seed = NULL,
  ...
)

Arguments

n

Number of scenarios to simulate.

horizon

Time steps for simulation (e.g., 5 for 5 years).

freq

Frequency of simulation (default is "semi-annual").

u

Observed maturities (vector).

txZC

Yield to maturities (vector, same length as u).

a

G2++ mean reversion for factor x.

b

G2++ mean reversion for factor y.

sigma

Volatility of factor x.

eta

Volatility of factor y.

rho

Correlation between factors.

maturities

Bond maturity times.

start_

Starting time for ts object.

seed

Random seed for reproducibility.

...

Additional parameters to be passed to simdiff or simshocks

Value

A time series of simulated bond prices for each scenario.