pyacm 0.3__py3-none-any.whl → 0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyacm-0.3.dist-info → pyacm-0.4.dist-info}/METADATA +23 -9
- pyacm-0.4.dist-info/RECORD +8 -0
- pyacm-0.3.dist-info/RECORD +0 -8
- {pyacm-0.3.dist-info → pyacm-0.4.dist-info}/LICENSE +0 -0
- {pyacm-0.3.dist-info → pyacm-0.4.dist-info}/WHEEL +0 -0
- {pyacm-0.3.dist-info → pyacm-0.4.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyacm
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4
|
|
4
4
|
Summary: ACM Term Premium
|
|
5
5
|
Author: Tobias Adrian, Richard K. Crump, Emanuel Moench
|
|
6
6
|
Maintainer: Gustavo Amarante
|
|
@@ -43,7 +43,29 @@ carries all the relevant variables as atributes:
|
|
|
43
43
|
pip install pyacm
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
# Usage
|
|
47
|
+
```python
|
|
48
|
+
from pyacm import NominalACM
|
|
49
|
+
|
|
50
|
+
acm = NominalACM(
|
|
51
|
+
curve=yield_curve,
|
|
52
|
+
n_factors=5,
|
|
53
|
+
)
|
|
54
|
+
```
|
|
55
|
+
The tricky part of using this model is getting the correct data format. The
|
|
56
|
+
`yield_curve` dataframe in the expression above requires:
|
|
57
|
+
- Annualized log-yields for zero-coupon bonds
|
|
58
|
+
- Observations (index) must be in either monthly or daily frequency
|
|
59
|
+
- Maturities (columns) must be equally spaced in **monthly** frequency and start
|
|
60
|
+
at month 1. This means that you need to construct a bootstraped curve for every
|
|
61
|
+
date and interpolate it at fixed monthly maturities
|
|
62
|
+
- Whichever maturity you want to be the longest, your input data should have one
|
|
63
|
+
column more. For example, if you want term premium estimate up to the 10-year
|
|
64
|
+
yield (120 months), your input data should include maturities up to 121 months.
|
|
65
|
+
This is needed to properly compute the returns.
|
|
66
|
+
|
|
46
67
|
# Examples
|
|
68
|
+
|
|
47
69
|
The estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
|
|
48
70
|
|
|
49
71
|
The jupyter notebook [`example_br`](https://github.com/gusamarante/pyacm/blob/main/example_br.ipynb)
|
|
@@ -67,14 +89,6 @@ but I found an earlier version of the paper on SSRN where the authors go deeper
|
|
|
67
89
|
- To get daily / real-time estimates, the factor loadings estimated from the monthly frquency are used to transform the daily data
|
|
68
90
|
|
|
69
91
|
|
|
70
|
-
# Usage
|
|
71
|
-
The tricky part of using this model is getting the correct data format:
|
|
72
|
-
- The model works with annualized log-yields for zero-coupon bonds
|
|
73
|
-
- Observations (index) must be in either monthly or daily frequency
|
|
74
|
-
- Maturities (columns) must be equally spaced in **monthly** frequency and start at month 1. This means that you need to construct a bootstraped curve for every date and interpolate it at fixed monthly maturities.
|
|
75
|
-
- Whichever maturity you want to be the longest, your input data should have one column more. For example, if you want term premium estimate up to the 10-year yield (120 months), your input data should include maturities up to 121 months. This is needed to properly compute the returns.
|
|
76
|
-
|
|
77
|
-
|
|
78
92
|
# Observations
|
|
79
93
|
I am not completely sure that computations in the [inferences attributes][inference_atribute]
|
|
80
94
|
are correct. If you find any mistakes, please open a pull request following the contributing
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
pyacm/__init__.py,sha256=pRFuR3Au_ybQAmkJduGrLMKGJd1pxjhGfhsfsjlK-mU,66
|
|
2
|
+
pyacm/acm.py,sha256=5UxKhc5lptSE-K99Uo3b6hMkIfM-5y1P01qeb_K5xW0,14491
|
|
3
|
+
pyacm/utils.py,sha256=-PmH9L3LpzqUP-QU5BHisoLSBYrq-3PaPgR-W1sS1z8,904
|
|
4
|
+
pyacm-0.4.dist-info/LICENSE,sha256=YbUXx25Z6PzP4k4rsbs6tN58NiCwGIIrTMzql4iTeDs,1073
|
|
5
|
+
pyacm-0.4.dist-info/METADATA,sha256=eRotNIVK0skIEzKi4f0u2bnInhd_Ap2CuStomM-KliU,4164
|
|
6
|
+
pyacm-0.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
+
pyacm-0.4.dist-info/top_level.txt,sha256=xQy7q1eSKCnRtTnwb-Iz_spT0UDNdTyzKd43yz-ffrI,6
|
|
8
|
+
pyacm-0.4.dist-info/RECORD,,
|
pyacm-0.3.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pyacm/__init__.py,sha256=pRFuR3Au_ybQAmkJduGrLMKGJd1pxjhGfhsfsjlK-mU,66
|
|
2
|
-
pyacm/acm.py,sha256=5UxKhc5lptSE-K99Uo3b6hMkIfM-5y1P01qeb_K5xW0,14491
|
|
3
|
-
pyacm/utils.py,sha256=-PmH9L3LpzqUP-QU5BHisoLSBYrq-3PaPgR-W1sS1z8,904
|
|
4
|
-
pyacm-0.3.dist-info/LICENSE,sha256=YbUXx25Z6PzP4k4rsbs6tN58NiCwGIIrTMzql4iTeDs,1073
|
|
5
|
-
pyacm-0.3.dist-info/METADATA,sha256=8LVgeznDzDLl2RHaGEoLH_gAb5eZg05w-J6L1HlP4Po,4015
|
|
6
|
-
pyacm-0.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
-
pyacm-0.3.dist-info/top_level.txt,sha256=xQy7q1eSKCnRtTnwb-Iz_spT0UDNdTyzKd43yz-ffrI,6
|
|
8
|
-
pyacm-0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|