Skip to content

Commit d4f7e79

Browse files
committed
Updating README and pictures, and removing unused functions
1 parent 65030d4 commit d4f7e79

File tree

5 files changed

+5
-62
lines changed

5 files changed

+5
-62
lines changed

README.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
55
Implementation 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
2625
pip install pyacm
2726
```
2827

28+
2929
# Usage
3030
```python
3131
from 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
4343
at month 1. This means that you need to construct a bootstraped curve for every
4444
date 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
5248
The estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
5349

5450
The 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.
132 Bytes
Loading

images/DI term premium.png

-889 Bytes
Loading

pyacm/utils.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
'pandas',
2828
'scikit-learn',
2929
'statsmodels',
30-
'tqdm',
3130
],
3231
keywords=[
3332
'asset pricing',

0 commit comments

Comments
 (0)