Bayesian Fama-MacBeth Regressions
Project description
bayesfm - Bayesian Fama-MacBeth
Implementation of "Bayesian Fama-MacBeth Regressions" from Bryzgalova, Huang and Julliard (2024). As presented by the authors, this methodology provides reliable risk premia estimates for both tradable and nontradable factors, detects those weakly identified, delivers valid credible intervals for all objects of interest, and is intuitive, fast and simple to implement.
Installation
pip install bayesfm
Usage
There is a self-contained example file using the Fama-French 25 sorted portfolios and their 5 factors.
There are 3 classes available:
BFM
: Bayesian Fama-MacBethBFMGLS
: Bayesian Fama-MacBeth with the GLS precision matrix for the cross-sectional stepBFMOMIT
: Bayesian Fama-MacBeth with omitted factors- As noted by the authors, the use of this model requires us to include a sufficient number of latent factors in the cross-sectional step, which is chosen with the
p
argument of this class
- As noted by the authors, the use of this model requires us to include a sufficient number of latent factors in the cross-sectional step, which is chosen with the
All three class save the draws of all elements of interest as attributes, and have a method called plot_lambda
, which plots the posteriors of the risk premia parameters.
This method outputs the chart below, where the blue density are the posterior draws and the orange lines are the canonical Fama-MacBeth two-pass OLS regression estiamtes.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file bayesfm-0.2.2.tar.gz
.
File metadata
- Download URL: bayesfm-0.2.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc040dced74a59b6ea53112b361eb02722983072c3c6adfbcbead9c7dbccf1d |
|
MD5 | 2f61a47829c404be09f633634656ec74 |
|
BLAKE2b-256 | 0436759b38fbcb2ea2dc08502992c2464541eb12a1c60d7db448156a877046e3 |
Provenance
The following attestation bundles were made for bayesfm-0.2.2.tar.gz
:
Publisher:
publish.yml
on gusamarante/bayesfm
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bayesfm-0.2.2.tar.gz
- Subject digest:
2cc040dced74a59b6ea53112b361eb02722983072c3c6adfbcbead9c7dbccf1d
- Sigstore transparency entry: 148881178
- Sigstore integration time:
- Predicate type:
File details
Details for the file bayesfm-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: bayesfm-0.2.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97fb217d7797029be2224648a2fec3853be85c90c0d1bf04990fd0b5ffb7ad05 |
|
MD5 | 5ee97a3169e62fdef2ecacc2185da28e |
|
BLAKE2b-256 | cee0dff20d608010597de58284b24f05ff19af463bd7db4eadf49211bf662842 |
Provenance
The following attestation bundles were made for bayesfm-0.2.2-py3-none-any.whl
:
Publisher:
publish.yml
on gusamarante/bayesfm
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bayesfm-0.2.2-py3-none-any.whl
- Subject digest:
97fb217d7797029be2224648a2fec3853be85c90c0d1bf04990fd0b5ffb7ad05
- Sigstore transparency entry: 148881180
- Sigstore integration time:
- Predicate type: