{"id":13740588,"url":"https://github.com/stefan-jansen/pyfolio-reloaded","last_synced_at":"2025-05-08T20:32:05.112Z","repository":{"id":40363036,"uuid":"341360629","full_name":"stefan-jansen/pyfolio-reloaded","owner":"stefan-jansen","description":"Portfolio and risk analytics in Python","archived":false,"fork":true,"pushed_at":"2024-09-26T01:35:57.000Z","size":99445,"stargazers_count":451,"open_issues_count":10,"forks_count":131,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-04-19T15:21:05.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pyfolio.ml4trading.io/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"quantopian/pyfolio","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-22T22:53:50.000Z","updated_at":"2025-04-11T05:39:01.000Z","dependencies_parsed_at":"2023-02-09T17:31:22.573Z","dependency_job_id":null,"html_url":"https://github.com/stefan-jansen/pyfolio-reloaded","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Fpyfolio-reloaded","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Fpyfolio-reloaded/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Fpyfolio-reloaded/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-jansen%2Fpyfolio-reloaded/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefan-jansen","download_url":"https://codeload.github.com/stefan-jansen/pyfolio-reloaded/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253144927,"owners_count":21861151,"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-08-03T04:00:50.183Z","updated_at":"2025-05-08T20:32:04.219Z","avatar_url":"https://github.com/stefan-jansen.png","language":"Jupyter Notebook","funding_links":[],"categories":["Python","Curated List","Python：量化金融第一生态"],"sub_categories":["Risk Analysis","Analytics","五、投资组合优化与风险分析"],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://pyfolio.ml4trading.io\"\u003e\n\u003cimg src=\"https://i.imgur.com/GD6TZ0D.png\" width=\"35%\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n![PyPI](https://img.shields.io/pypi/v/pyfolio-reloaded)\n[![Tests](https://github.com/stefan-jansen/pyfolio-reloaded/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/stefan-jansen/pyfolio-reloaded/actions/workflows/unit_tests.yml)\n[![conda](https://github.com/stefan-jansen/pyfolio-reloaded/actions/workflows/conda_package.yml/badge.svg)](https://github.com/stefan-jansen/pyfolio-reloaded/actions/workflows/conda_package.yml)\n[![PyPI](https://github.com/stefan-jansen/pyfolio-reloaded/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/stefan-jansen/pyfolio-reloaded/actions/workflows/build_wheels.yml)\n[![Coverage Status](https://coveralls.io/repos/github/stefan-jansen/pyfolio-reloaded/badge.svg?branch=main)](https://coveralls.io/github/stefan-jansen/pyfolio-reloaded?branch=main)\n![GitHub issues](https://img.shields.io/github/issues/stefan-jansen/pyfolio-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\npyfolio is a Python library for performance and risk analysis of financial portfolios that works well with the [Zipline](https://zipline.ml4trading.io/) open source backtesting library.\n\n## Trading Strategy Analysis with pyfolio\n\nAt the core of pyfolio are various tear sheets that combine various individual plots and summary statistics to\nprovide a comprehensive view of the performance of a trading algorithm.\n\nHere's an example of a simple tear sheet analyzing a strategy executed with the Zipline backtesting engine:\n\n### Performance Metrics\n\nThe tear sheet presents performance and risk metrics for the strategy separately during the backtest and out-of-sample periods:\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#\"\u003e\n\u003cimg src=\"https://i.imgur.com/bfwMeIV.png\" width=\"50%\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n### Performance Plots\n\nIn addition, it visualizes how several risk and return metrics behave over time:\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#\"\u003e\n\u003cimg src=\"https://i.imgur.com/5Hyuet3.png\" width=\"85%\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\nTo install pyfolio, run:\n\n```bash\npip install pyfolio-reloaded\n```\nor\n\n```bash\nconda install -c ml4t pyfolio-reloaded\n```\n\n#### Development\n\nFor development, you may want to use a [virtual environment](https://docs.python-guide.org/en/latest/dev/virtualenvs/) to avoid dependency conflicts between pyfolio and other Python projects you have.\n\nTo get set up with a virtual env, run:\n```bash\nmkvirtualenv pyfolio\n```\n\nNext, clone this git repository and run `python -m pip install .[all]` and edit the library files directly.\n\n## Usage\n\nA good way to get started is to run the pyfolio examples in a\n[Jupyter notebook](https://jupyter.org/). To do this, you first want to\nstart a Jupyter notebook server:\n\n```bash\njupyter notebook\n```\n\nFrom the notebook list page, navigate to the pyfolio examples directory\nand open a notebook. Execute the code in a notebook cell by clicking on it\nand hitting Shift+Enter.\n\n\n## Questions?\n\nIf you find a bug, feel free to [open an issue](https://github.com/stefan-jansen/pyfolio-reloaded/issues) in this repository.\n\nYou can also join our [community](https://exchange.ml4trading.io).\n\n## Support\n\nPlease [open an issue](https://github.com/stefan-jansen/pyfolio-reloaded/issues/new) for support.\n\n## Contributing\n\nIf you'd like to contribute, a great place to look is the [issues marked with help-wanted](https://github.com/stefan-jansen/pyfolio-reloaded/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).\n\nFor a list of core developers and outside collaborators, see [the GitHub contributors list](https://github.com/stefan-jansen/pyfolio-reloaded/graphs/contributors).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-jansen%2Fpyfolio-reloaded","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefan-jansen%2Fpyfolio-reloaded","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-jansen%2Fpyfolio-reloaded/lists"}