Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quantopian/alphalens
Performance analysis of predictive (alpha) stock factors
https://github.com/quantopian/alphalens
algorithmic-trading finance jupyter numpy pandas python
Last synced: 28 days ago
JSON representation
Performance analysis of predictive (alpha) stock factors
- Host: GitHub
- URL: https://github.com/quantopian/alphalens
- Owner: quantopian
- License: apache-2.0
- Created: 2016-06-03T21:49:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-12T06:44:22.000Z (9 months ago)
- Last Synced: 2024-04-16T07:16:20.432Z (7 months ago)
- Topics: algorithmic-trading, finance, jupyter, numpy, pandas, python
- Language: Jupyter Notebook
- Homepage: http://quantopian.github.io/alphalens
- Size: 86.4 MB
- Stars: 3,071
- Watchers: 166
- Forks: 1,096
- Open Issues: 47
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-python-machine-learning-resources - GitHub - 20% open · ⏱️ 27.04.2020): (金融数据处理)
- awesome-quant - alphalens - Performance analysis of predictive alpha factors. (Python / Factor Analysis)
- awesome-quant - alphalens - Performance analysis of predictive alpha factors. (Python / Factor Analysis)
- awesome-ai-in-finance - alphalens - Performance analysis of predictive (alpha) stock factors. (Research Tools / Arbitrage)
- StarryDivineSky - quantopian/alphalens
README
.. image:: https://media.quantopian.com/logos/open_source/alphalens-logo-03.png
:align: centerAlphalens
=========
.. image:: https://github.com/quantopian/alphalens/workflows/CI/badge.svg
:alt: GitHub Actions status
:target: https://github.com/quantopian/alphalens/actions?query=workflow%3ACI+branch%3AmasterAlphalens is a Python Library for performance analysis of predictive
(alpha) stock factors. Alphalens works great with the
`Zipline `__ open source backtesting library, and
`Pyfolio `__ which provides
performance and risk analysis of financial portfolios. You can try Alphalens
at `Quantopian `_ -- a free,
community-centered, hosted platform for researching and testing alpha ideas.
Quantopian also offers a `fully managed service for professionals `_
that includes Zipline, Alphalens, Pyfolio, FactSet data, and more.The main function of Alphalens is to surface the most relevant statistics
and plots about an alpha factor, including:- Returns Analysis
- Information Coefficient Analysis
- Turnover Analysis
- Grouped AnalysisGetting started
---------------With a signal and pricing data creating a factor "tear sheet" is a two step process:
.. code:: python
import alphalens
# Ingest and format data
factor_data = alphalens.utils.get_clean_factor_and_forward_returns(my_factor,
pricing,
quantiles=5,
groupby=ticker_sector,
groupby_labels=sector_names)# Run analysis
alphalens.tears.create_full_tear_sheet(factor_data)Learn more
----------Check out the `example notebooks `__ for more on how to read and use
the factor tear sheet. A good starting point could be `this `__Installation
------------Install with pip:
::
pip install alphalens
Install with conda:
::
conda install -c conda-forge alphalens
Install from the master branch of Alphalens repository (development code):
::
pip install git+https://github.com/quantopian/alphalens
Alphalens depends on:
- `matplotlib `__
- `numpy `__
- `pandas `__
- `scipy `__
- `seaborn `__
- `statsmodels `__Usage
-----A good way to get started is to run the examples in a `Jupyter
notebook `__.To get set up with an example, you can:
Run a Jupyter notebook server via:
.. code:: bash
jupyter notebook
From the notebook list page(usually found at
``http://localhost:8888/``), navigate over to the examples directory,
and open any file with a .ipynb extension.Execute the code in a notebook cell by clicking on it and hitting
Shift+Enter.Questions?
----------If you find a bug, feel free to open an issue on our `github
tracker `__.Contribute
----------If you want to contribute, a great place to start would be the
`help-wanted
issues `__.Credits
-------- `Andrew Campbell `__
- `James Christopher `__
- `Thomas Wiecki `__
- `Jonathan Larkin `__
- Jessica Stauth ([email protected])
- `Taso Petridis `_For a full list of contributors see the `contributors page. `_
Example Tear Sheet
------------------Example factor courtesy of `ExtractAlpha `_
.. image:: https://github.com/quantopian/alphalens/raw/master/alphalens/examples/table_tear.png
.. image:: https://github.com/quantopian/alphalens/raw/master/alphalens/examples/returns_tear.png
.. image:: https://github.com/quantopian/alphalens/raw/master/alphalens/examples/ic_tear.png
.. image:: https://github.com/quantopian/alphalens/raw/master/alphalens/examples/sector_tear.png
:alt: