empfin is a Python toolkit for empirical asset pricing models and risk premia estimation. This library is in active development and aims to implement models from all corners of the literature.
Currently available models for estimation of risk premia:
TimeseriesReg: single-pass OLS time-series regression, described in Cochrane (2005), Section 12.1CrossSectionReg: two-pass cross-sectional regression, described in Cochrane (2005), Section 12.2NonTradableFactors: iterative maximum-likelihood estimator for non-tradable factors, described in Campbell, Lo & MacKinlay (2012), Section 6.2.3RiskPremiaTermStructure: term structure of risk premia with a single factor, tradable or not, following Bryzgalova, Huang & Julliard (2024). I would like to thank the authors for sharing their replication files.
For each model, there is a jupyter notebook with examples of their use.
pip install empfinBryzgalova, Huang, and Julliard (2024) “Macro Strikes Back: Term Structure of Risk Premia” Working Paper
Cochrane (2005) "Asset Pricing: Revised Edition". Princeton University Press.
Campbell, Lo, and MacKinlay (2012) "The Econometrics of Financial Markets"
Gustavo Amarante (2026). empfin - Empirical Finance Tools in Python. Retrieved from https://github.com/gusamarante/empfin