[R-SIG-Finance] about Nelson-Siegel model fitting

Brian G. Peterson brian at braverock.com
Sat Mar 6 15:14:47 CET 2010


Yin,

Please direct replies to the list.  More people looking at your problem 
means you're more likely to get an answer and we are (slightly) less 
likely to have to answer the same questions again for someone else.

Per the posting guide, it helps us to help you if you tell us what 
you've already tried, and be as specific as possible about what you need.

If you have the prices and coupon specifications you can calculate the 
spot yield quite easily.
For a non-technical introduction, see for example:
http://www.investopedia.com/articles/bonds/07/price_yield.asp

Then you can use Nelson-Siegel to calculate the term structure.

So, what's the problem? 

Please be specific so that people can help you.  Code examples help us 
help you.

Regards,

  - Brian



Yin ZHANG wrote:
> thanks for your note. I have tried that package before I post. But 
> that one only works when you already got a series of spot yields with 
> different maturities. My problem is my data set is just bond prices 
> together with their coupon specifications, which is qutie different 
> from the YieldCurve package.
>  
> Kindest
>  
> Yin
>
>
>  
> On Sat, Mar 6, 2010 at 9:46 PM, Brian G. Peterson <brian at braverock.com 
> <mailto:brian at braverock.com>> wrote:
>
>     Yin ZHANG wrote:
>
>         I am trying to fit the bond market data to the Nelson-Siegel
>         term structure
>         model. I have a series of bond price data, most of them are
>         coupon bonds.
>         According to the original Nelson-Siegel model setting, my
>         objective is
>         trying to get the paremeters that minimize the
>         weighted/unweighted  sum of
>         price errors squared.
>
>         So, is there any simple way in R or any package that can do
>         this job? I do
>         not know any about non-linear optimization, so what I need is
>         an easy to use
>         package/code that can do the job.
>          
>
>     As is often the case, a simple search would have yielded the
>     answer to this question:
>
>     RSiteSearch("Nelson-Siegel")
>
>     http://finzi.psych.upenn.edu/R/library/YieldCurve/html/Nelson.Siegel.html
>
>     Please search before posting.
>
>      - Brian
>
>


-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list