I have a model like this (Nelson and Siegel 1987)

where tau and y are the maturities and yields, respectively, given to me in my data file..

y=

4.863,5.662,6.41,6.864,7.153,7.352,7.409,7.474,7.503,7.644,7.676,7.701,7.674,7.668,7.665,7.741,7.743,7.742

tau=

1,3,6,9,12,15,18,21,24,30,36,48,60,72,84,96,108,120

I firstly need to find the MLE of m which maximises the likelihood function and then I can easily find the b1, b2 and b3 constants using this m value via least squares estimation..

But does anybody know how I can go abouts finding the MLE of m and if you could help with providing r code for it, I would appreciate that a lot. I have been pulling my hair out for the past week now trying to do it

P.S. I know that m must be in between 0 and 0.4

where tau and y are the maturities and yields, respectively, given to me in my data file..

y=

4.863,5.662,6.41,6.864,7.153,7.352,7.409,7.474,7.503,7.644,7.676,7.701,7.674,7.668,7.665,7.741,7.743,7.742

tau=

1,3,6,9,12,15,18,21,24,30,36,48,60,72,84,96,108,120

I firstly need to find the MLE of m which maximises the likelihood function and then I can easily find the b1, b2 and b3 constants using this m value via least squares estimation..

But does anybody know how I can go abouts finding the MLE of m and if you could help with providing r code for it, I would appreciate that a lot. I have been pulling my hair out for the past week now trying to do it

P.S. I know that m must be in between 0 and 0.4

Last edited: