- wannabquant
**Posts:**3**Joined:**

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:**

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

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

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

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

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

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.

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

GZIP: On