0% found this document useful (0 votes)
41 views30 pages

Lecture 03-The HJM Framework

Uploaded by

raccoonpesfifa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views30 pages

Lecture 03-The HJM Framework

Uploaded by

raccoonpesfifa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Materials for the course

The course is based on book “Mathematical Modeling and Computation


in Finance: With Exercises and Python and MATLAB Computer Codes”,
by C.W. Oosterlee and L.A. Grzelak, World Scientific Publishing Europe
Ltd, 2019. For more details go here.

I Youtube Channel with courses can be found here.


I Slides and the codes can be found here.
Lech A. Grzelak Financial Engineering- Interest Rates and xVA 1 / 30
List of content

3.1. Equilibrium vs. Term-Structure Models


3.2. The HJM Framework
3.3. The Instantaneous Forward Rate
3.4. Arbitrage Free Conditions under HJM
3.5. Ho-Lee Model and Python Simulation
3.6. Hull-White Model
3.7. Hull-White Model and Simulation in Python
3.8. Summary of the Lecture + Homework

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 2 / 30


Equilibrium vs. Term-Structure Models

Equilibrium vs. Term-Structure Models

I A no-arbitrage model is a model designed to be consistent with


today’s term structure of interest rates.
I The difference between equilibrium (endogenous) and non-arbitrage
models (exogenous) is that today’s term structure of interest rates is
an output in an equilibrium model.
I In a no-arbitrage model, today’s term structure of interest rates is an
input. This means that we take the observed actual rates while
constructing the model and estimate the unobserved rates.
I The HJM framework described a clear path from the equilibrium
towards term-structure models.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 3 / 30


Equilibrium vs. Term-Structure Models

Equilibrium vs. Term-Structure Models1

I Historically, equilibrium models start with assumptions about


economic variables and derive a process for the short rate, which
means that the current term structure of interest rates hence is an
output rather than input in the model.
I Such models are also called endogenous term-structure models. The
(instantaneous) short rate at time t is the rate that applies to an
infinitesimally short period at time t.
I Some popular equilibrium models. Namely, the Vasicek:

dr (t) = λ (θ − r (t)) dt + ηdW (t),

and the Cox, Ingersoll and Ross (CIR) model:


p
dr (t) = λ (θ − r (t)) dt + γ r (t)dW (t).

I These models are one-factor models, which have several shortcomings,


e.g., the interest rates are perfectly correlated between different maturities.
1 Great overview of the short-rate model can be found in book of Brigo-Mercurio:

Interest Rate Models- Theory and Practice.


Lech A. Grzelak Financial Engineering- Interest Rates and xVA 4 / 30
Equilibrium vs. Term-Structure Models

Equilibrium vs. Term-Structure Models

0.4 1.4

0.3 1.2

0.2 1

0.1 0.8

0 0.6
r(t)

r(t)
-0.1 0.4

-0.2 0.2

-0.3 0

-0.4 -0.2

-0.5 -0.4

-0.6 -0.6
0 10 20 30 40 50 0 10 20 30 40 50
time time

Figure: Within the Vasicek Model model context, the impact of variation of
mean-reversion λ, and of the volatility parameter η on the Monte Carlo paths.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 5 / 30


Equilibrium vs. Term-Structure Models

Equilibrium vs. Term-Structure Models

0.18 0.4

0.16 0.35

0.14
0.3

0.12
0.25
0.1
r(t)

r(t)
0.2
0.08
0.15
0.06

0.1
0.04

0.02 0.05

0 0
0 10 20 30 40 50 0 10 20 30 40 50
time time

Figure: For the CIR model, the impact of variation of mean-reversion λ, and of
the volatility parameter γ on the Monte Carlo paths.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 6 / 30


The HJM Framework

The HJM framework

I The Heath-Jarrow-Morton framework represents a class of models


that are derived by directly modeling the dynamics of instantaneous
forward-rates.
I The framework constitutes the fundament for interest rate models as
it provides an explicit relation between the volatility of the
instantaneous forward rates and arbitrate-free drift.
I Both the standard short-rate and Libor Market models can be
derived in the HJM framework however, in general.
I The HJM models are non-Markovian so only a number of models
with a closed-form solution exists.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 7 / 30


The HJM Framework

The HJM framework

I 1. Equilibrium models.
I 2. Short-rate models in the HJM Framework.
I 3. Market Models models in the HJM Framework.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 8 / 30


The Instantaneous Forward Rate

Instantaneous Forward Rate

Definition (Forward and instantaneous forward rates)


Suppose that at time t we enter into a forward contract to deliver at
time S a bond that will mature at time T . Let the forward price of the
bond be denoted by P(t, S, T ). At the same time, a zero-coupon bond,
P(t, S), that matures at time S is purchased. Further, a bond, P(t, T ),
that matures at time T is also bought. Assuming no-arbitrate and
market completeness the following equality has to hold:

