Srates {YieldCurve} | R Documentation |
Interest rates of the Svensson's model.
Description
Returns the interest rates by Svensson's model.
Usage
Srates(Coeff, maturity, whichRate = "Forward")
Arguments
Coeff |
vector or matrix of the beta's coefficients and of |
maturity |
maturity of the yield curve of which want to return the interest rates. |
whichRate |
which rate want to return: "Spot" or "Forward" rates. |
Details
Coeff
is a vector or matrix of the four coefficients of the Svensson's model, while lambdaValues
is a vector or matrix of two lambda values of Svensson's model.
Value
Return interest rates in matrix object with number of rows equal to nrow(Coeff)
and number of columns equal to length(maturity)
.
Author(s)
Sergio Salvino Guirreri
References
Svensson, L.E. (1994), Estimating and Interpreting Forward Interest Rates: Sweden 1992-1994, IMF Working Paper, WP/94/114.
Nelson, C.R., and A.F. Siegel (1987), Parsimonious Modeling of Yield Curve, The Journal of Business, 60, 473-489.
Examples
data(ECBYieldCurve)
rate.ECB = first(ECBYieldCurve,'2 day')
maturity.ECB = c(0.25,0.5,seq(1,30,by=1))
SvenssonParameters <- Svensson(rate.ECB, maturity.ECB)
Svensson.rate <- Srates( SvenssonParameters ,maturity.ECB,"Spot")
plot(maturity.ECB, last(rate.ECB,'1 day'),main="Fitting Svensson yield curve",
xlab=c("Pillars in years"), ylab=c("Rates"),type="o")
lines(maturity.ECB, last(Svensson.rate,'1 day'), col=2)
legend("topleft",legend=c("observed yield curve","fitted yield curve"),
col=c(1,2),lty=1)
grid()