CQF - The Heath, Jarrow and Morton Model

Solutions

Three Ways to Derive Instantaneous Forward Rate

  1. The price of a zero-coupon bond that matures at time T paying $1 is given using an integral over the forward curve

Z(t;T) =e RtT f(t;s)ds / (1)

By solving an integral equation, con rm the instantaneous forward rate is de ned as

f(t; T ) = / @ / log Z(t; T ) / (2)
@T
Solution:
Z(t; T ) = / e RtT f(t;s)ds
log Z(t; T ) / = / ZtT f(t; s)ds
@T log Z(t; T ) / = / @T Zt / T
f(t; s)ds
@ / @
= / due to the fact that derivative is partial wrt T we have
@ / log Z(t; T ) / = / f(t; T ) 0
@T
@
f(t; T ) / = / log Z(t; T )
@T

Under risk-neutral expectation, forward rate is replaced by the short-term rate r(t):

Z(t;T) =EQ he RtT r(s)dsjFsi

Let's show the inverse: taking the de nition of instantaneous forward rates as given, derive the bond price

@
f(t; T ) / = / log Z(t; T )
@T
T / T / d / T
Zt / f(t; s)ds / = / Zt / log Z(t; s)ds = Zt / d (log Z(t; s))
ds
= / Leibniz integration gives
log Z(t; T ) log Z(t; t) / = / ZtT f(t; s)ds since Z(t; t) = Z(T ; T ) = 1
Z(t; T ) / = / e RtT f(t;s)ds
  1. Consider two bonds Z(t; T1) and Z(t; T2) where T2 > T1, and the forward rate f(t; T1; T2) that is locked-in between T1 and T2. By considering present value of 1$ investment, back from show that the locked-in forward rates are de ned as

f(t; T ) =@T@logZ(t;T)

Solution:

The longer-term bond Z(t; T2) is a natural discount factor. It is equal to the DF Z(t; T1) multiplied by e f1(T2T1) where f1 is a forward rate that applies from T1 to T2.

Z(t;T2) = Z(t;T1)ef(t;T1;T2)(T2 T1)
log / Z(t; T2) / = / f(t; T1; T2)(T2 T1))
Z(t; T1)
f(t; T / ; T / ) / = / log Z(t; T2) log Z(t; T1)
1 / 2
T2 T1
= in continous time, T2 T1 = t ! 0
= / lim / log Z(t; T1 + t) log Z(t; T1)
t!0+ / t
@
= / log Z(t; T )
@T

3. A forward rate f(t; T ) represents the instantaneous continuously compounded rate, that is contracted at time t for a risk-free borrowing at a future time T . Prove the relationship

between an instantaneous forward rate and ZCB yield

f(t; T ) =@T@logZ(t;T)

by considering a self- nancing portfolio that is short Z(t; T ) and long Z(t; T + t).

Solution: To replicate a forward rate that would apply for a small time period t, we can take a long position in bond Z(t; T + t) and short position in bond Z(t; T ). Then at

Z(t; T )
time T + t we receive Z(t;T+t) on the notional capital of 1 from the long position.
The time-adjusted rate of return on the portfolio will be
1 log / Z(t; T ) / = / log Z(t; T + t) log Z(t; T )
t / Z(t; T + t) / t

In continuous time limit, we obtain a derivative of log Z as a solution for the instantaneous forward rate at time t for investing at time T :

f(t; T ) = lim / log Z(t; T + t) log Z(t; T ) / = / @ / log Z(t; T ):
t / @T
t!0+

log Z Notice the similarity of the solution to discrete expression for the yield to maturity T t.

HJM SDE and Musiela Parameterization

Market price of risk. No arbitrage. Tenor time

  1. The key parameter that links the real and risk-neutral 'worlds' and explains a global market condition is the market price of (interest rate) risk (MPOR). Mathematically, the market price of risk is a parameter of choice that allows to cancel the drift. By considering

a hedged portfolio,

= Z(t; T1)Z(t; T2)

derive the relationship between SDE parameters for / dZ(t;T ) / = (t; T )dt + (t; T )dX and
Z(t;T )
the market price of interest rate risk.
(t; T1) r(t) / = / (t; T2) r(t)
(t; T1) / (t; T2)

Hint: in the risk-free world, all assets earn the risk-free rate.

Solution: The change in the hedged portfolio is given by d = dZ(t; T1) dZ(t; T2)

