pyacm 1.0__tar.gz → 1.2__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
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pyacm
3
- Version: 1.0
3
+ Version: 1.2
4
4
  Summary: ACM Term Premium
5
5
  Author: Tobias Adrian, Richard K. Crump, Emanuel Moench
6
6
  Maintainer: Gustavo Amarante
@@ -17,6 +17,7 @@ Dynamic: author
17
17
  Dynamic: description
18
18
  Dynamic: description-content-type
19
19
  Dynamic: keywords
20
+ Dynamic: license-file
20
21
  Dynamic: maintainer
21
22
  Dynamic: maintainer-email
22
23
  Dynamic: requires-dist
@@ -70,10 +71,13 @@ date and interpolate it at fixed monthly maturities
70
71
 
71
72
 
72
73
  # Examples
73
- The estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
74
+ Updated estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
75
+ The file [`example_us`](https://github.com/gusamarante/pyacm/blob/main/example_us.py) reproduces the original outputs using the same
76
+ dataset as the authors.
74
77
 
75
78
  The jupyter notebook [`example_br`](https://github.com/gusamarante/pyacm/blob/main/example_br.ipynb)
76
- contains an example application to the Brazilian DI futures curve that showcases all the available methods.
79
+ contains an example application to the Brazilian DI futures curve that
80
+ showcases all the available methods and attributes.
77
81
 
78
82
  <p align="center">
79
83
  <img src="https://raw.githubusercontent.com/gusamarante/pyacm/refs/heads/main/images/DI%20term%20premium.png" alt="DI Term Premium"/>
@@ -86,5 +90,9 @@ contains an example application to the Brazilian DI futures curve that showcases
86
90
  > FRB of New York Staff Report No. 340,
87
91
  > Available at SSRN: https://ssrn.com/abstract=1362586 or http://dx.doi.org/10.2139/ssrn.1362586
88
92
 
89
- I would like to thank Emanuel Moench for sending me his original MATLAB code in
93
+ I would like to thank Emanuel Moench for sharing his original MATLAB code in
90
94
  order to perfectly replicate these results.
95
+
96
+ # Citation
97
+ > Gustavo Amarante (2025). pyacm: Python Implementation of the ACM Term Premium
98
+ > Model. Retrieved from https://github.com/gusamarante/pyacm
@@ -45,10 +45,13 @@ date and interpolate it at fixed monthly maturities
45
45
 
46
46
 
47
47
  # Examples
48
- The estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
48
+ Updated estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
49
+ The file [`example_us`](https://github.com/gusamarante/pyacm/blob/main/example_us.py) reproduces the original outputs using the same
50
+ dataset as the authors.
49
51
 
50
52
  The jupyter notebook [`example_br`](https://github.com/gusamarante/pyacm/blob/main/example_br.ipynb)
51
- contains an example application to the Brazilian DI futures curve that showcases all the available methods.
53
+ contains an example application to the Brazilian DI futures curve that
54
+ showcases all the available methods and attributes.
52
55
 
53
56
  <p align="center">
54
57
  <img src="https://raw.githubusercontent.com/gusamarante/pyacm/refs/heads/main/images/DI%20term%20premium.png" alt="DI Term Premium"/>
@@ -61,5 +64,9 @@ contains an example application to the Brazilian DI futures curve that showcases
61
64
  > FRB of New York Staff Report No. 340,
62
65
  > Available at SSRN: https://ssrn.com/abstract=1362586 or http://dx.doi.org/10.2139/ssrn.1362586
63
66
 
64
- I would like to thank Emanuel Moench for sending me his original MATLAB code in
67
+ I would like to thank Emanuel Moench for sharing his original MATLAB code in
65
68
  order to perfectly replicate these results.
69
+
70
+ # Citation
71
+ > Gustavo Amarante (2025). pyacm: Python Implementation of the ACM Term Premium
72
+ > Model. Retrieved from https://github.com/gusamarante/pyacm
@@ -410,7 +410,7 @@ class NominalACM:
410
410
  Bpb = np.kron(B[n - 1, :], B[n - 1, :])
411
411
  s0term = 0.5 * (Bpb @ self.s0 + self.omega[0, 0])
412
412
 
413
- A[n] = A[n - 1] + B[n - 1, :] @ (self.mu - lambda0) + s0term + A[0]
413
+ A[n] = (A[n - 1] + B[n - 1, :] @ (self.mu - lambda0) + s0term + A[0])[0]
414
414
  B[n, :] = B[n - 1, :] @ (self.phi - lambda1) + B[0, :]
415
415
 
416
416
  return A, B
@@ -445,7 +445,7 @@ class NominalACM:
445
445
  # Historical estimate
446
446
  exp_ret = (self.B @ (self.lambda1 @ self.pc_factors_d.T + self.lambda0.reshape(-1, 1))).values
447
447
  conv_adj = np.diag(self.B @ self.Sigma @ self.B.T) + self.omega[0, 0]
448
- er_hist = (exp_ret + conv_adj[:, None]).T
448
+ er_hist = (exp_ret - 0.5 * conv_adj[:, None]).T
449
449
  er_hist_d = pd.DataFrame(
450
450
  data=er_hist,
451
451
  index=self.pc_factors_d.index,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pyacm
3
- Version: 1.0
3
+ Version: 1.2
4
4
  Summary: ACM Term Premium
5
5
  Author: Tobias Adrian, Richard K. Crump, Emanuel Moench
6
6
  Maintainer: Gustavo Amarante
@@ -17,6 +17,7 @@ Dynamic: author
17
17
  Dynamic: description
18
18
  Dynamic: description-content-type
19
19
  Dynamic: keywords
20
+ Dynamic: license-file
20
21
  Dynamic: maintainer
21
22
  Dynamic: maintainer-email
22
23
  Dynamic: requires-dist
@@ -70,10 +71,13 @@ date and interpolate it at fixed monthly maturities
70
71
 
71
72
 
72
73
  # Examples
73
- The estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
74
+ Updated estimates for the US are available on the [NY FED website](https://www.newyorkfed.org/research/data_indicators/term-premia-tabs#/overview).
75
+ The file [`example_us`](https://github.com/gusamarante/pyacm/blob/main/example_us.py) reproduces the original outputs using the same
76
+ dataset as the authors.
74
77
 
75
78
  The jupyter notebook [`example_br`](https://github.com/gusamarante/pyacm/blob/main/example_br.ipynb)
76
- contains an example application to the Brazilian DI futures curve that showcases all the available methods.
79
+ contains an example application to the Brazilian DI futures curve that
80
+ showcases all the available methods and attributes.
77
81
 
78
82
  <p align="center">
79
83
  <img src="https://raw.githubusercontent.com/gusamarante/pyacm/refs/heads/main/images/DI%20term%20premium.png" alt="DI Term Premium"/>
@@ -86,5 +90,9 @@ contains an example application to the Brazilian DI futures curve that showcases
86
90
  > FRB of New York Staff Report No. 340,
87
91
  > Available at SSRN: https://ssrn.com/abstract=1362586 or http://dx.doi.org/10.2139/ssrn.1362586
88
92
 
89
- I would like to thank Emanuel Moench for sending me his original MATLAB code in
93
+ I would like to thank Emanuel Moench for sharing his original MATLAB code in
90
94
  order to perfectly replicate these results.
95
+
96
+ # Citation
97
+ > Gustavo Amarante (2025). pyacm: Python Implementation of the ACM Term Premium
98
+ > Model. Retrieved from https://github.com/gusamarante/pyacm
@@ -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 = '1.0'
10
+ VERSION = '1.2'
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