11[ paper_website ] : https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr340.pdf
2- [ inference_atribute ] : https://github.com/gusamarante/pyacm/blob/ba641c14e450fc83d22db4ef5e60eadbd489b351/pyacm/acm.py#L203
2+
33
44# pyacm
55Implementation of [ "Pricing the Term Structure with Linear Regressions" from
@@ -18,14 +18,14 @@ carries all the relevant variables as atributes:
1818- Term premium
1919- Historical in-sample expected returns
2020- Expected return loadings
21- - Hypothesis testing (Not sure if correct, more info observations below)
2221
2322
2423# Instalation
2524``` bash
2625pip install pyacm
2726```
2827
28+
2929# Usage
3030``` python
3131from pyacm import NominalACM
@@ -42,13 +42,9 @@ The tricky part of using this model is getting the correct data format. The
4242- Maturities (columns) must be equally spaced in ** monthly** frequency and start
4343at month 1. This means that you need to construct a bootstraped curve for every
4444date and interpolate it at fixed monthly maturities
45- - Whichever maturity you want to be the longest, your input data should have one
46- column more. For example, if you want term premium estimate up to the 10-year
47- yield (120 months), your input data should include maturities up to 121 months.
48- This is needed to properly compute the returns.
4945
50- # Examples
5146
47+ # Examples
5248The estimates for the US are available on the [ NY FED website] ( https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview ) .
5349
5450The jupyter notebook [ ` example_br ` ] ( https://github.com/gusamarante/pyacm/blob/main/example_br.ipynb )
@@ -65,14 +61,5 @@ contains an example application to the Brazilian DI futures curve that showcases
6561> FRB of New York Staff Report No. 340,
6662> Available at SSRN: https://ssrn.com/abstract=1362586 or http://dx.doi.org/10.2139/ssrn.1362586
6763
68- The version of the article that was published by the NY FED is not 100% explicit on how the data is being manipulated,
69- but I found an earlier version of the paper on SSRN where the authors go deeper into the details on how everything is being estimated:
70- - Data for zero yields uses monthly maturities starting from month 1
71- - All principal components and model parameters are estiamted with data resampled to a monthly frequency, averaging observations in each month
72- - To get daily / real-time estimates, the factor loadings estimated from the monthly frquency are used to transform the daily data
73-
74-
75- # Observations
76- I am not completely sure that computations in the [ inferences attributes] [ inference_atribute ]
77- are correct. If you find any mistakes, please open a pull request following the contributing
78- guidelines.
64+ I would like to thank Emanuel Moench for sending me his original MATLAB code in
65+ order to perfectly replicate these results.
0 commit comments