Giter Site home page Giter Site logo

chitowntimmy23 / pyfolio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quantopian/pyfolio

0.0 2.0 0.0 86.27 MB

Portfolio and risk analytics in Python

Home Page: https://quantopian.github.io/pyfolio

License: Apache License 2.0

Shell 0.01% Batchfile 0.01% Python 3.30% Jupyter Notebook 96.70%

pyfolio's Introduction

pyfolio

pyfolio

Join the chat at https://gitter.im/quantopian/pyfolio build status

pyfolio is a Python library for performance and risk analysis of financial portfolios developed by Quantopian Inc. It works well with the Zipline open source backtesting library.

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 simple tear 1

Also see slides of a talk about pyfolio.

Installation

To install pyfolio, run:

pip install pyfolio

Development

For development, you may 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:

mkvirtualenv pyfolio

Next, clone this git repository and run python setup.py develop and edit the library files directly.

Bayesian tear sheet

Generating a Bayesian tearsheet requires PyMC3 and Theano. You can install these packages with the following commands:

pip install theano
pip install pymc3

Matplotlib on OSX

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

Usage

A good way to get started is to run the pyfolio examples in a Jupyter notebook. To do this, you first want to start a Jupyter notebook server:

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 in this repository.

You can also join our mailing list or our Gitter channel.

Contributing

If you'd like to contribute, a great place to look is the issues marked with help-wanted.

For a list of core developers and outside collaborators, see the GitHub contributors list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.