ACM Term Premium
Project description
pyacm
Implementation of "Pricing the Term Structure with Linear Regressions" from Adrian, Crump and Moench (2013).
The NominalACM class prices the time series and cross-section of the term
structure of interest rates using a three-step linear regression approach.
Computations are fast, even with a large number of pricing factors. The object
carries all the relevant variables as atributes:
- The yield curve itself
- The excess returns from the synthetic zero coupon bonds
- The principal components of the curve used as princing factors
- Risk premium parameter estimates
- Yields fitted by the model
- Risk-neutral yields
- Term premium
- Historical in-sample expected returns
- Expected return loadings
Instalation
pip install pyacm
Usage
from pyacm import NominalACM
acm = NominalACM(
curve=yield_curve,
n_factors=5,
)
The tricky part of using this model is getting the correct data format. The
yield_curve dataframe in the expression above requires:
- Annualized log-yields for zero-coupon bonds
- Observations (index) must be in either monthly or daily frequency
- 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
Examples
Updated estimates for the US are available on the NY FED website.
The file example_us reproduces the original outputs using the same
dataset as the authors.
The jupyter notebook example_br
contains an example application to the Brazilian DI futures curve that
showcases all the available methods and attributes.
Original Article
Adrian, Tobias and Crump, Richard K. and Moench, Emanuel, Pricing the Term Structure with Linear Regressions (April 11, 2013). FRB of New York Staff Report No. 340, Available at SSRN: https://ssrn.com/abstract=1362586 or http://dx.doi.org/10.2139/ssrn.1362586
I would like to thank Emanuel Moench for sharing his original MATLAB code in order to perfectly replicate these results.
Citation
Gustavo Amarante (2025). pyacm: Python Implementation of the ACM Term Premium Model. Retrieved from https://github.com/gusamarante/pyacm
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyacm-1.1.tar.gz.
File metadata
- Download URL: pyacm-1.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58006cb5e6242c5c6c34c632363e258cad8852554711dddb73eedf4d6b65ec41
|
|
| MD5 |
86202d937f5fc078c230fa4b066b3708
|
|
| BLAKE2b-256 |
0a96cc8fd924a642e87f9a7471de5fdadd0bc62700160a48931cda9c31dd679d
|
Provenance
The following attestation bundles were made for pyacm-1.1.tar.gz:
Publisher:
publish.yml on gusamarante/pyacm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyacm-1.1.tar.gz -
Subject digest:
58006cb5e6242c5c6c34c632363e258cad8852554711dddb73eedf4d6b65ec41 - Sigstore transparency entry: 607733967
- Sigstore integration time:
-
Permalink:
gusamarante/pyacm@7dc37960451451e4b2ce6bf42fa144241540874e -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/gusamarante
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7dc37960451451e4b2ce6bf42fa144241540874e -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyacm-1.1-py3-none-any.whl.
File metadata
- Download URL: pyacm-1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e16bbfb9d84110b427e8c8b6b831a5083bf6f169620b97e763fde5a5ff20823a
|
|
| MD5 |
2e20fcba742078e8703fae1dc40db9a0
|
|
| BLAKE2b-256 |
2b53407f8fb5e12c6e086865f3b2934a304aa51b7c9bb1ff464a889714e335f5
|
Provenance
The following attestation bundles were made for pyacm-1.1-py3-none-any.whl:
Publisher:
publish.yml on gusamarante/pyacm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyacm-1.1-py3-none-any.whl -
Subject digest:
e16bbfb9d84110b427e8c8b6b831a5083bf6f169620b97e763fde5a5ff20823a - Sigstore transparency entry: 607733972
- Sigstore integration time:
-
Permalink:
gusamarante/pyacm@7dc37960451451e4b2ce6bf42fa144241540874e -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/gusamarante
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7dc37960451451e4b2ce6bf42fa144241540874e -
Trigger Event:
release
-
Statement type: