Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quantopian/pyfolio
Portfolio and risk analytics in Python
https://github.com/quantopian/pyfolio
Last synced: 21 days ago
JSON representation
Portfolio and risk analytics in Python
- Host: GitHub
- URL: https://github.com/quantopian/pyfolio
- Owner: quantopian
- License: apache-2.0
- Created: 2015-06-01T15:31:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-23T06:14:58.000Z (11 months ago)
- Last Synced: 2024-04-16T07:16:21.712Z (7 months ago)
- Language: Jupyter Notebook
- Homepage: https://quantopian.github.io/pyfolio
- Size: 83.8 MB
- Stars: 5,414
- Watchers: 302
- Forks: 1,706
- Open Issues: 161
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-quant-cn - pyfolio - - Quantopian开源的用图形表示的金融投资组合性能和风险分析的Python库,可以参考[full_tear_sheet_example.ipynb](https://github.com/quantopian/pyfolio/blob/master/pyfolio/examples/full_tear_sheet_example.ipynb) (指标&风险分析)
- awesome-systematic-trading - pyfolio - with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg) | (Analytics / Risk)
- awesome-systematic-trading - pyfolio - Portfolio and risk analytics in Python (Analytic tools / Risk)
- awesome-fintech - pyfolio - Portfolio and risk analytics in Python. (Libraries / Python)
- awesome-fintech - pyfolio - portfolio and risk analytics in Python (Other)
- awesome-python-machine-learning-resources - GitHub - 34% open · ⏱️ 15.07.2020): (金融数据处理)
- awesome-quant - pyfolio - Portfolio and risk analytics in Python. (Python / Risk Analysis)
- awesome-quant - pyfolio - Portfolio and risk analytics in Python. (Python / Risk Analysis)
- awesome-ai-in-finance - pyfolio - Portfolio and risk analytics in Python. (Research Tools / Arbitrage)
- StarryDivineSky - quantopian/pyfolio
README
![pyfolio](https://media.quantopian.com/logos/open_source/pyfolio-logo-03.png "pyfolio")
# pyfolio
[![Join the chat at https://gitter.im/quantopian/pyfolio](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/quantopian/pyfolio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![build status](https://travis-ci.org/quantopian/pyfolio.png?branch=master)](https://travis-ci.org/quantopian/pyfolio)pyfolio is a Python library for performance and risk analysis of
financial portfolios developed by
[Quantopian Inc](https://www.quantopian.com). It works well with the
[Zipline](https://www.zipline.io/) open source backtesting library.
Quantopian also offers a [fully managed service for professionals](https://factset.quantopian.com)
that includes Zipline, Alphalens, Pyfolio, FactSet data, and more.At the core of pyfolio is a so-called tear sheet that consists of
various individual plots that provide a comprehensive image of the
performance of a trading algorithm. Here's an example of a simple tear
sheet analyzing a strategy:![simple tear 0](https://github.com/quantopian/pyfolio/raw/master/docs/simple_tear_0.png "Example tear sheet created from a Zipline algo")
![simple tear 1](https://github.com/quantopian/pyfolio/raw/master/docs/simple_tear_1.png "Example tear sheet created from a Zipline algo")Also see [slides of a talk about
pyfolio](https://nbviewer.jupyter.org/format/slides/github/quantopian/pyfolio/blob/master/pyfolio/examples/pyfolio_talk_slides.ipynb#/).## Installation
To install pyfolio, run:
```bash
pip install pyfolio
```#### Development
For 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. To get set up with a virtual env, run:
```bash
mkvirtualenv pyfolio
```Next, clone this git repository and run `python setup.py develop`
and edit the library files directly.#### Matplotlib on OSX
If you are on OSX and using a non-framework build of Python, you may need to set your backend:
``` bash
echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc
```## Usage
A good way to get started is to run the pyfolio examples in
a [Jupyter notebook](https://jupyter.org/). To do this, you first want to
start a Jupyter notebook server:```bash
jupyter notebook
```From the notebook list page, navigate to the pyfolio examples directory
and open a notebook. 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](https://github.com/quantopian/pyfolio/issues) in this repository.
You can also join our [mailing list](https://groups.google.com/forum/#!forum/pyfolio) or
our [Gitter channel](https://gitter.im/quantopian/pyfolio).## Support
Please [open an issue](https://github.com/quantopian/pyfolio/issues/new) for support.
## Contributing
If you'd like to contribute, a great place to look is the [issues marked with help-wanted](https://github.com/quantopian/pyfolio/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
For a list of core developers and outside collaborators, see [the GitHub contributors list](https://github.com/quantopian/pyfolio/graphs/contributors).