HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
HEATH-JARROW-MORTON MODEL IMPLEMENTATION
AND OPTION PRICES CALCULATION
Fei Wu
Yuning Ye
1|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
CONTENT
1.
Summary .................................................................................................................................. 3
2.
HJM Model .............................................................................................................................. 4
2.1 Introduction ....................................................................................................................... 4
2.2 Model Implementation...................................................................................................... 4
2.3 Parameters Estimation ..................................................................................................... 6
3.
Option Prices Estimation........................................................................................................ 8
3.1 Option Prices Computation .............................................................................................. 8
3.2 Results Analysis ............................................................................................................... 11
3.3 Parameter Adjustments .................................................................................................. 12
3.4 Weights Adjustment ........................................................................................................ 14
4.
Conclusion ............................................................................................................................. 15
5.
Appendix ................................................................................................................................ 17
6.
Reference................................................................................................................................ 18
2|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
1. Summary
Many models can be used to describe interest rates. Short rate model framework
captures the stochastic process of instantaneous rate, while Heath-Jarrow-Morton
(HJM) model describe interest rate curve differently considering forward rates. This
paper mainly discuss Gaussian HJM model. The factor that needs to be determined is
the volatility σ, while the drift term can be fully expressed by σ . We choose
multi-factor exponential decaying model, which only depends on T − t, to express
volatility. Weekly treasury strip bonds prices from the last two years are used. By
means of principle component analysis (PCA), three factor HJM model is used
because it can explain most of the dynamic of forward rates. Functions of volatility
are determined by using non-linear curve fit calibration method. Since Gaussian HJM
model is log normal model, closed form solution of call option price with different
strike price and expired maturity can be derived using log normal option pricing
formula. It turns out that HJM model successfully predicts the interest rate curve and
option prices. The differences of computed prices and empirical prices are acceptable.
Computed prices are more precise when time to maturity is smaller and less precise
when larger. Adjusting parameters by taking partial derivative may not improve the
results, since the weight of volatility functions will change too, causing too many
uncertainties. It is not the parallel shift for the option computed prices when adjusting
the weights. More improvements are shown on prices that have larger error than those
with smaller error.
Key Words: Heath-Jarrow-Morton, Option pricing, Stress test
3|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
2. HJM Model
2.1 Introduction
We denote the bond price at time t with maturity time T as B(t, T). HJM model
describes the bond price using forward rate:
T
B(t, T) = e− ∫t
f(t,v)dv
.
(1)
The forward rate satisfies:
df(t, T) = μ(t, T, f(t, T)) + ∑N
i=1 σi (t, T, f(t, T))dWi (t)
(2)
Wi , i = 1,2 … , N are N dependent Brownian motions and σi are N general functions.
Based on the property of HJM model, drift term can be fully described by volatilities
as below:
T
μ(t, T, f(t, T)) = ∑N
i=1 σi (t, T, f(t, T)) ∫t σi (t, u, f(t, u)) du
(3)
As we can see, σi can be very complicated because of the f(t, T) term. Here Gaussian
HJM model solely depends on time to maturity. So the volatility functions become
σi (t, T, f(t, T)) = σi (T − t)
(4)
Here a specific exponential time decaying model is used:
σi (x) = (αi + βi x)eγi x + δi
(5)
2.2 Model Implementation
There are four parameters for each volatility function σi . In order to determine the
values of these parameters, weekly treasury strips bond prices for the last two years
with various time to maturity are used. The historical data obtained are bond yields.
The formula deriving forward rates using bond yields are shown below:
4|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
f(t i , t i + τj ) ≈
τj+1 Y(ti ,ti +τj+1 )−τj Y(ti ,ti +τj )
τj+1 −τj
(6)
Y(t i , t i + τj+1 ) represents bond yield with starting time t and time to maturity τj+1 .
One of the available calibration methods is principle component analysis (PCA). With
the volatility and drift term, the discrete model can be written as:
f(t j + δ, t j + τk ) − f(t j , t j + τk ) ≈ μ(τk )δ + ∑N
i=1 σi (τk ) (Wi (t j + δ) − Wi (t j ))
(7)
Here j = 1,2 … , J in the past, t1 < t 2 < ⋯ < t J < 0. τk is the time to maturity.
τ1 < τ2 < ⋯ < τK . δ is the time interim equal to one week. t j + δ < t j+1 < 0. The
empirical forward rate changes are calculated as below:
xj,k = f(t j + δ, t j + τk ) − f(t j , t j + τk )
(8)
Since there are L different maturity strip bonds, The X matrix is:
x1,1
[ ⋮
xL,1
⋯
⋱
⋯
x1,K
⋮ ]
xL,K
(9)
L represents L different forward rate changes. Suppose there are 78 weekly historical
prices, L is equal to
78
2
= 39. The K × K X variance and covariance matrix can be.
Since it is semi-definite, using principle component analysis,
Cov(X) = Σ = ADAT
(10)
A is the eigenvectors:
a1,1
A = [a1 , … , aK ] = [ ⋮
aK,1
⋯
⋱
⋯
a1,K
⋮ ]
aK,K
(11)
D is the eigenvalues:
λ1
D=[⋮
0
⋯ 0
⋱ ⋮]
⋯ λK
(12)
λ1 > λ2 > ⋯ > λk , k = 1,2, … , K
5|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
Volatility σi can be estimated by:
σ(τ) =
1
√δ
A√D
(13)
a1,1
σ1 (τ1 ) ⋯ σK (τ1 )
1
⋱
⋮ ]= ×[ ⋮
[ ⋮
√δ
aK,1
σ1 (τK ) ⋯ σK (τK )
⋯
⋱
⋯
a1,K
√λ1
⋮ ]×( ⋮
aK,K
0
⋯
⋱
⋯
0
⋮ )
√λK
(14)
τ=T−t
2.3 Parameters Estimation
Using the historical forward rate data, descending eigenvalues can be calculated and
are shown below:
Figure 1: Ten descending eigenvalues
As we can see, the first three eigenvalues are much larger than the others.
We can also calculate how much contributions each eigenvector makes to the total
variance-covariance matrix:
λ
pk = ∑K k λ
i=1 i
(15)
6|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
Factor 1
0.7272
Factor 2
0.1324
Factor 3
0.0399
Cumulative contribution
0.8995
Chart 1: Factor contribution
Nearly 90% of the total variation can be explained by the first three data, so we adopt
three factors HJM model.
We have already known the volatility function forms and the value, which are the first
three eigenvectors reflecting the three largest eigenvalues. Here non-linear parameters
curve fit method is used to estimate the parameters. Three volatility function fit curves
are shown below:
Figure 2: Fit curve for the first volatility function
Figure 3: Fit curve for the second volatility function
7|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
Figure 4: Fit curve for the third volatility function
After we decide the parameters, in order to make volatility functions more reflect the
empirical situation, weights should be considered. We calibrate the weights using
gradient decent method:
min ∑Ki=1(Σii − ∑Fj=1 ξ2j σ2j )2
(16)
ξ1 ,…,ξF
Here K=11 since there are 11 different time to maturity and F=3 since it is a three
factor model. The result of calibration of parameters and weights are shown below:
α
β
γ
δ
weights
Factor 1
0.002831
0.0001715
-0.02858
0.004708
0.1665
Factor 2
0.0009809
0.0009414
-0.02863
-0.006356
0.01735
Factor 3
-0.0001342
4.592
0.01096
-0.0001342
0.1195
Chart 2: Parameters and weights estimation
Eventually, the closed form solution of volatility will be:
df(t, T − t) = μ(αi , βi , γi , δi ) + ∑3i=1 ξi σ (T − t, αi , βi , γi , δi )dWi (t)
i
(17)
3. Option Prices Estimation
3.1 Option Prices Computation
Since Gaussian HJM model is log normal model, There exists a close form call option
formula. First we should calculate the variance of log bond price. Consider single
8|P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
factor HJM model. Based on the HJM model, bond price can be expressed as:
T
T
t
T
t
B(t, T) = exp(− ∫t f(0, v)dv − ∫t ∫0 σ(u, v)dwu dv − ∫t ∫0 α(u, v)dudv) (18)
So, using Ito Isometry,
T t
T
T t
Var(lnB(t, T)) = Var(− ∫ f(0, v)dv − ∫ ∫ σ(u, v)dwu dv − ∫ ∫ α(u, v)dudv)
t
=
t 0
t 0
T t
Var(∫t ∫0 σ(u, v)dwu dv)
t
T
= Var(∫0 ∫t σ(u, v)dvdwu )
t
T
= ∫0 (∫t σ(u, v)dv)2 du
(19)
Since factors are independent, variance of three factors HJM model with special form
of volatility is:
Var(lnB(t, T))
3
= ∑ ξ2i {
i=1
1
(2αi γ2i (ⅇ γi 𝑡 − ⅇ γi 𝑇 ) (αi (ⅇ γi 𝑡 − ⅇ γi 𝑇 ) + 4γi δi (𝑡 − 𝑇))
4γ5i
+𝛽𝑖2 (ⅇ 2γi 𝑡 (5 − 6γi 𝑡 + 2γ2i 𝑡 2 ) + ⅇ 2γ𝑇 (5 − 6γi 𝑇 + 2γ2i 𝑇 2 )
+ⅇ γi (𝑡+𝑇) (−10 − 4γ2i 𝑡𝑇 + 6γi (𝑡 + 𝑇))) − 2βi γi (−4γi δi (𝑡 − 𝑇)(ⅇ γi 𝑡 (−2 + γi 𝑡)
+ⅇ γi 𝑇 (2 − γi 𝑇)) + αi (ⅇ γi 𝑡 − ⅇ γi 𝑇 )(ⅇ γi 𝑡 (3 − 2γi 𝑡)
+ⅇ γi 𝑇 (−3 + 2γi 𝑇))) + ⅇ −2γi 𝑡 (−𝛽𝑖2 (5ⅇ 2γi 𝑡 − 2ⅇ γi (𝑡+𝑇) (5 + 3γi (𝑡 − 𝑇))
+ⅇ 2γi 𝑇 (5 + 6γi (𝑡 − 𝑇) + 2γ2i (𝑡 − 𝑇)2 )) − 2γ2i (α2𝑖 (ⅇ γi 𝑡 − ⅇ γi 𝑇 )2
+4αi γi 𝛿𝑖 (ⅇ 2γi 𝑡 − ⅇ γi (𝑡+𝑇) )(𝑡 − 𝑇) − 2𝛾𝑖3 𝛿𝑖2 ⅇ 2γi 𝑡 𝑡(𝑡 − 𝑇)2 )
+2βi γi (−4γi 𝛿𝑖 ⅇ γi 𝑡 (−2ⅇ γi 𝑡 + ⅇ γi 𝑇 (2 + γi (𝑡 − 𝑇))) (𝑡 − 𝑇)
+αi (ⅇ γi 𝑡 − ⅇ γi 𝑇 )(3ⅇ γi 𝑡 + ⅇ γi 𝑇 (−3 − 2γi 𝑡 + 2γi 𝑇)))))}
(20)
Call option price can be calculated using the formula below:
F 1
ln + λ21
K 2
F0 = B(0, T)(FΦ (
9|P a g e
λ1
F 1
ln − λ21
K 2
) − KΦ (
λ1
))
(21)
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
F=
B(0,T)
(22)
B(0,S)
With different time to maturity and option expired date, variance of the log bond price
can be calculated, which is the volatility λ12 .
We obtain 27 option prices with different bond time to maturity, option expire date
and strike prices. Bond data and option data used is in the appendix. Results are
shown below. They are grouped based on bond time to maturity.
When T=4,
S
1
2
3
T=4
0.92
0.94
0.96
0.92
0.94
0.96
0.92
0.94
0.96
Empirical
0.0303
0.0145
0.0038
0.0385
0.0220
0.0086
0.0527
0.0344
0.0175
Computed
0.0274
0.0076
0.0000
0.0335
0.0137
0.0002
0.0510
0.0315
0.0120
Absolute diff
0.0029
0.0069
0.0038
0.0050
0.0083
0.0084
0.0017
0.0029
0.0055
Relative diff
9.49%
47.78%
99.91%
12.99%
37.94%
97.56%
3.23%
8.46%
31.34%
Chart 3: Empirical Prices and Computed Prices when time to maturity is 4
Figure 5: Empirical Prices and Computed Prices when time to maturity is 4
When T=5,
S
1
2
3
T=5
0.92
0.94
0.96
0.92
0.94
0.96
0.92
10 | P a g e
Empirical
0.0316
0.0169
0.0064
0.0407
0.0254
0.0130
0.0545
Computed
0.0259
0.0066
0.0000
0.0318
0.0120
0.0005
0.0487
Absolute diff
0.0057
0.0103
0.0063
0.0090
0.0134
0.0125
0.0058
Relative diff
18.14%
60.87%
99.71%
22.01%
52.83%
96.48%
10.66%
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
0.94
0.96
0.0377
0.0226
0.0292
0.0098
0.0085
0.0128
22.52%
56.52%
Chart 4: Empirical Prices and Computed Prices when time to maturity is 5
Figure 6: Empirical Prices and Computed Prices when time to maturity is 5
When T=6,
S
1
2
3
T=6
0.92
0.94
0.96
0.92
0.94
0.96
0.92
0.94
0.96
Empirical
0.0305
0.0170
0.0073
0.0404
0.0262
0.0147
0.0539
0.0385
0.0248
Computed
0.0220
0.0046
0.0000
0.0277
0.0089
0.0004
0.0440
0.0246
0.0066
Absolute diff
0.0085
0.0124
0.0073
0.0127
0.0174
0.0144
0.0099
0.0139
0.0181
Relative diff
27.76%
72.95%
99.81%
31.47%
66.19%
97.56%
18.40%
36.20%
73.25%
Chart 6: Empirical Prices and Computed Prices when time to maturity is 6
Figure 7: Empirical Prices and Computed Prices when time to maturity is 6
3.2 Results Analysis
11 | P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
HJM model successfully predicts the trend of call option prices. All the computed
prices are slightly smaller than the empirical prices. We figure out two ways to
evaluate HJM option calculation method performance. One is absolute difference
(error) and the other one is relative difference:
absolute difference = |computed price − empirical price|
(23)
relative difference =
|computed price−empirical price|
empirical price
(24)
For each option expire date, with the same bond time to maturity, relative difference
of the out of the money options is the smallest, while those of in the money options
largest. One possible explanation is that the empirical price itself is so small that even
a small error can cause big relative difference. The variable is too sensitive. Moreover,
it is not the case when considering absolute difference.
We compare the average of absolute differences according to the option expire date.
The results are shown below:
Average Error
0.02
0.015
T=4
0.01
T=5
0.005
T=6
0
S=1
S=2
S=3
Figure 8: Average error comparison
It indicates that the average error becomes larger when bond time to maturity is larger.
Computed prices become less precise when time to maturity is large.
3.3 Parameter Adjustments
Three factors HJM model are solely determined by the σ function. Parameters of
volatility function are derived using curve fitting method, which may not be precise
12 | P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
enough because of outliers and lack of sample. We try to adjust some of the
parameters to see any improvements of the results. Since the first volatility function
explains most of the dynamic of variables and parameter γi decides the shape of the
curve in some degree, we assume σ1 is γi function with other parameters known.
Partial derivative of γ1 is calculated, which means the changing rate of γ1 . Then the
value of changing rate is added to the previous calculated value:
σ1 (x) = (α1 + β1 x)eγ1 x + δ1
(25)
γ1′ = γ1 + σ′i (γ1 )
(26)
Here γ1′ is the adjusted value and γ1 is the previously computed value. Different
values of σ′i (γ1 ) are calculated based on different x. We take the average of it and
compute the option price using adjusting parameters.
However, little improvements are shown according to the new results. One of the
possible explanations is that the change of parameter also changes the weight of
volatility function. There are too many unknown affects. We consider the weights as
an ‘auto-fix tool’, which is able to make adjustments for the best fit of forward rate.
Original Weights
0.16651026
0.01735055
-0.1194973
New Weights
0.16417919
0.01716983
-0.1178429
Chart 5: Weights changes
Though the parameters are very insensitive with volatility, we can still compare the
sensitivity of different parameters. The first four parameters of the first volatility
function are analyzed. We make adjustments by increasing 20% and decreasing 20%
for each parameter respectively. The improvements are shown below:
13 | P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
Average Improvement
0.000009
0.000008
0.000007
0.000006
0.000005
0.000004
0.000003
0.000002
0.000001
0
1st
1st
2nd
2nd
3rd
3rd
4th
4th
increase decrease increase decrease increase decrease increase decrease
20%
20%
20%
20%
20%
20%
20%
20%
Figure 9: Average Improvement
Here the improvement is the absolute value of difference of error. It turns out that the fourth
parameter has less influence on the volatility and the influence is not parallel.
3.4 Weights Adjustment
There are errors existing among parameters of volatility functions and weights. We
conduct stress test to examine the sensitivity of option prices change by adjusting the
weights directly within the acceptable range. Here we only consider absolute
difference (error). The results are shown below with 20% increase of weights:
Weights increase 20%
0.06
0.05
0.04
0.03
0.02
0.01
0
0.006
Original Computed Price
0.004
Original Error
0.002
Adjusted Error
0
1
3
5
7
Improvement
9 11 13 15 17 19 21 23 25 27
Figure 10: Option prices change with weights increasing by 20%
The purple line above represents the differences of original error and the adjusted
error. Based on the results, there are larger improvements on the computed prices that
are closed to zero, which is positive sign because those prices are less precise.
We discuss another situation when weights increase 100%. The results are shown
below:
14 | P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
Weights increase by 100%
0.06
0.05
0.04
Original Computed Price
0.03
Original Error
0.02
Adjusted Error
Improvement
0.01
0
1
3
5
7
9 11 13 15 17 19 21 23 25 27
Figure 11: Option prices change with weights increasing by 100%
We put the errors of original situation and adjusted situation together:
Error Comparison
0.02
0.015
Original Error
0.01
Adjusted Error(20%)
Adjusted Error(100%)
0.005
0
1
3
5
7
9
11 13 15 17 19 21 23 25 27
Figure 12: Error comparison among original error and two adjusted situation
It proves that it is not the parallel shift of computed price when adjusting the weights,
or saying option volatility instead. When the error is small, which means the original
computed price is very close to empirical price, the improvement is little. On the other
hand, when the original error is large, the improvement tends to be larger.
4. Conclusion
This HJM model with a special form of exponential time decaying formula of
volatility provides a closed form solution to pricing the options, which is
straight-forward, compared with simulation method. It performs well on the
prediction of call option prices with various strike prices, time to maturities and
option expired dates. Most of the differences are small and relative differences are
15 | P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
within 60%. HJM model is able to make more precise prediction when the option is in
the money and less precise when out of the money.
Computed price of in the money option is an important factor to check whether a
certain model performs well or not. Feasible solutions of improving the performance
of HJM model exists. Sample size used to estimate parameters may be too small.
Larger sample size can increase the significant level and decrease the negative impact
of outliers. Previously we show no sign of improvements when changing one
parameter at the time. However, it is possible that it can perform better if changing
multi parameters at a time based on other methods other than computation of
derivative method. Computed option prices improve by adjusting weights directly.
However, there is little improvement for low error compute prices. The confidence
intervals of weights are also unknown. It may performs even better when adjusting
each weight respectively instead of adding the same value altogether.
16 | P a g e
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
5. Appendix
17 | P a g e
K(strike)
S(future)
T(bond)
BT
Call
Price(benchmark)
0.92
1
4
0.9459
0.0303
0.94
1
4
0.9459
0.0145
0.96
1
4
0.9459
0.0038
0.92
2
4
0.9459
0.0385
0.94
2
4
0.9459
0.0220
0.96
2
4
0.9459
0.0086
0.92
3
4
0.9459
0.0527
0.94
3
4
0.9459
0.0344
0.96
3
4
0.9459
0.0175
0.89
1
5
0.9145
0.0316
0.91
1
5
0.9145
0.0169
0.93
1
5
0.9145
0.0064
0.89
2
5
0.9145
0.0407
0.91
2
5
0.9145
0.0254
0.93
2
5
0.9145
0.0130
0.89
3
5
0.9145
0.0545
0.91
3
5
0.9145
0.0377
0.93
3
5
0.9145
0.0226
0.86
1
6
0.8806
0.0305
0.88
1
6
0.8806
0.0170
0.9
1
6
0.8806
0.0073
0.86
2
6
0.8806
0.0404
0.88
2
6
0.8806
0.0262
HJM MODEL IMPELMENTATION GROUP 5 YUNING YE FEI WU
0.9
2
6
0.8806
0.0147
0.86
3
6
0.8806
0.0539
0.88
3
6
0.8806
0.0385
0.9
3
6
0.8806
0.0248
Chart 6: Bond information
Maturity
1
2
3
4
5
6
0.0016
0.0041
0.0092
0.0138
0.0174
0.0208
Price
0.9984
0.9918
0.9728
0.9464
0.9166
0.8825
Maturity
7
8
9
10
15
20
0.0236
0.0260
0.0278
0.0293
0.0346
0.0368
0.8475
0.8119
0.7789
0.7462
0.5956
0.4790
3/21/2014
3/21/2014
Price
Chart 7: Option Information
6. Reference
[1] Ali Tolga Koken, 2010, “IMPLEMENTATION OF THE
HEATH-JARROW-MORTON MODEL ON THE TURKISH GOVERNMENT
ZERO-COUPON BONDS,” Bogazici University.
[2] Roberto Reno, Adamo Uboldi, 2001, PCA BASED CALIBRATION OF AN HJM
MODEL
[3] Steven E. Shreve, Stochastic Calculus for Finance Continuous-Time Models
18 | P a g e
© Copyright 2026 Paperzz