P(t, T ) = P(t, S)P(t, S, T ).

Now, we define the implied forward rate, R(t, S, T ), at time t for the
period [S, T ] as:

P(t, S, T ) = exp (−(T − S)R(t, S, T )) .

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 9 / 30


The Instantaneous Forward Rate

Instantaneous Forward Rate

Definition (Forward and instantaneous forward rates cont.)


By equating the two equations we find:

P(t, T )
e−(T −S)R(t,S,T ) = ,
P(t, S)

which reads the forward rate R(t, S, T ) to be given by:

log P(t, T ) − log P(t, S)


R(t, S, T ) = − .
T −S
By setting the limit T − S → 0 we arrive at the definition of the
instantaneous forward rate

def ∂
f (t, T ) = lim R(t, S, T ) = − log P(t, T ).
S→T ∂T

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 10 / 30


The Instantaneous Forward Rate

Instantaneous Forward Rate

I In the HJM framework the dynamics of the instantaneous forward


rates,f (t, T ), is analyzed.
I We start with an assumption that for a certain, fixed, maturity
T ≥ 0, the instantaneous forward rate f (t, T ) under real-world
measure P is driven by the following dynamics:

df (t, T ) = αP (t, T )dt + σ(t, T )dW P (t), f (0, T ) = f0 (T ),

for any time t < T , with a corresponding drift αP (t, T ).


I Under this model we also define a money-savings account as:
Z t  Z t 
M(t) = exp r (s)ds ≡ exp f (s, s)ds .
0 0

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 11 / 30


Arbitrage Free Conditions under HJM

Arbitrage-free HJM

I As we see, under the HJM framework the short rate r (t), is defined
as the limit of the instantaneous forward rate r (t) ≡ f (t, t). The
zero-coupon bond, P(t, T ), with maturity T , follows:
 
1
P(t, T ) = M(t)EQ · 1 F(t)
M(T )
" ! #
Z T
= EQ exp − r (s)ds · 1 F(t) .
t

I What are the tradables in this market and what quantities are the
martingales ?
I How to find αQ (t, T ) in

df (t, T ) = αQ (t, T )dt + σ(t, T )dW Q (t), f (0, T ) = f0 (T ), ?

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 12 / 30


Arbitrage Free Conditions under HJM

Arbitrage-free HJM cont.

I Although the ZCB P(t, T ) can be priced as an expectation its value


can be directly related to today’s yield curve via:

f (t, T ) = − log P(t, T ).
∂T
I From above we can easily determine the following relation:
!
Z T
P(t, T ) = exp − f (t, s)ds ,
t

I Let us start with deriving the dynamics of discounted ZCB:


  " Z T Z t !#
P(t, T ) def
d = d exp − f (t, s)ds − r (s)ds = dZ (t).
M(t) t 0

I After a lot of derivations for dZ (t) and setting the drift to zero we
find.
Lech A. Grzelak Financial Engineering- Interest Rates and xVA 13 / 30
Arbitrage Free Conditions under HJM

Arbitrage-free HJM cont.

Lemma (HJM no arbitrage drift condition)


For the instantaneous forward rates given by following SDE:

df (t, T ) = αQ (t, T )dt + σ(t, T )dW Q (t),

the no-arbitrage drift condition is given by


Z T
αQ (t, T ) = σ(t, T ) σ(t, s)ds.
t

Proof.
The proof easily follows by deriving the dynamics of Z (t) and equating
all the drift terms to zero.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 14 / 30


Arbitrage Free Conditions under HJM

Short-Rate dynamics under HJM


I By using the relation that f (t, t) = r (t) and by integrating the
SDEs we obtain the short rate dynamics under the HJM framework
of the form:
Z t Z t
f (t, T ) = f (0, T ) + αQ (s, T )ds + σ(s, T )dW Q (s),
0 0
which for time T = t simply becomes:
Z t Z t
r (t) ≡ f (t, t) = f (0, t) + αQ (s, t)ds + σ(s, t)dW Q (s),
0 0

I Now by applying Leibniz integral rule 2 we obtain following short rate


dynamics:
 Z t
∂ ∂ Q
dr (t) = f (0, t) + αQ (t, t) + α (s, t)ds
∂t 0 ∂t
Z t 

+ σ(s, t)dW Q (s) dt + σ(t, t)dW Q (t).
0 ∂t
2

d
Z b(α) ∂ ∂
Z b(α) ∂
f (x, α)dx = f (b, α) b(α) − f (a, α) a(α) + f (x, α)dx
dα a(α) ∂α ∂α a(α) ∂α
Lech A. Grzelak Financial Engineering- Interest Rates and xVA 15 / 30
Ho-Lee Model and Python Simulation

