You can use the optim() function in R to minimise the sum of the squared differences between the actual yields and nelson_siegel predictions. Or is there another way to get my result? The code that I have so far: RTS54_list % I want to minimize the squared difference between the Nelson Siegel yield and the actual yield by changing the beta parameters of the function. Second, I created a function myself to calculate the Nelson Siegel model. However, the function only has two arguments so that I can't get the lambda constant. For each yield curve I want to estimate the beta parameters from the Nelson Siegel model.Īt first, I tried to use the Nelson.Siegel function from the "YieldCurve" package. I have an excel file that contains 54 yield curves. I want to calculate the beta parameters of the Nelson Siegel model, with a fixed lambda.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |