Wednesday, September 16, 2015

fixed income - Setting input parameters for Nelson Siegel Svensson model


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



Answer



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.



No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...