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.1.tar.gz
.
File metadata
- Download URL: bayesfm-0.2.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4edec719f2464d55e6e2e61485c67d078534704b57715472a56557b67213d89 |
|
MD5 | bb1427f5fa0b91e96a8e73d9bdcb7796 |
|
BLAKE2b-256 | e9383c13ca88ef1e1ed1cc166d472621956f5200f09ff159c58840f63f7bcbc8 |
Provenance
The following attestation bundles were made for bayesfm-0.2.1.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.1.tar.gz
- Subject digest:
c4edec719f2464d55e6e2e61485c67d078534704b57715472a56557b67213d89
- Sigstore transparency entry: 147568883
- Sigstore integration time:
- Predicate type:
File details
Details for the file bayesfm-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: bayesfm-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.1 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 | e3195023519ce4ccab45b5e31197a8737fb88b955509fdd4e75a6776a39ced36 |
|
MD5 | 1347f214f9f37cd3f8675dab9cc922b5 |
|
BLAKE2b-256 | 0baa880c29792e4daaf2ac97118e1105a7e386bc6f3ecd746ffc232b167d4e2a |
Provenance
The following attestation bundles were made for bayesfm-0.2.1-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.1-py3-none-any.whl
- Subject digest:
e3195023519ce4ccab45b5e31197a8737fb88b955509fdd4e75a6776a39ced36
- Sigstore transparency entry: 147568884
- Sigstore integration time:
- Predicate type: