MatLab code for shadow/LB term structure models

 Disclaimer: The code and files on this website are provided by Leo Krippner. Neither he nor the Reserve Bank of New Zealand accepts any liability for any damages arising from use of the code or files.

The MatLab code zip file contains the MatLab code and files that has been used since May 2016 to obtain the results published on the website; see folder “AA_KANSM2_NEW_20160531”.

I recommend using this code for estimating Shadow Short Rates, and it can be run with a fixed or an estimated lower bound.

It also contains the MatLab code and files used to estimate the six main models detailed in Krippner (2015), “Zero Lower Bound Term Structure Modeling: A Practitioner’s Guide”. The six different models are:

  • K-ANSM(2) with a fixed lower bound (of 0% and 0.25%).
  • K-ANSM(2) with an estimated lower bound (which was used to obtain the previous results available on the Measures of the stance of United States monetary policy page and Comparison of international monetary policy measures page).
  • K-ANSM(3) with a fixed lower bound (of 0% and 0.25%).
  • K-ANSM(3) with an estimated lower bound.

Download the MatLab code zip file (ZIP 8MB)

The documentation for United States measures of monetary policy September 2014 provides an overview of the model specifications used in Krippner (2015).

Download the documentation for United States measures of monetary policy September 2014 (PDF 607KB)

The July 2016 documentation provides an overview of the modified model specifications, and also how to run both the original MatLab code and the current MatLab code.

Download the documentation for United States measures of monetary policy July 2016 (PDF 1.2MB)

The Python code page contains the Python code equivalent to the original MatLab code. It was kindly translated and made available by Amandeep Singh.

Python code page