Description Usage Arguments References Examples
This function estimates yield curve models and computes term premia. Users have the choice between several yield curve models such as the Dynamic-Nelson-Siegel model (\insertCitediebold2006forecastingRYieldCurve,\insertCitenelson1987parsimoniousRYieldCurve), the dynamic version of the Svensson-Söderlind (\insertCitesoderlind1997newRYieldCurve) model or Joslin-Singleton-Zhu-model. For the DNS and DSS model the decay factors is computed using a grid search over the range [0.001,0.300]. The program choses the decay factors that minimizes the sum of squared errors between model yields and yields supplied by the user. Alternatively the user can provide decay factor(s).
1 2 | estimate_yield_model(yields, exogen = NULL, maturity, frequency = 12,
method = "DNS", lambda = NULL)
|
yields |
A Txn panel of yields. Has to be a ts-objects |
exogen |
Exogeneous Variables for the VAR-Model |
maturity |
An nx1-vector of maturities. |
frequency |
data frequency (12=monthly, 52 = weekly, 360 = daily) |
method |
The method which is used to extract the factors. (DNS = Dynamic Nelson-Siegel, DSS = Dynamic Söderlind-Svensson Model) |
lambda |
Decay factor(s). If decay factors are not provided by the user the code will automatically search for the optimal decay factors. |
1 2 3 4 5 6 7 8 9 | ## Not run:
library(RYieldCurve)
data(US_Yield_Curve)
# estimate yield curve model using dynamic Nelson-Siegel model
maturity <- seq(1:30)*12
test <- estimate_yield_model(yields = Yield_training,exogen=NULL,maturity = maturity,method="DNS")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.