I am calculating the theoretical discount factors associated with a bond that has 30 months to maturity from today with the parameters below obtained from here using the Nelson-Siegel-Svensson Model. The Python code is just a direct application of the Nelson-Siegel-Svensson Model formula. Are the theoretical Discount factors obtained from NSS meant to be this small?

beta_0 = 6.33120453
beta_1 =-6.22139731
beta_2 = -4.55116776
beta_3 = -8.72097716
tau_1 = 1.68437012
tau_2 = 11.18918219
months_to_maturity_array = numpy.array([6, 12, 18, 24, 30])
years_to_maturity_array = months_to_maturity_array/12
term_1 = (beta_0) + (beta_1*((1-numpy.exp(-years_to_maturity_array/tau_1))/(years_to_maturity_array/tau_1))) + (beta_2*((((1-numpy.exp(-years_to_maturity_array/tau_1))/(years_to_maturity_array/tau_1)))-(numpy.exp(-years_to_maturity_array/tau_1))) + (beta_3*((((1-numpy.exp(-years_to_maturity_array/tau_2))/(years_to_maturity_array/tau_2)))-(numpy.exp(-years_to_maturity_array/tau_2))))
test = numpy.exp(-years_to_maturity_array * (term_1))
print('RESULT:', test)

The output discount factors come out to be [ 0.9032555 0.70209724 0.44987297 0.23612997 0.10293834], which seems very low. Such small discount factors will result in very small prices as expected, which effects the Non-Linear Optimization used to calculate the parameters. For example if the bond has the set of coupons and face values as shown below, then the price turns out to be 27.2861601745.

coupons_and_facevals = [1.5, 1.5, 1.5, 102.5]          
coupons_and_facevals = numpy.array(coupons_and_facevals)
price = 0
for i in range(0,4,1):
    price = price + coupons_and_facevals[i] * test[i]

I've been dabbling with this for a while but am stuck.

Thank You


1 Answer 1


Your term_1, which represent the zero coupon rates, are expressed in %. You have to divide the values by 100 to compute discount factors.

  • $\begingroup$ Thank You. Just to be sure, I just need to divide term_1 by 100? $\endgroup$
    – Jojo
    Commented Aug 4, 2015 at 22:34
  • $\begingroup$ Yes. Also, make sure you put months_to_maturity_array/12.0 instead of months_to_maturity_array/12. $\endgroup$
    – Helin
    Commented Aug 4, 2015 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.