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 tear sheet analyzing returns, which comes from the Zipline algorithm sample notebook:
See also slides of a talk about pyfolio.
(Optional) Virtual Environment
For development on pyfolio itself, you might want to use a virtual environment to avoid dependency conflicts between
pyfolio and other python projects you have. To get set up with a virtual env, run:
before running the install commands below.
pip issue the following command:
pip install pyfolio
For development, clone the git repo and run
python setup.py develop
and edit the library files directly. Make sure to reload or restart
the IPython kernel when you make changes.
pyfolio has the following dependencies:
- pymc3 (optional)
- zipline (optional; requires master, not 0.7.0)
Some of Pyfolio's functionality, such as the Bayesian tearsheet, requires PyMC3 and Theano. To get set up, you can run:
pip install theano
pip install git+https://github.com/pymc-devs/pymc3
If you are on OSX and using a non-framework build of python you may need to set your backend:
echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc
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:
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.
If you find a bug, feel free to open an issue on our github tracker.
You can also join our mailing list.
If you want to contribute, a great place to start would be the help-wanted issues.
- Gus Gordon (firstname.lastname@example.org)
- Justin Lent (email@example.com)
- Sepideh Sadeghi (firstname.lastname@example.org)
- Thomas Wiecki (email@example.com)
- Jessica Stauth (firstname.lastname@example.org)
- Karen Rubin (email@example.com)
- David Edwards (firstname.lastname@example.org)
- Andrew Campbell (email@example.com)
For a full list of contributors, see https://github.com/quantopian/pyfolio/graphs/contributors.