1 year ago
#230654
Gino Ramos
How to incorporate macroeconomic factors in the Dynamic Nelson Siegel model?
I am having a hard time adding macroeconomic variables to the Dynamic Nelson Siegel codes I found online. I read literature like Diebold et al. (2003): The Macroeconomy and the Yield Curve: A Nonstructural Analysis and Diebold et al. (2005): The macroeconomy and the yield curve: a dynamic latent factor approach. They mention to merely include the macroeconomic variables in the state vector and expand the VAR coefficients matrix, the vector of means, and the variance-covariance matrix of the disturbance terms. But I am not sure how to translate this into code. Can anyone help? I am very confused. I also do not know how the data should look like.
This is one of the codes I saw from Zhe Huang's "Fitting Yield Curve with Dynamic Nelson-Siegel Models: Evidence from Sweden" and also this using the statespacer
package in R.
Any help would be appreciated as I do not have a lot of guidance from supervisors and I am only a beginner coder. I am currently using Rstudio. Thank you so much!
r
kalman-filter
state-space
0 Answers
Your Answer