SERVING THE QUANTITATIVE FINANCE COMMUNITY

wannabquant
Topic Author
Posts: 3
Joined: January 19th, 2010, 12:15 am

### Nelson-Siegel-Svensson Curve Fitting

Hi all, I'm working on trying to implement the Nelson-Siegel-Svensson (NSS) methodology to fit the Treasury yield curve. Nelson-Siegel (1987)Svensson (1994)For those who might know the model, the NSS method chooses to minimize the sum of squared residuals between the market price and the NSS predicted price based on the zero curve estimated from the NSS model where the spot rates are determined byfor a given maturity . This equation is found by integrating the forward yield curve equation given by I'm limited to using VBA, but was able to code the necessary steps to find . My two questions arose once I was done and ran the code. (1) Shouldn't I be able to use the parameters I estimated when finding the optimal spot rates/zero curve and plug this into the forward curve equation to get the forward rate for any given maturity? The reason I ask is because when I did this with the current Treasury data, I got a zero curve that seemed to match other models, but an odd looking forward curve. Namely, the forwards shot up quickly, but peaked around 5 years or so and just stayed constant (almost like an L-shaped, but not as sharp). Should this be happening? (2) Has anyone figured out how to solve for the parameters through matrix notation like you would with OLS to find the estimated parameters? My intuition is no since it is non-linear, but I figured I would ask since I'm currently using Excel's solver to find the optimal parameters (which can be very slow) and was wondering if someone found a better solution. Also, in case anyone is wondering, I'm trying to use NSS because I'm trying to replicate this paper from the Fed. Fed Paper: Treasury CurveThanks so much as always.. look forward to your insight!!

nicolasito
Posts: 38
Joined: November 23rd, 2005, 5:23 pm

### Nelson-Siegel-Svensson Curve Fitting

wanna I may be able to help you. Send me an email - rnfermincota@gmail.comnico

quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

### Nelson-Siegel-Svensson Curve Fitting

2. no, you need nonlinear optimization with constraints1. if your zcb yileds look right, then forwards should look right too.why don't you validate your outputs with data in the paper? they publish curves on the FRB web site, and a bunch of other things including coefficicants and forward yields

cemil
Posts: 221
Joined: September 16th, 2005, 7:44 am

### Nelson-Siegel-Svensson Curve Fitting

You need to use a non-linear optimisation with constraints but not with VBA (too slow). You can use Numericales Recipies to built your optimisation in C or C++For a quick optimisation, you need to fix your variables at "good level", and at each optimisation use the last optimum vector

quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

### Nelson-Siegel-Svensson Curve Fitting

QuoteOriginally posted by: cemilYou need to use a non-linear optimisation with constraints but not with VBA (too slow). it'll be fine.

TheBridge
Posts: 172
Joined: November 22nd, 2005, 3:42 pm

### Nelson-Siegel-Svensson Curve Fitting

Hi,I wanted to mention that Damir Filipovic has worked on this in a no-arbitrage setting and that there are a few articles implementing adjustments to "NSS type" methodology in order to keep it consiostent in a no arbitrage setting Best Regards

AVt
Posts: 1074
Joined: December 29th, 2001, 8:23 pm

### Nelson-Siegel-Svensson Curve Fitting

I have not used it for a longer time, but essentialy it goes like this,as you 'only' need a reasonable starting guess (after which Excel will do):u = (a + (b+c)*(1-exp(-x/tau))/(x/tau) - c*exp(-x/tau));Then limit(u, tau=0, right) = a (if 0 <= x, else forget everything)and limit(u, tau=infinity) = a+b.Hence your smallest and largest time gives a guess for a and b and forany time between and 'given' x you get some guess for c.Similar should work for the other simplification.Note that having more variables (as in Svensson) would fit better, butit may be as questionable as the parsimonious 'model', it is just somemodeled approximation to data.

ksoundar
Posts: 1
Joined: August 19th, 2010, 7:56 pm

### Nelson-Siegel-Svensson Curve Fitting

HiI am trying to build a AAA corporates using Tsy OAS numbers for AAA bonds.I am having a problem in the longer maturities since the AAA forward cuve sometimes dips too low ending up with -ve fwd spread with respect to tsy. The Model I am using is the original Nelson-SiegelCurious to know from experienced quants here if the Svensson extension of the original model will do any better, before I change my codethank youSoundar

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...

 JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...

GZIP: On