= Z(t; T1) [ (t; T1)dt + (t; T1)dX]

Z(t; T2) [ (t; T2)dt + (t; T2)dX]

If we choose / (t; T1)Z(t; T1) / 1Z1
= / or simply
(t; T2)Z(t; T2) / 2Z2

then our portfolio is risk-free { that is, if we substitutethen dX terms cancel out:

d = / ( (t; T1)Z(t; T1)(t; T2)Z(t; T2)) dt
= / ( 1Z12Z2)dt

In the risk-free world, all assets earn the risk-free rate therefore, the portfolio return is also equal d = r dt. Equating both results for d , we have

1Z12Z2 = r(Z1 Z2)
Z1 ( 1 r) / = / Z2 ( 2 r) / 1Z1
2Z2
1 r / = / 2 r / (r; t) / independent of T / ; T
1 / 2 / 1 / 2

The named interest rate models operate with the risk-adjusted drift (u !). One-factor models suggest that the slope of the yield curve at the short end is simply (u !)=2.

2. Using the de nition of the instantaneous forward rate (2)

f(t; T ) =@T@logZ(t;T)

obtain the corresponding SDE model. Assume the bond price follows a log-Normal model

dZZ =(t; T ) dt + (t; T ) dX

Hint: di erentiate with respect to t. The maturity time T is xed.

Solution:
f(t; T ) / = / @ / log Z(t; T )
@T
@
df(t; T ) / = / d / log Z(t; T )
@T
= / @ / (d log Z(t; T ))
@T
@ dZ(t; T ) / 1 dZ(t; T )2
=
@T / Z(t; T ) / 2 Z(t; T )2
dZ / dZ / 2
= / we know / : Evaluate / using O(dX2) = dt dropping other terms
Z / Z
= @T / (t; T ) dt + (t; T ) dX 2 2 / (t; T )dt
@ / 1
= @T / (t; T ) 2 2(t; T ) dt + (t; T ) dX :
@ / 1

How did we obtain result for d (log Z(t; T )) =12 2 dt+ dX?

This is our familiar GBM dynamics for Z(t; T ) and It^o application to F = log Z as follows:

@F / 1 @2F / (dZ)2
dF / = / (dZ) +
2 @Z2
@Z
With dFdZ = / 1 / , / d2F / = / 1 / and (dZ)2 = 2Z2dt
Z / dZ2 / Z2
1 / 1 / 1 / 2Z2dt
dF / = / ( Zdt + ZdX)
Z / 2 / Z2
= / 1 / 2 dt + dX:
2

4

3. The raw model for the evolution of (points) f(t; Ti) on the forward curve relates the drift to volatility as

df(t; T ) = / @ / 1 / 2(t; T ) (t; T ) / dt / @ / (t; T )dXQ / (3)
@T / 2 / @T

Show that, under the risk-neutral measure Q, the model can be expressed as

df(t; T ) = m(t; T )dt + (t; T )dX

where (t; T ) = @T@ (t; T ) simpli es the di usion term, and the risk-neutral drift can be expressed solely as a function of volatility (no arbitrage condition)

T

Z

m(t; T ) = (t; T )(t; s)ds

t

Solution: Let's consider di erentiation @T@ of the drift of equation (3)

m(t; T ) = / @ / 1 / 2(t; T ) (t; T )
@T / 2

Under the risk-neutral measure (t; T ) ! r(t), where the spot rate does not depend on time T , so @T@ r(t) = 0. What we have left is

@ / 1 / 2
m(t; T ) = / (t; T )
@T / 2

=12@T@ [ (t; T ) (t; T )]

=12 (t; T ) (t; T )0 + (t; T )0 (t; T )

= (t; T )0 (t; T ) = (t; T ) / @ / (t; T ) / This is the dirft.
@T

Now we have to express the drift in terms of (t; T ) = @T@ (t; T ). By solving an integral equation we can nd the solution for (t; T )

ZtT (t; s)ds = ZtT d( (t; s)) = (t; T ) / where Z(t; t) = 1 ! (t; t) = 0:
Then, continue by substitution into the underlined expression
m(t; T ) = / ZtT (t; s)ds(t; T )
= / (t; T ) ZtT (t; s)ds:

5

  1. Musiela Parametrisation of the HJM model (risk-neutral evolution of the forward curve)

provides convenience of operating with xed tenors = T t rather than maturity dates. By applying the change of variable f(t; T ) ! f(t; ) and using the chain rule of di eren-tiation, show that the Musiela Parametrisation of the one-factor HJM model is

df(t; ) = (t; ) Z0 / @f@ / dt + (t; )dX
(t; s)ds +
(t; )

Hint: taking of a derivative of forward rate wrt T is equivalent to taking of a derivative of Musiela Parameterisation wrt , i.e., @T@f@@f .

Solution:

There are a number of related results known as `chain rules' for di erentiating the function of multiple variables (that intertwine). We begin with f(t; T ) = f(t; t + T t), have to construct a di erential df(t; ) using the original variables t; T , done as follows:

dtf(t; T t) = / @T @t / + @t @T / f(t; T ) = / @t / + @T / f(t; T ) y
d / @ @T / @ @t / @ / @

Why? Remember that for f(t; T ) our variable of di erentiation is t { the SDE evolves with dt, not dT . We assume constant and two functions T (t) = t + and t(T ) = T . Any di erentiation @T@ would require @T@t , and the same works for di erentiating wrt t.

Makinga variable, it is straightforward to show (so \is the new T ")

@ / = / @ @T / = / @ / because / @T / = 1
@ / @T @ / @T / @

To understand Musiela Parameterisation HJM SDE treat the small di erential @t as

`a real variable' that is moved to the rhs `to multiply' and obtain the boxed expression:

@t@ f(t; )

df(t; )

@
@ / f(t; T ) y
+
@t / @T
= df(t; T ) + / @f(t; T ) / dt
= / | / {z( / } / T / @T
Zt
t; T ) / (t; s)ds
df df + / @f
becomes / dt
@T
then by / @ / @ / @T
@ / = @T @
@f(t; )
dt + (t; T )dX + / dt
@
| / (t; s) / {z / }
Z / @
0
=(t; ) / ds + / @f(t; ) / dt + (t; )dX

The extra forward derivative term @f(t;) is a slope of the yield curve. Its role is to maintain

@

constant-tenor points of the yield curve by correcting for `rolling on the curve' e ect. As instruments expire, the curve `shifts' left in time.

6

  1. Most of the popular models for r(t) have HJM representations. Consider Ho & Lee model for the spot rate r(t),

dr(t) = (t)dt + c dX;for constant c:

Formulate a bond pricing equation (BPE) and use continuous version of the forward rate bootstrapping formula in order to obtain an SDE for df(t; T ). Explain equivalence of terms in this SDE to the HJM SDE (non-Musiela).

Solution:

Z(r; t; T ) in the Ho & Lee model satis es the following BPE and corresponding solution:

@Z / 1 / c2 / @2Z / @Z
+ / + (t) / rZ = 0
@t / 2 / @r2 / @r
Z(r; T ; T ) = 1
1 / T
Z(r; t; T ) = exp / c2(T / t)3 Zt / (s)(T s)ds (T t)r
6
where (t) is chosen to t the yield curve at time t .
In forward rate terms f(t; T ) = / @ / log Z(t; T ) means that
@T
1 / T
t )2 + Zt
f(t ; T ) = r(t ) / c2(T / (s)ds
2
and so, at any time t > t / @f(t ; t)
(t) = / + c2(t t )
@t
1 / T
c2(T / t)2 + Zt
f(t; T ) = r(t) / (s)ds
2

Use this Ho & Lee solution for the forward rate to obtain the SDE for df(t; T ),

@ / @ / @ / 1 / T
f(t; T ) = / r(t) + / c2(T t)2 + Zt / (s)ds
@t / @t / @t / 2
= / (di erentiate wrt t and move di erential to the rhs)

df(t; T )=dr(t) + c2(Tt)dt(t)dt

= (t)dt + c dX + c2(T t)dt (t)dt = c2(T t)dt + c dX

One of the interim results for the HJM SDE (below) makes it straightforward to identify

(t; T ) = c and(t; T ) =c(Tt),

df(t; T ) =(t; T ) (t; T )dt + (t; T ) dX

Ho & Lee model for the spot rate r(t) o ers a simple yield curve tting, making it the most suitable to draw a rst comparison to the HJM framework.

7

Numerical Methods for PCA: Jacobi Transformation

Jacobi Transformation is a tractable numerical method of matrix diagonalization (e.g., ob-

taining a diagonal matrix of eigenvalues).The method is based on eliminating the largest

o -diagonal element by rotating the matrix. `Rotation' is implemented by pre-multiplying ma-

trix A, which we ultimately want to decompose, by matrix Pp;q that is specially constructed in order to cancel an o -diagonal element ap;q so that a0p;q = 0.

2 / 1 / :: / : 1 / cos / :: / sin / : / :: / 0 / 3
6 / 0: / 7
6 / 7
Pp;q = / 6 / 0 / 1 / 0 / 7
6 / 7
6 / 7
6 / 7
6 / sin / 0 / cos / 7
6 / 7
6 / : / :: / :: / 1 / :: / : / 7
6 / : / 7
6 / 7
6 / 0 / 1 / 7
6 / 7
4 / 5

For each rotation, we multiply

A0 = Pp;qTAPp;q

For a covariance matrix, the rotation occurs within the unit circle, and therefore, properties

of trigonometric functions can be e ciently used. Key to implementation is calculation of the

angle of rotation.

  1. Describe the purpose of applying Jacobi Transformation to a covariance matrix. Solution: The method is part of the speci c class of spectral decomposition that factorizes

a matrix into eigenvalues and corresponding eigenvectors. Spectral decomposition is used to identify main uncorrelated (orthogonal) factors that determine the most variance of a system, usually expressed with a co-variance matrix.

2. Deduce why in order to eliminate the matrix element a0p;q = 0 it is necessary that tan(2 ) =

2ap;q

aq;qap;p. Hint:consider multiplication of individual matrix elements.

Solution: Consider the result of rotation matrix multiplication on the individual element with row p and column q

a0p;q = 12(ap;paq;q) sin(2 ) + ap;q cos(2 ) = 0

1 / (aq;q ap;p) sin(2 ) = ap;q cos(2 )
2
sin(2 ) / = / 2ap;q
aq;q ap;p
cos(2 )
tan(2 ) = / 2ap;q
aq;q ap;p

Very close eigenvalues ap;p = aq;q will make tan(2 ) ! 1 implying that stability of the method improves with 4 .

8

  1. Jacobi method is not the most computationally e cient because each new rotation destroys

zero result obtained on the previous step. Nonetheless, convergence of the sum of the o - diagonal elements to zero occurs. Given that Jacobi method chooses ap;q to be greater than other o -diagonal elements on average

P / a2
i;j
a2 / i6=j / ; / (4)
n
p;q / n2

2 show that for a matrix n n convergence occurs with the factor of 1 n2n.

Solution: Each rotation reduces the sum of squares of the o -diagonal elements by the

amount 2ap;q2 / X
X
ai;j02 = / ai;j2 2ap;q2: / (5)
i6=j / i6=j
This is possible to demonstrate with a case of symmetric 2 2 matrix A = " / ap;p / ap;q / #.
ap;q / aq;q

Then A0 = PTAP implies a0p;p2 + a0q;q2 = a2p;p + 2a2p;q + a2q;q, where the sum of squares of diagonal elements increased by 2a2p;q (remember 2a0p;q2 = 0 after a rotation).

The rotation deducts the same amount from o -diagonal elements as it adds to diagonal elements, i.e., the rotation does not change L2 norms of column vectors constituting the matrix. Substituting (4) into (5) gives

i=j / i=j / 2 / P / a2
n
a02 / a2 / i6=j / i;j
X / X
i;j / i;j / n2
6 / 6
X / a02 / 1 / 2 / X / a2
n2 n
i=j / i;j / i=j / i;j
6 / 6

The closer convergence factor is to 1 the slower is the numerical method because of the small reduction in the sum of squares occurring on each rotation.

  1. Explore VBA code that implements Jacobi Transformation in Excel PCA le. Names of variables are self-explanatory and linked to the mathematical model, for example, Athis(i,j) for A and Awork(i,j) for A0.

Solution: For the spectral decomposition of the covariance matrix

= V VT

On convergence, matrix A0 becomes a diagonal matrix with eigenvalues, so = A0. In order to recover eigenvectors, matrices Pp;q from each transformation (rotation) should be multiplied, so V = P0 P1 : : : Pm.

9

Note: Jacobi Transformation represents a balance between being tractable and computa-tionally e cient. Power method to calculate eigenvalues by one, starting with the largest, is also simple to present (see Chapter 37.13 in Volume 2 of PWOQF). Other matrix de-composition methods (including non-spectral) can suit the task and work much faster, in particular, see Cholesky decomposition applicable if the matrix is positive de nite.

10