.. _overview: **************************************** ``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 :func:`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: - `AQR Capital Management's `_: * `Betting Against Beta` (BAB) * `Quality Minus Junk` (QMJ) * `Modified Value - High Minus Low` (HMLD) - `Lettau, Ludvigson, and Ma (2019) `_ Capital Share Factor: * `Capital Share of Aggregate Income` (KS) - `Pastor and Stambaugh (2003) `_ Liquidity Factors: * `Non-Traded Liquidity Factor` * `Traded Liquidity Factor` - `Sadka (2006) `_ Liquidity Factors: * `Fixed-Transitory Factor` * `Variable-Permanent Factor` - `Stambaugh and Yuan (2017) `_ `Clustered` Mispricing Factors: * `Management-related Factor` (MGMT) * `Performance-related Factor` (PERF) * `Mispricing (non-clustered) Factor` (UMO) Please reach out if you have any recommendations or suggestions for improvements. Collaborations are welcomed - reach out at **chris.jauregui@berkeley.edu**! Github repository with my source code can be found `here `_. Contents ======== - 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 .. toctree:: :maxdepth: 2 :hidden: 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 current release as of May 12, 2020) should be cited using Zenodo. For example, for the 0.1.4 release, [*] Christian Jauregui. (2020, May 12). christianjauregui/famafrench: Release 0.1.4 (Version 0.1.4). Zenodo. https://doi.org/10.5281/zenodo.3821150 .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3821150.svg :target: https://doi.org/10.5281/zenodo.3821150 ************ Disclaimer ************ This library and its affiliated content was created without **any involvement** by Kenneth R. French and Eugene F. Fama. ******************* `Todo` ******************* .. todo:: `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. .. todo:: * Include option to construct the `Fama and French (2018) `_ cash-based profitability factor, ``RMWc``. * Within the instance method used for constructing market betas and rolling residual variances, :meth:`FamaFrench.getFactorRegResults `, extend the `Dimson (1979) `_ methodology based on `Scholes and Williams (1977) `_ to other factor quantities of risk beyond the `market (CAPM)` beta (eg, `SMB` and `HML` quantities of risk). * Verify the `pandas-datareader `_ Python library is still unable to pull monthly and annual datafiles for the `Short-Term Reversal` or `Long-Term Reversal` Fama-French-style factors made public through `Ken French's online library `_. * When applicable, constructed portfolios, specifically portfolio returns, number of firms in each portfolio, and `average` anomaly portfolio characteristics are compared with those provided by Ken French for the same frequency and over the same period. The sample `Pearson correlations`, sample `means`, and sample `standard deviations` for the following portfolios **can be improved**: - `Portfolios Formed on Dividend Yield `_ - `6 Portfolios Formed on Size and Dividend Yield `_ - `Portfolios Formed on Accruals `_ - `25 Portfolios Formed on Size and Accruals `_ - `Portfolios Formed on Market Beta `_ - `25 Portfolios Formed on Size and Market Beta `_ To improve the statistical metrics, adjustments in how the aforementioned anomaly characteristics are computed or estimated will be incorporated in future releases. .. todo:: * `Recommendations by` `Martin Lettau `_: - Enable the user to query information for a selected set of individual stocks. For example, for **IBM**, the package could provide the user with returns at a given frequency over a given sample period, as well as firm characteristics (eg `market equity`, `book-to-market`, prior (2-12) `momentum` returns, `accruals`, etc). - In addition, the package could provide a list of all relevant firm characteristics for empirical asset pricing available through Compustat Fundamentals Annual. ******************* Indices and Tables ******************* * :ref:`genindex` * :ref:`modindex` * :ref:`search`