G2++¶
Overview¶
G2++ is the two-factor additive Gaussian model: the short rate is the sum of two correlated zero-mean Ornstein-Uhlenbeck factors plus a deterministic shift that fits the observed discount curve exactly. The second factor decorrelates rates at different maturities, producing curve twists that no one-factor model can generate — essential for products sensitive to the shape of the curve. Bonds, bond options, and caps/floors remain closed-form; simulation uses exact joint-Gaussian factor transitions. G2++ is equivalent to the two-factor Hull-White model.
Dynamics¶
Under the risk-neutral measure,
with \(x(0) = y(0) = 0\). Fitting the market curve pins the shift:
Bond pricing¶
Define, for \(\tau = T - t\),
Then, with \(B_z(\tau) = \frac{1}{z}\left(1 - e^{-z\tau}\right)\) for \(z \in \{a, b\}\):
At \(t = 0\) the input curve is reproduced exactly.
Bond options¶
The log-price of the bond at expiry is Gaussian with total variance
and the call price is
Caplets and floorlets price by the bond-put replication, as for Hull-White.
Simulation¶
The pair \((x, y)\) has jointly Gaussian transitions with
sampled exactly per step; the shift \(\varphi\) is added at each grid point.
Parameters¶
Parameter |
Meaning |
Constraint |
|---|---|---|
|
market discount curve, fitted exactly |
— |
\(a, b\) |
factor mean-reversion speeds |
\(a, b > 0\) |
\(\sigma, \eta\) |
factor volatilities |
\(\sigma, \eta > 0\) |
\(\rho\) |
factor correlation |
\(-1 \leq \rho \leq 1\) |
A typical calibrated shape has one slow and one fast factor with strongly negative \(\rho\).
Usage¶
from interest_rate_models import get_model
model = get_model("g2++", curve=curve, a=0.5, b=0.05, sigma=0.008, eta=0.006, rho=-0.7)
model.bond_price(0.0, 5.0) # == curve.discount(5.0)
model.bond_option(1.0, 5.0, strike=0.85)
model.cap_price(strike=0.035, maturity=3.0, tenor=0.5)
times, r, x, y = model.simulate(3.0, 300, 10_000, seed=42, return_factors=True)
References¶
Brigo, D., Mercurio, F. (2006). Interest Rate Models — Theory and Practice, 2nd ed., Springer, ch. 4.
Hull, J., White, A. (1994). “Numerical procedures for implementing term structure models II: Two-factor models”, Journal of Derivatives, 2(2), 37-48.