Ho-Lee Model
I We specify a certain form of a volatility σ(t, T ) for the
instantaneous forward rate f (t, T ) and determine the resulting
short-rate dynamics. The first, and the simplest possibility is to
consider σ(t, T ) to be constant, i.e.:

σ(t, T ) = σ.

I From previous derivations we find:


Z T
Q
α (t, T ) = σ σds = σ 2 (T − t).
t

I This can be used in Equation for the short-rate dynamics, i.e.:


 Z t
∂ ∂ Q
dr (t) = f (0, t) + αQ (t, t) + α (s, t)ds
∂t 0 ∂t
Z t 

+ σ(s, t)dW Q (s) dt + σ(t, t)dW Q (t).
0 ∂t

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 16 / 30


Ho-Lee Model and Python Simulation

Ho-Lee Model

I Therefore the short-rate dynamics under the HJM model with


σ(t, T ) = σ is given by:
 

dr (t) = f (0, t) + σ 2 t dt + σdW Q (t).
∂t


I By setting θ(t) = f (0, t) + σ 2 t, we arrive at:
∂t
dr (t) = θ(t)dt + σdW Q (t),

which is well-recognized as the Ho-Lee short-rate model.


I Now we can compute ZCBs P(t, T ) using this model
h RT i
P(t, T ) = E e− t r (s)ds F(t) = eA(t,T )+B(t,T )r (t) .

I Functions A(t, T ) and B(t, T ) will be presented later.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 17 / 30


Ho-Lee Model and Python Simulation

Ho-Lee Model: Python Exercise


Python Exercise:
I Define Pmrkt (t, T ) = exp(−r (T − t)) (it can be much more involved
or implied from the market), for some r , calculate f (t, T ) and use it
for simulating r (t).
I Consider the Ho-Lee model with a freely chosen parameter σ.
I It is important to properly choose the initial value for the process
r (t):

∂ log Pmrkt (0, )


r (0) = f (0, 0) ≈ − , for  → 0.
∂
I Using Monte Carlo Paths calculate
h RT i
Pmodel (t, T ) = EQ e− t r (s)ds F(t) .

I Are Pmrkt (0, T ) and Pmodel (0, T ) the same for all T ?

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 18 / 30


Ho-Lee Model and Python Simulation

Ho-Lee Model: Python Exercise

Figure: Comparison of the ZCBs from the Ho-Lee model vs. Market P(0, T )
for different T .

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 19 / 30


Hull-White Model

Hull-White Model
I Let us now consider a short-rate model generated by the HJM
volatility given by:

σ(t, T ) = σ · e−λ(T −t) with λ > 0.

As before, the short-rate dynamics under HJM arbitrage free


assumptions is given by:
 Z t
∂ Q ∂ Q
dr (t) = f (0, t) + α (t, t) + α (s, t)ds
∂t 0 ∂t
Z t 

+ σ(s, t)dW (s) dt + σ(t, t)dW Q (t).
Q
0 ∂t

I By Lemma we find:
t
σ 2 −λ(t−s)  −λ(t−s)
Z 
αQ (s, t) = σe−λ(t−s) σe−λ(u−t) du = − e e −1 ,
s λ
which implies that αQ (t, t) = 0.
Lech A. Grzelak Financial Engineering- Interest Rates and xVA 20 / 30
Hull-White Model

Hull-White Model

I The remaining terms are as follows:


Z t
∂ Q σ 2 −2λt λt
α (s, t)ds = e (e − 1),
0 ∂t λ

and

σ(s, t) = −λσe−λ(t−s) = −λσ(s, t),
∂t
with σ(t, t) = σ.
I The dynamics for r (t) is therefore given by:
Z t Z t
∂ ∂ Q
dr (t) = f (0, t)+ α (s, t)ds−λ σ(s, t)dW Q (s) +σdW Q (t).
∂t 0 ∂t 0

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 21 / 30


Hull-White Model

Hull-White Model
I We see that Brownian motion dW Q (t) is present in two terms. In
Rt
order to find explicitly the solution for the integral 0 σ(s, t)dW Q (s)
we can use definition of the short-rate which yields:
Z t Z t
r (t) = f (0, t) + αQ (s, t)ds + σ(s, t)dW Q (s),
0 0

therefore the first integral can be determined via:


Z t Z t
σ(s, t)dW Q (s) = r (t) − f (0, t) − αQ (s, t)ds.
0 0

As:
t
σ 2 −2λt λt
Z
2
αQ (s, t)ds =
2
e e −1 ,
0 2λ
we obtain the following dynamics for process r (t):

σ2 
 
1 ∂ 
dr (t) = λ f (0, t) + f (0, t) + 2 1 − e−2λt − r (t) dt + σdW Q (t).
λ ∂t 2λ

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 22 / 30


Hull-White Model

Hull-White Model

I So finally, by taking:

1 ∂ σ2
f (0, t) + f (0, t) + 2 1 − e−2λt ,

θ(t) =
λ ∂t 2λ
the dynamics of the process r (t) yields:

dr (t) = λ(θ(t) − r (t))dt + σdW Q (t),

which can be easily recognized as the Hull-White short rate process.


I It is important to properly choose the initial value for the process
r (t):

∂ log P(0, )
r (0) = f (0, 0) ≈ − , for  → 0.
∂

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 23 / 30


Hull-White Model

Simulation of the Hull-White Model

0.4 1.4

0.3 1.2

0.2 1

0.1 0.8

0 0.6
r(t)

r(t)
-0.1 0.4

-0.2 0.2

-0.3 0

-0.4 -0.2

-0.5 -0.4

-0.6 -0.6
0 10 20 30 40 50 0 10 20 30 40 50
time time

Figure: Within the HW model context, the impact of variation of


mean-reversion λ, and of the volatility parameter η on the Monte Carlo paths.

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 24 / 30


Hull-White Model and Simulation in Python

Hull-White Model: Python Exercise


Python Exercise:
I Define Pmrkt (t, T ) = exp(−r (T − t)) (it can be much more involved
or implied from the market), for some r , calculate f (t, T ) and use it
for simulating r (t).
I Consider the Hull-White model with a freely chosen parameters λ
and σ.
I It is important to properly choose the initial value for the process
r (t):

∂ log Pmrkt (0, )


r (0) = f (0, 0) ≈ − , for  → 0.
∂
I Using Monte Carlo Paths calculate
h RT i
Pmodel (t, T ) = EQ e− t r (s)ds F(t) .

I Are Pmrkt (0, T ) and Pmodel (0, T ) the same for all T ?

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 25 / 30


Hull-White Model and Simulation in Python

Hull-White Model: Python Exercise

Figure: Comparison of the ZCBs from the Hull-White model vs. Market
P(0, T ) for different T .

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 26 / 30


Summary of the Lecture + Homework

Summary

I Equilibrium vs. Term-Structure Models


I The HJM Framework
I Arbitrage Free Conditions under HJM
I Ho-Lee Model and Python Simulation
I Hull-White Model
I Hull-White Model and Simulation in Python
I Summary of the Lecture + Homework

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 27 / 30


Summary of the Lecture + Homework

Homework Exercises
The solutions for the homework can be find at
https://github.com/LechGrzelak/QuantFinanceBook
I Exercise
Consider the “exponential-Vasicek” model given by the following
system of equations:

r (t) = ey (t) ,
dy (t) = (θ − ay (t))dt + σdW (t) y (t0 ) = y0 .

I Show that the dynamics for r (t) yields:

σ2
 
dr (t) = r (t) θ + − a log r (t) dt + σr (t)dW (t).
2
I Show that
θ σ2
lim E[r (t)] = e a + 4a .
t→∞

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 28 / 30


Summary of the Lecture + Homework

Summary of the Lecture + Homework


I Exercise 11.9
Consider the Vašiček short-rate model,
dr (t) = λ (θ − r (t)) dt + ηdW (t),
with parameters λ = 0.05, θ = 0.02 and η = 0.1 and initial rate
r (t0 ) = 0. At time t0 , we wish to hedge a position in a 10y
zero-coupon bond, P(t0 , 10y ), using two other bonds, P(t0 , 1y ) and
P(t0 , 20y ).
a. Determine two weights, ω1 and ω2 , such that ω1 + ω2 = 1 and
ω1 P(t0 , 1y ) + ω2 P(t0 , 20y ) = P(t0 , 10y ).
b. Perform a minimum variance hedge and determine the weights ω1
and ω2 , such that
Z 10y  Z 10y 
Var ω1 P(t, 1y ) + ω2 P(t, 20y )dt = Var P(t, 10y )dt ,
0 0

while ω1 + ω2 = 1. What can be said about this type of hedge


compared to the point addressed?
c. Change the measure, to the T = 10y -forward measure, and, for the
given weights determined earlier, check whether the variance of the
estimator increases.
Lech A. Grzelak Financial Engineering- Interest Rates and xVA 29 / 30
Summary of the Lecture + Homework

Summary of the Lecture + Homework

I Exercise
I The “exponential-Vasicek” model does not allow for negative
interest rates. In order to “fix” that problem we introduce a
so-called shift parameter ζ,

r˜(t) = r (t) − ζ, ζ ∈ R+ .

I Find the dynamics for r˜(t), simulate Monte Carlo paths and
compare to r (t).
I Discuss the impact of shift on ZCBs, P(t0 , T ).

Lech A. Grzelak Financial Engineering- Interest Rates and xVA 30 / 30

You might also like