You are on page 1of 4

IMPORTANT INSTALLATION INFORMATION

The SOLVER macros in this workbook will only run if your Excel is set up
as follows.

You must have SOLVER installed with your Excel.


Go to Tools Menu and see whether item Solver appears there.
If it does not, go to Tools - Add-ins and tick "Solver Add-in".

This 1st step will allow you to use SOLVER from Excel but because SOLVER is
also called by a VBA macro, you will also need to establish a reference to the
Solver add-in in the VBA editor:
With a Visual Basic module active, click References on the Tools menu, and
then select the Solver.xla check box under Available References. If Solver.xla
doesn't appear under Available References, click Browse and open Solver.xla in
the \Office\Library subfolder.

Programmed by and copyright Kurt Hess March 2004, kurthess@waikato.ac.nz

Illustration of Extended Nelson & Siegel Spot Rate Model

Fitting Extended Nelson & Siegel Spot Rate with Solver

Kurt Hess, kurthess@waikato.ac.nz 345097260.xls Introduction 02/10/2017


Illustration of Extended Nelson & Siegel Spot Rate Model
programmed by Kurt Hess May 2004, kurthess@waikato.ac.nz
Time to maturity m 3.0 30.00

Long-run levels of interest rates 0 5.0% 50


Short-run component 1 2.0% 120
Medium-term component 2 8.0% 80 determines magnitude and the direction of the hump

Decay parameter 1 1 1.000 100 determines decay of short-term component, must be > 0

Decay parameter 2 2 1.200 120 determines decay of medium-term component, must be > 0

Spot rate at time t rt,i 7.9141%


#VALUE! with VBA Function
Components of N&S spot rate
Comp 1 5.000% 0
Comp 2 0.633% 1*((1-EXP(-m/tau1))/(m/tau1))
Comp 3 2.281% 2*((1-EXP(-m/tau2))/(m/tau2)-EXP(-m/tau2))

0.1 9.000%
0.09 8.000%
0.08 7.91% 7.000%
0.07
6.000%
0.06
5.000%
0.05
0.04 4.000%
0.03 3.000%
0.02 2.000%
0.01 1.000%
0 0.000%
0 2 4 6 8 10 12 0 2 4 6 8 10 12

( ) (
m
( )

)
1e 1
1 e
( m

2 ) (m ) 2

rt , j ( m , ) = 0+ 1 + 2 e + t , j
m m
1 2
with t , j ~ N ( 0, 2 )
=( 0 , 1 , 2 , 1 , 2 )

Kurt Hess, Waikato Management School Page 2 345097260.xls Extended Nelson Siegel 02/10/2017
Fitting Extended Nelson & Siegel Spot Rate with Solver programmed by Kurt Hess May 2004, kurthess@waikato.ac.nz
Time to maturity m 3.0 30 Before using the minimization macros, you must establish a reference to the
Solver add-in. With a Visual Basic module active, click References on the Tools
menu, and then select the Solver.xla check box under Available References. If
Long-run levels of interest rates 0 7.30% 73.02474 Solver.xla doesn't appear under Available References, click Browse and open
Solver.xla in the \Office\Library subfolder.
Short-run component 1 -2.90% 71
Medium-term component 2 -1.40% -14.01742 determines magnitude and the direction of the hump
Decay parameter 1 1 0.412 41.19045 determines decay of short-term component, must be > 0
Decay parameter 2 2 2.905 290.466 determines decay of medium-term component, must be > 0
Spot rate at time t rt,i 6.5296%
0.09 N&S Zero Rate 1.2 N&S Discount Factors
0.08
Objective Functions see formulas 0.07
1
Non-weighted objective function x103 #VALUE! Minimize 6.53%
0.82211
0.06 0.8
Inverse duration weighted function x 105 #VALUE! Minimize 0.05
0.6
0.04
Initial Guess Values: Step 0.03 0.4

Default Values Set Random Values through 0.02


0.2
optimization 0.01
Bond Data 0 0
Short-term rate 4.50% 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Settlement date 14-Feb-99
Model
Issuer Coupon Maturity Bid Ask Mid Clean Mid Dirty Price Duration Weights (wi) (cheap) / rich
NZ Government 6.50% 15-Feb-00 100.563 100.583 100.57% #VALUE! #VALUE! 0.956271 0.361346082 #VALUE!
NZ Government 8.00% 15-Feb-01 102.786 102.854 102.82% #VALUE! #VALUE! 1.821322 0.1897219789 #VALUE!
NZ Government 10.00% 15-Mar-02 108.406 108.526 108.47% #VALUE! #VALUE! 2.647526 0.130516077 #VALUE!
NZ Government 5.50% 15-Apr-03 96.673 96.827 96.75% #VALUE! #VALUE! 3.706899 0.0932166559 #VALUE!
NZ Government 8.00% 15-Apr-04 105.034 105.234 105.13% #VALUE! #VALUE! 4.253648 0.0812349081 #VALUE!
NZ Government 8.00% 15-Nov-06 106.518 106.809 106.66% #VALUE! #VALUE! 5.884208 0.0587240893 #VALUE!
NZ Government 7.00% 15-Jul-09 100.549 100.903 100.73% #VALUE! #VALUE! 7.537708 0.0458421506 #VALUE!
NZ Government 6.00% 15-Nov-11 91.666 92.049 91.86% #VALUE! #VALUE! 8.770603 0.0393980581 #VALUE!

Total 1

Kurt Hess, Waikato Management School Page 3 345097260.xls Fitting Bond Universe 02/10/2017
Formula Objective Function back to top Extended Nelson Siegel Model (parameters explained on top)

( ) (
N m
( )
)
( )
( )
D: Duration m
2
min ( wi i ) Pi: Price of bond i 1 e
1
1e

2 (m )
2

i=1 ^Pi: Model price of bond i r j ( m , )= 0 + 1 + 2 e


1 / Di N: number of bonds in universe
m m
w i= N
1 2
j=1 1 / D j with t , j ~ N ( 0, )
2
^ P
i = P i
Subject to:
i = ( 0 , 1 , 2 , 1 , 2 )
Rate r at time 0 must remain positive (mmin is a value just slightly larger than 0)
0r ( mmin)
0r ( m= ) Rate at the end of the estimation horizon must remain positive
exp (r ( m k ) m k )exp (r ( m k +1 ) mk +1 ) mk <m max Discount functions must be non-increasing

References:
Nelson, C. R. & Siegel, A. F. (1987). Parsimonious modeling of yield curves, Journal of Business 60(4): 473489.
as discussed in
Bliss, R. R. (1997). Testing Term Structure Estimation Methods. Advances in Futures and Options Research(9), 197-
231.

Kurt Hess, Waikato Management School Page 4 345097260.xls Fitting Bond Universe 02/10/2017

You might also like