Welcome to THETAWIKI. If you like to create or edit a page please make sure to login or register an account. All registered users please make sure to provide a valid email address.

# The Two Factor Hull-White Model

The two-factor Hull-White model(1994)[1] assumes that instantaneous short rate has the following dynamics under the risk-neutral measure $Q$:

$d\,r(t) = \left [\theta(t) + u(t) - a_{hw}\,r(t)\right ]dt + \sigma_1(t)\, dZ_1(t), \qquad (HW2.1)$

where the stochastic mean $u(t)$ evolves as a zero mean Orlenstein-Uhlenbeck process

$du = -b_{hw}u\,dt + \sigma_2(t)\,dZ_2(t), \qquad (HW2.2)$

with $u(0)=0,$ and $dZ_1(t)dZ_2(t)=\rho_{hw} dt.$

The classical, analytically tractable, additive Gaussian two factor (G2++) model similarly assumes that short rate is driven by two stochastic factors plus a deterministic shift function derived from initial term structure:

$r(t)=x(t)+y(t)+\phi(t),\qquad (HW2.3)$

and the two factors satisfy the following processes

$dx(t)= -ax(t)dt+\sigma dW_1(t),\qquad (HW2.4)$
$dy(t)= -by(t)dt+\eta dW_2(t),\qquad (HW2.5)$

where $dW_1(t)dW_2(t)=\rho dt,$ and $\phi(t)=r_0e^{-at}+\int_0^t\theta(v)e^{-a(t-v)}dv.$

Brigo & Mercurio(2006)[2] proved that the additive Gaussian two-factor (G2++) model is equivalent to the Hull-White two-factor model[1] after setting:

$a=a_{hw},\!$
$b=b_{hw},\!$
$\sigma=\sigma_3,\!$
$\eta=\sigma_4,\!$
$\rho=\frac{\rho \sigma_1-\sigma_4}{\sigma_3},\!$
$\phi(t)=r_0e^{-a_{hw}t}+\int_0^t\theta(v)e^{-a_{hw}(t-v)}dv,\!$

where $\sigma_3=\sqrt{\sigma_1^2+\frac{\sigma_2^2}{(a_{hw}-b_{hw})^2}+2\rho\frac{\sigma_1\sigma_2}{b_{hw}-a_{hw}}},\!$ and $\sigma_4=\frac{\sigma_2^2}{b_{hw}-a_{hw}}.\!$

Once the parameters in the Hull-White two-factor model[1] are mapped to the corresponding G2++ parameters, the analytical formulas that are readily available for the G2++ model can simply be applied to the Hull-White two-factor model, as what we show below.

# Two Factor Hull-White Model Bond Prices

As with the other models we are interested in the price of zero-coupon bond with a face value of $1. For a maturity time$ T $the bond price at time$ t $is given by$ P(t,T)=\frac{P(0,T)}{P(0,t)}\exp{(A(t,T))} \! $here$ A(t,T)=\frac{1}{2}(V(t,T) - V(0,T) + V(0,t) ) \!-x(t)\frac{1-e^{-a(T-t)}}{a} -y(t)\frac{1-e^{-b(T-t)}}{b}.\! $and$ V(t,T)= \frac{\sigma^2}{a^2} \left[T-t+\frac{2}{a}e^{-a(T-t)}-\frac{1}{2a}e^{-2a(T-t)}-\frac{3}{2a}\right]\!+ \frac{\eta^2}{b^2}\left[T-t+\frac{2}{b}e^{-b(T-t)}-\frac{1}{2b}e^{-2b(T-t)}-\frac{3}{2b}\right]\!+ 2\rho\frac{\sigma\eta}{ab}\left[T-t+\frac{e^{-a(T-t)}-1}{a}+\frac{e^{-b(T-t)}-1}{b}-\frac{e^{-(a+b)(T-t)}-1}{a+b}\right],\! $and$ P(0,t) \$ is the initial discount bond price.

# The G2++ Model in ThetaML Code

We show below how G2++ is modelled in ThetaML:

model Gaussian2Factor
%This model simulates the G2++ short rates
%Example input parameters:
%a = 0.773511777, b = 0.082013014, sigma = 0.022284644
%eta = 0.010382461, rho = -0.701985206, ht = 1/12, t = 1
%F0 = [0.0103, 0.0149, 0.0199, 0.0242, 0.0259]
%T0 = [1, 2, 3, 4, 5]
import a      "Mean reversion speed for x process"
import b      "Mean reversion speed for y process"
import sigma  "Volatility of the x process"
import eta    "Volatility of the y process"
import rho    "Instantaneous correlation between x and y"
import ht     "Discretization time step"
import t      "Simulation time horizon"
import F0     "Initial forward rates"
import T0     "Initial forward rate maturity times"
export r      "Simulated short rates"

%initial short rate is the forward rate F0 at time 0
r = F0[1]

fork
tBefore = 0
%loop through the initial forward rates and maturity times
loop f, ti : F0, T0
ft = f
dtf = ti - tBefore
%theta advances time to the next maturiy time
theta dtf
tBefore = ti
end
end

x = 0
y = 0
loop t/ht
phi = ft + (0.5*sigma^2/a^2) * (1-exp(-a*@time))^2 + (0.5*eta^2/b^2) * (1-exp(-b*@time))^2
+ rho*sigma*eta/(a*b) * (1-exp(-a*@time)) * (1-exp(-b*@time))
%theta advances time by ht step
theta ht

% the two additive factor Gaussian model (G2++)

dW1 = sqrt(ht)*randn()
dW2 = sqrt(ht)*randn()

dx = -a*x*ht + sigma*dW1
dy = -b*y*ht + eta*rho*dW2 + eta*sqrt(1-rho^2)*dW2

x = x + dx
y = y + dy
r = x + y + phi
end

% the final value for ft
ft = ft
end

# References

1. Hull, John C, 2006, Options, Futures, and Other Derivatives (6th ed. ed.). Upper Saddle River, N.J: Prentice Hall. p657–658. ISBN 0131499084.
2. Brigo Damiano, and Fabio Mercurio, 2001. Interest Rate Models – Theory and Practice with Smile, Inflation and Credit (2nd ed. 2006 ed.). Springer Verlag. ISBN 978-3-540-22149-4.