Skip to content

The challenge to fit the greek gov curve with termstrc R Package!

1 message · Enrico Schumann

#
[this goes to the list so that others may benefit as well, though I am 
not so sure about 'benefit'  :) ]

A good start would be to provide a small data set with 'dput', maybe 
attached as a txt-file, and the exact things you tried.

Again, I have never used the package, so you may look for help 
elsewhere. But here is what I see:

The function 'bond_yields' seems to set the limits for uniroot to -1 and 
1; I am not sure if they can be passed with your initial function call 
(I will not read the documentation for you). Since the package has a 
namespace, you cannot simply create a copy of the function. But you can 
use 'trace', with 'edit = TRUE'.

Thus,

 > trace(bond_yields, edit = TRUE)

and add the line (say)

searchint = c(-1, 20)

With this I got, with the data set you sent me off-list

$greece
      tau_min      tau_max gridstepsize
    0.2794521   28.8027397    0.2000000

[1] "Searching startparameters for  greece"
        beta0        beta1        beta2         tau1
2045.9677643   77.8918645   74.3183463    0.2795521
---------------------------------------------------
Estimated Nelson/Siegel parameters:
---------------------------------------------------

        greece
beta_0 2045.96776
beta_1   77.89186
beta_2   74.31835
tau_1     0.27951

This is all a bit dirty, and I cannot judge if it is meaningful at all.


Regards,
Enrico



Am 08.12.2011 17:11, schrieb ArvanitisCh at piraeusbank.gr:
[[elided Yahoo spam]]
[[elided Yahoo spam]]
[[elided Yahoo spam]]
[[elided Yahoo spam]]
[[elided Yahoo spam]]