{"id":17082282,"url":"https://github.com/stefan-jansen/alphalens-reloaded","last_synced_at":"2026-05-21T12:30:16.916Z","repository":{"id":39701741,"uuid":"341661949","full_name":"stefan-jansen/alphalens-reloaded","owner":"stefan-jansen","description":"Performance analysis of predictive (alpha) stock factors","archived":false,"fork":true,"pushed_at":"2024-09-26T09:36:55.000Z","size":130912,"stargazers_count":351,"open_issues_count":2,"forks_count":80,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-01-22T14:46:47.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://alphalens.ml4trading.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"quantopian/alphalens","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefan-jansen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-23T19:11:27.000Z","updated_at":"2025-01-19T15:44:45.000Z","dependencies_parsed_at":"2023-02-09T17:31:28.601Z","dependency_job_id":null,"html_url":"https://github.com/stefan-jansen/alphalens-reloaded","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Falphalens-reloaded","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Falphalens-reloaded/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Falphalens-reloaded/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Falphalens-reloaded/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefan-jansen","download_url":"https://codeload.github.com/stefan-jansen/alphalens-reloaded/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240131743,"owners_count":19752725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T13:00:24.287Z","updated_at":"2026-05-21T12:30:16.830Z","avatar_url":"https://github.com/stefan-jansen.png","language":"Python","funding_links":[],"categories":["Recently Updated","Curated List","Python","Python：量化金融第一生态"],"sub_categories":["[Oct 14, 2024](/content/2024/10/14/README.md)","Analytics","Factor Analysis","三、技术指标与因子分析"],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://alphalens.ml4trading.io\"\u003e\n\u003cimg src=\"https://i.imgur.com/uf8PmQO.png\" width=\"35%\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n![PyPI](https://img.shields.io/pypi/v/alphalens-reloaded)\n[![Anaconda](https://github.com/stefan-jansen/alphalens-reloaded/actions/workflows/conda_package.yml/badge.svg)](https://github.com/stefan-jansen/alphalens-reloaded/actions/workflows/conda_package.yml)\n[![Tests](https://github.com/stefan-jansen/alphalens-reloaded/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/stefan-jansen/alphalens-reloaded/actions/workflows/unit_tests.yml)\n[![PyPI](https://github.com/stefan-jansen/alphalens-reloaded/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/stefan-jansen/alphalens-reloaded/actions/workflows/build_wheels.yml)\n[![Coverage Status](https://coveralls.io/repos/github/stefan-jansen/alphalens-reloaded/badge.svg?branch=main)](https://coveralls.io/github/stefan-jansen/alphalens-reloaded?branch=main)\n![GitHub issues](https://img.shields.io/github/issues/stefan-jansen/alphalens-reloaded)\n![PyPI - License](https://img.shields.io/pypi/l/alphalens-reloaded)\n![Discourse users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fexchange.ml4trading.io%2F)\n![Twitter Follow](https://img.shields.io/twitter/follow/ml4trading?style=social)\n\nAlphalens is a Python library for performance analysis of predictive\n(alpha) stock factors. Alphalens works great with the\n[Zipline](https://www.zipline.ml4trading.io/) open source backtesting library, and [Pyfolio](https://github.com/quantopian/pyfolio) which provides performance and risk analysis of financial portfolios.\n\nThe main function of Alphalens is to surface the most relevant statistics and plots about an alpha factor, including:\n\n- Returns Analysis\n- Information Coefficient Analysis\n- Turnover Analysis\n- Grouped Analysis\n\n# Getting started\n\nWith a signal and pricing data creating a factor \\\"tear sheet\\\" is a two step process:\n\n```python\nimport alphalens\n\n# Ingest and format data\nfactor_data = alphalens.utils.get_clean_factor_and_forward_returns(my_factor,\n                                                                   pricing,\n                                                                   quantiles=5,\n                                                                   groupby=ticker_sector,\n                                                                   groupby_labels=sector_names)\n\n# Run analysis\nalphalens.tears.create_full_tear_sheet(factor_data)\n```\n\n# Learn more\n\nCheck out the [example notebooks](https://github.com/stefan-jansen/alphalens-reloaded/tree/master/alphalens/examples)\nfor more on how to read and use the factor tear sheet.\n\n# Installation\n\nInstall with pip:\n\n    pip install alphalens-reloaded\n\nInstall with conda:\n\n    conda install -c ml4t alphalens-reloaded\n\nInstall from the master branch of Alphalens repository (development code):\n\n    pip install git+https://github.com/stefan-jansen/alphalens-reloaded\n\nAlphalens depends on:\n\n- [matplotlib](https://github.com/matplotlib/matplotlib)\n- [numpy](https://github.com/numpy/numpy)\n- [pandas](https://github.com/pandas-dev/pandas)\n- [scipy](https://github.com/scipy/scipy)\n- [seaborn](https://github.com/mwaskom/seaborn)\n- [statsmodels](https://github.com/statsmodels/statsmodels)\n\n\u003e Note that Numpy\u003e=2.0 requires pandas\u003e=2.2.2. If you are using an older version of pandas, you may need to upgrade\n\u003e accordingly, otherwise you may encounter compatibility issues.\n\n# Usage\n\nA good way to get started is to run the examples in a [Jupyter notebook](https://jupyter.org/).\n\nTo get set up with an example, you can:\n\nRun a Jupyter notebook server via:\n\n```bash\njupyter notebook\n```\n\nFrom the notebook list page(usually found at `http://localhost:8888/`), navigate over to the examples directory, and open any file with a .ipynb extension.\n\nExecute the code in a notebook cell by clicking on it and hitting Shift+Enter.\n\n# Questions?\n\nIf you find a bug, feel free to open an issue on our [github tracker](https://github.com/stefan-jansen/alphalens-reloaded/issues).\n\n# Contribute\n\nIf you want to contribute, a great place to start would be the\n[help-wanted issues](https://github.com/stefan-jansen/alphalens-reloaded/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).\n\n# Credits\n\n- [Andrew Campbell](https://github.com/a-campbell)\n- [James Christopher](https://github.com/jameschristopher)\n- [Thomas Wiecki](https://github.com/twiecki)\n- [Jonathan Larkin](https://github.com/marketneutral)\n- Jessica Stauth (\u003cjstauth@quantopian.com\u003e)\n- [Taso Petridis](https://github.com/tasopetridis)\n\nFor a full list of contributors see the [contributors page.](https://github.com/stefan-jansen/alphalens-reloaded/graphs/contributors)\n\n# Example Tear Sheets\n\nExample factor courtesy of [ExtractAlpha](https://extractalpha.com/)\n\n## Peformance Metrics Tables\n\n![image](https://i.imgur.com/4T8cziG.png)\n\n## Returns Tear Sheet\n\n![image](https://i.imgur.com/aVs3KiM.png)\n\n## Information Coefficient Tear Sheet\n\n![image](https://i.imgur.com/vAm8okb.png)\n\n## Sector Tear Sheet\n\n![image](https://i.imgur.com/pnBs0ta.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-jansen%2Falphalens-reloaded","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefan-jansen%2Falphalens-reloaded","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-jansen%2Falphalens-reloaded/lists"}