famafrench
is a Python library package designed to replicate and construct datasets from
Ken French's online data library
via remote access to the wrds-cloud
by querying CRSP,
Compustat Fundamentals Annual, and other datafiles.
This module uses the WRDS-Py
library package to extract data from CRPS, Compustat Fundamentals Annual, and other datafiles via the cloud
for use with the Pandas-Py
package.
famafrench
's current efficient performance results from features such as the use of a least recently used (LRU) cache implemented using the Python decorator
functools.lru_cache
.
Metric | |
---|---|
Supports | Python 3.4+ |
Latest Release | |
Code Quality | |
Citation | |
License | |
Documentation | |
Contributing | |
HitCount! |
famafrench
is best explored by going through applications and examples provided in the released documentation hosted on Github Pages.
Module | Description |
---|---|
famafrench.py |
Main module w/ tools for constructing and replicating datasets from Ken French’s online library via queries to WRDS. |
utils.py |
Auxiliary functions and utilities for use in the main module famafrench.py . |
wrdsconnect.py |
Enables remote connection to wrds-cloud largely building on the Connection() class in the WRDS-Py library. |
version.py |
Module w/ package's version number. |
The latest release is Release 0.1.4 as of May 12, 2020 (see documentation).
Releases are available via PyPI and can be installed with pip
.
pip install famafrench
Conda users will soon be able to install from my Anaconda channel. Stay tuned.
famafrench
relies on a suite of Python libraries, which include Python's scientific computing stack (e.g. NumPy and Pandas). Other dependencies include Numba and SQLAlchemy.
Please see setup.py
or requirements.txt
for specific version threshold requirements.
Released documentation is hosted on Github Pages. Look out for future updated documentation from my master branch hosted on Github.
I welcome recommendations, contributions and/or future collaborations. I am ambitious and plan to expand the module to include construction of additional factor-based datasets relevant for empirical asset pricing. These include the following:
-
- 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)
Performance and speed improvements are also appreciated.
Please report any bugs or errors to my github page or please send me an email at chris.jauregui@berkeley.edu.
For in-depth call syntaxes, please see the source code doctrings.
This library and its affiliated content was created without any involvement by Kenneth R. French and Eugene F. Fama.