A New Julialang Package for Estimating the Term Structure Model in the Bayesian Framework

Recently, I developed a Julia package, TermStructureModels.jl, designed to simplify the estimation of the no-arbitrage term structure model of bond yields. This package was born from my desire to enable users to estimate and apply term structure models in practice without needing a deep understanding of the model. This is achieved by the package automatically configuring the model settings based on the data. Users will find that they can estimate the term structure model without having to worry about the settings.

Our main target users of the package are central bankers. Central bankers have a keen interest in the interaction between interest rates and the macroeconomy. Furthermore, to analyze these interactions without bias, it is necessary to introduce numerous macroeconomic variables into the model. Therefore, I designed the estimation methods in such a way that incorporating numerous macroeconomic variables into the term structure models does not pose estimation issues. The potential issue of overfitting, arising from the introduction of many macro variables, is addressed by using Bayesian estimation methods and introducing shrinkage through the prior distributions. Thus, the package’s output consists of posterior samples. In addition, our package provides scenario analysis functions, allowing for a systematic analysis of the interactions between the macroeconomy and interest rates.

A significant advantage of this package is the efficiency of the MCMC simulation. In our paper, we demonstrated an efficiency equivalent to obtaining one iid sample for every 2-3 MCMC iterations. Therefore, the number of iterations in the MCMC simulation does not have to be large.

For detailed explanations of our term structure model and the estimation method used in the package, refer to our paper. Practical guidelines on how to use the package can be found in the repository and its documentation.

Written on February 10, 2024