TermStructureModels.jl is a Julia
package to estimate the term structure of interest rates. We currently provide an Gaussian affine term structure model that satisfies the No-Arbitrage condition.
Our model is the three-factor JSZ(Joslin, Singleton, and Zhu, 2011) model constrained by the AFNS(Christensen, Diebold, and Rudebusch, 2011) restriction. Our paper provides theoretical descriptions of our model.
The main features of the package is that it allows for the lag length of the VAR system in the Physical measure to extend beyond one. Additionally, it permits the inclusion of numerous macroeconomic variables as unspanned risks within the Physical measure. For instance, in our study, we set the lag length to 17 in the term-structure model that incorporates 28 macroeconomic variables.
Other features of the package include
- Estimation of the model in the Bayesian framework
- All hyperparameters, including the lag length of the VAR system, are automatically determined by the data
- Yield curve interpolation and fitting
- Decomposition of a bond yield into the expectation hypothesis component and the term premium component
- Conditional Forecasting, including Scenario Analyses, to inspect interactions between bond yields and the macroeconomy
Our package also provides the yield-only model and the standard JSZ model with three distinct eigenvalues, not restricted by the AFNS constraint.
Run
using Pkg
Pkg.add("TermStructureModels")
Run
using TermStructureModels
to load all functions of our package.
To better understand how to use our package, refer to the script file used for our paper.
If you want to cite this package for your works, cite our paper.