TermStructureModels.jl

Estimating Term Structure Models in the Bayesian Framework
Author econPreference
Popularity
2 Stars
Updated Last
2 Months Ago
Started In
January 2023

TermStructureModels.jl

Detailed explanations of how to use this package can be found in the documentation: Click

Build Status

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.

Installation

Run

using Pkg
Pkg.add("TermStructureModels")

Usage

Run

using TermStructureModels

to load all functions of our package.

Example File

To better understand how to use our package, refer to the script file used for our paper.

Citation

If you want to cite this package for your works, cite our paper.