Metadata-Version: 2.1
Name: pyfolio-reloaded
Version: 0.9.4
Summary: pyfolio is a Python library for performance and risk analysis of financial portfolios
Home-page: https://pyfolio.ml4trading.io
Author: Quantopian Inc
Maintainer: Applied AI, LLC
License: Apache License, Version 2.0
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipython (>=3.2.3)
Requires-Dist: matplotlib (>=1.4.0)
Requires-Dist: numpy (>=1.11.1)
Requires-Dist: pandas (>=0.18.1)
Requires-Dist: pytz (>=2014.10)
Requires-Dist: scipy (>=0.14.0)
Requires-Dist: scikit-learn (>=0.16.1)
Requires-Dist: seaborn (>=0.7.1)
Requires-Dist: empyrical-reloaded (>=0.5.8)
Provides-Extra: all
Requires-Dist: Cython ; extra == 'all'
Requires-Dist: Sphinx (>=1.3.2) ; extra == 'all'
Requires-Dist: numpydoc (>=0.5.0) ; extra == 'all'
Requires-Dist: sphinx-autobuild (>=0.6.0) ; extra == 'all'
Requires-Dist: pydata-sphinx-theme ; extra == 'all'
Requires-Dist: sphinx-markdown-tables ; extra == 'all'
Requires-Dist: sphinx-copybutton ; extra == 'all'
Requires-Dist: m2r2 ; extra == 'all'
Requires-Dist: flake8 (>=3.9.1) ; extra == 'all'
Requires-Dist: black ; extra == 'all'
Requires-Dist: pre-commit (>=2.12.1) ; extra == 'all'
Requires-Dist: tox (>=2.3.1) ; extra == 'all'
Requires-Dist: coverage (>=4.0.3) ; extra == 'all'
Requires-Dist: coveralls (==3.0.1) ; extra == 'all'
Requires-Dist: pytest (>=6.2) ; extra == 'all'
Requires-Dist: pytest-cov (>=2.12) ; extra == 'all'
Requires-Dist: parameterized (>=0.6.1) ; extra == 'all'
Provides-Extra: dev
Requires-Dist: flake8 (>=3.9.1) ; extra == 'dev'
Requires-Dist: black ; extra == 'dev'
Requires-Dist: pre-commit (>=2.12.1) ; extra == 'dev'
Provides-Extra: doc
Requires-Dist: Cython ; extra == 'doc'
Requires-Dist: Sphinx (>=1.3.2) ; extra == 'doc'
Requires-Dist: numpydoc (>=0.5.0) ; extra == 'doc'
Requires-Dist: sphinx-autobuild (>=0.6.0) ; extra == 'doc'
Requires-Dist: pydata-sphinx-theme ; extra == 'doc'
Requires-Dist: sphinx-markdown-tables ; extra == 'doc'
Requires-Dist: sphinx-copybutton ; extra == 'doc'
Requires-Dist: m2r2 ; extra == 'doc'
Provides-Extra: test
Requires-Dist: tox (>=2.3.1) ; extra == 'test'
Requires-Dist: coverage (>=4.0.3) ; extra == 'test'
Requires-Dist: coveralls (==3.0.1) ; extra == 'test'
Requires-Dist: pytest (>=6.2) ; extra == 'test'
Requires-Dist: pytest-cov (>=2.12) ; extra == 'test'
Requires-Dist: parameterized (>=0.6.1) ; extra == 'test'
Requires-Dist: flake8 (>=3.9.1) ; extra == 'test'
Requires-Dist: black ; extra == 'test'

<p align="center">
<a href="https://pyfolio.ml4trading.io">
<img src="https://i.imgur.com/GD6TZ0D.png" width="35%">
</a>
</p>

![PyPI](https://img.shields.io/pypi/v/pyfolio-reloaded)
[![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)
[![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)
[![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)
[![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)
![GitHub issues](https://img.shields.io/github/issues/stefan-jansen/pyfolio-reloaded)
![Discourse users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fexchange.ml4trading.io%2F)
![Twitter Follow](https://img.shields.io/twitter/follow/ml4trading?style=social)

pyfolio 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.

## Trading Strategy Analysis with pyfolio

At the core of pyfolio are various tear sheets that combine various individual plots and summary statistics to
provide a comprehensive view of the performance of a trading algorithm.

Here's an example of a simple tear sheet analyzing a strategy executed with the Zipline backtesting engine:

### Performance Metrics

The tear sheet presents performance and risk metrics for the strategy separately during the backtest and out-of-sample periods:

<p align="center">
<a href="#">
<img src="https://i.imgur.com/bfwMeIV.png" width="50%">
</a>
</p>

### Performance Plots

In addition, it visualizes how several risk and return metrics behave over time:

<p align="center">
<a href="#">
<img src="https://i.imgur.com/5Hyuet3.png" width="85%">
</a>
</p>

## Installation

To install pyfolio, run:

```bash
pip install pyfolio-reloaded
```
or

```bash
conda install -c ml4t pyfolio-reloaded
```

#### 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 -m pip install .[all]` and edit the library files directly.

## 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/stefan-jansen/pyfolio-reloaded/issues) in this repository.

You can also join our [community](https://exchange.ml4trading.io).

## Support

Please [open an issue](https://github.com/stefan-jansen/pyfolio-reloaded/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/stefan-jansen/pyfolio-reloaded/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/stefan-jansen/pyfolio-reloaded/graphs/contributors).


