Skip to main content

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
  • Hypothesis testing (Not sure if correct, more info observations below)

Instalation

pip install pyacm

Examples

The estimates for the US are available on the NY FED website.

The jupyter notebook example_br contains an example application to the Brazilian DI futures curve that showcases all the available methods.

DI Term Premium Observed VS Risk Neutral

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

The version of the article that was published by the NY FED is not 100% explicit on how the data is being manipulated, 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:

  • Data for zero yields uses monthly maturities starting from month 1
  • All principal components and model parameters are estiamted with data resampled to a monthly frequency, averaging observations in each month
  • To get daily / real-time estimates, the factor loadings estimated from the monthly frquency are used to transform the daily data

Usage

The tricky part of using this model is getting the correct data format:

  • The model works with 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.
  • 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.

Observations

I am not completely sure that computations in the inferences attributes are correct. If you find any mistakes, please open a pull request following the contributing guidelines.

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

pyacm-0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyacm-0.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file pyacm-0.3.tar.gz.

File metadata

  • Download URL: pyacm-0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyacm-0.3.tar.gz
Algorithm Hash digest
SHA256 71adffa50153892717b70dd20c02784f451782aa5e7c086ae727916ae30b25c0
MD5 de0ee89ac44c714544132f3d7f4161df
BLAKE2b-256 0c60ed444ed5dc0813762c71e8487eb2fb38a7a1dc2d6b1d2c6f47a27026ebc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyacm-0.3.tar.gz:

Publisher: publish.yml on gusamarante/pyacm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyacm-0.3-py3-none-any.whl.

File metadata

  • Download URL: pyacm-0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyacm-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f66fce77124908a7a569132438f71f67d666d84f405b32efadeb3d0d1393aef4
MD5 096e7086841825775d9667a6790d8e8f
BLAKE2b-256 a8cc0710ade519fc5364b1a2b1dd83825b1f68f48606e302abc244a23cd381f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyacm-0.3-py3-none-any.whl:

Publisher: publish.yml on gusamarante/pyacm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page