# alphalens **Repository Path**: kchen032/alphalens ## Basic Information - **Project Name**: alphalens - **Description**: Performance analysis of predictive (alpha) stock factors - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-22 - **Last Updated**: 2021-11-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README .. image:: https://media.quantopian.com/logos/open_source/alphalens-logo-03.png :align: center Alphalens ========= .. image:: https://travis-ci.org/quantopian/alphalens.svg?branch=master :target: https://travis-ci.org/quantopian/alphalens Alphalens 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. 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 Analysis Getting 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. Installation ------------ :: 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 (jstauth@quantopian.com) - `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: