famafrench - Package Documentation

Toolbox for constructing and replicating datasets from Ken French’s online data library by accessing WRDS remotely through its cloud server.

famafrench’s current efficient performance results from features such as the use of a least recently used (LRU) cache implemented using Python’s functools.lru_cache().

Future plans are to continue to expand the toolbox to include additional factor-based datasets relevant for empirical asset pricing. These include the following:

Please reach out if you have any recommendations or suggestions for improvements. Collaborations are welcomed - reach out at chris.jauregui@berkeley.edu!


  • What’s New?!

  • Getting Started

  • Applications and Examples

  • Connecting to the WRDS cloud server

  • WRDS Query Tools

  • Estimating Market Betas and Rolling Residual Variances

  • Constructing Portfolios and Return-Based Factors

  • Comparing to Ken French’s Online Library

  • Summary Statistics and Diagnostics

  • Auxiliary Functions and Utilities

  • API Reference

  • Change Log

How to Cite

This package (and its release as of April 20, 2020) should be cited using fishare. For example, for the 0.1.0 release,

[*] Jauregui, Christian (2020): famafrench Python library. Release 0.1.0 (Version 0.1.0). figshare. Software. https://doi.org/10.6084/m9.figshare.12170439




Ken French’s data library documentation notes the following regarding the construction of their daily portfolio returns:

  • In May 2015, we made two changes in the way we compute daily portfolio returns so the process is closer to the way we compute monthly portfolio returns. In daily files produced in May 2015 or thereafter, stocks are dropped from a portfolio immediately after their CRSP delist date; in files produced before May 2015, those stocks are held until the portfolio is reconstituted, at the end of June. Also, in daily files produced before May 2015 we exclude a stock from portfolios during any period in which it is missing prices for more than 10 consecutive trading no price for more than 200 consecutive trading days.

Future versions will verify the aforementioned adjustments are accounted for in the package’s construction of daily portfolio returns.


To improve the statistical metrics, adjustments in how the aforementioned anomaly characteristics are computed or estimated will be incorporated in future releases.

Indices and Tables