pyacm 0.3__tar.gz → 0.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyacm
3
- Version: 0.3
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
@@ -26,7 +26,29 @@ carries all the relevant variables as atributes:
26
26
  pip install pyacm
27
27
  ```
28
28
 
29
+ # Usage
30
+ ```python
31
+ from pyacm import NominalACM
32
+
33
+ acm = NominalACM(
34
+ curve=yield_curve,
35
+ n_factors=5,
36
+ )
37
+ ```
38
+ The tricky part of using this model is getting the correct data format. The
39
+ `yield_curve` dataframe in the expression above requires:
40
+ - Annualized log-yields for zero-coupon bonds
41
+ - Observations (index) must be in either monthly or daily frequency
42
+ - Maturities (columns) must be equally spaced in **monthly** frequency and start
43
+ at month 1. This means that you need to construct a bootstraped curve for every
44
+ 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.
49
+
29
50
  # Examples
51
+
30
52
  The estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
31
53
 
32
54
  The jupyter notebook [`example_br`](https://github.com/gusamarante/pyacm/blob/main/example_br.ipynb)
@@ -50,14 +72,6 @@ but I found an earlier version of the paper on SSRN where the authors go deeper
50
72
  - To get daily / real-time estimates, the factor loadings estimated from the monthly frquency are used to transform the daily data
51
73
 
52
74
 
53
- # Usage
54
- The tricky part of using this model is getting the correct data format:
55
- - The model works with annualized log-yields for zero-coupon bonds
56
- - Observations (index) must be in either monthly or daily frequency
57
- - 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.
58
- - 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.
59
-
60
-
61
75
  # Observations
62
76
  I am not completely sure that computations in the [inferences attributes][inference_atribute]
63
77
  are correct. If you find any mistakes, please open a pull request following the contributing
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyacm
3
- Version: 0.3
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
@@ -7,7 +7,7 @@ here = os.path.abspath(os.path.dirname(__file__))
7
7
  with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
8
8
  long_description = "\n" + fh.read()
9
9
 
10
- VERSION = '0.3'
10
+ VERSION = '0.4'
11
11
  DESCRIPTION = 'ACM Term Premium'
12
12
 
13
13
  # Setting up
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes