I am trying to determine the parameters for the Nelson Siegel Svensson model and am solving a Non-Linear Optimization problem to do this.

I am trying to solve:

$$ \min_\theta{\sum{(p_i - \hat p_i)^2}}. $$

where $p_i$ are the observed dirty prices of the bonds and $\hat p_i$ are the prices that have been calculated using the NSS parameters, $\theta$

I am using the procedure presented in this paper. But I've also read that the Optimization is highly sensitive to the input set of parameters ($\theta$) as mentioned in Page 2 of this paper. Hence, if I don't have data on these parameters how should I look to set the input. I am currently trying to do this for GBP Government Bonds, but am unable to find any published parameters. I was also unable to find how people circumvent this problem.

Currently, I am using the $\theta$ values presented here as I thought they may be similar for the GBP Government Bonds. However, the Optimization proves to be unsolvable.

This is part of the code that I am using in Python to solve the optimization problem. func just returns the sum of the squared difference in prices (Objective function) and params refer to $\theta$. These are the input params I am currently using.

params = [3.15698855,    -2.98240445,    -3.37586632,    -1.67713694,    0.88538977,    3.84324841] #Theta
optimize.minimize(func, params, method='COBYLA', constraints = cons, options={'disp': True})

Thank You

  • $\begingroup$ Indeed, I'm not sure what this adds to your previous question @jojo. $\endgroup$
    – Bob Jansen
    Jul 24, 2015 at 7:11
  • $\begingroup$ @BobJansen There I was misunderstanding how to set-up the question. Here, I am asking for how to look for input parameters. These are completely different things. $\endgroup$
    – Jojo
    Jul 24, 2015 at 11:30
  • $\begingroup$ I see, I think there is still some overlap but this ca be tackled as a separate thing. Can you maybe cross reference the questions? It gives a better picture of where you are and will get you better help. Also users can then use your questions as a guide to do NSS themselves start to finish. $\endgroup$
    – Bob Jansen
    Jul 24, 2015 at 12:13
  • $\begingroup$ @BobJansen Certainly. I've edited the question. I hope it is clearer now. $\endgroup$
    – Jojo
    Jul 24, 2015 at 12:31

1 Answer 1


Jojo, once again the paper is about Nelson-Siegel and not Nelson-Siegel svensson (the former allows for one hump whereas the latter for two humps).

Jojo, in practice people often start by fixing $\lambda$ then estimate the model by OLS and check the squared errors of the model. Then change $\lambda$ and repeat the procedure. This is highly efficient, and you can do it for a reasonable large range for $\lambda$. Then check which $\lambda$ yields the lowest squared errors. This should not take more than 30 seconds in a standard computer.

Then do the optimization algorithm setting as initial parameters the ones obtained using the procedure outlined before. The should move (hopefully not much), and reduce the squared errors.

This is almost equivalent to a simulation annealing technique.


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.