Margot Documentation

https://api.codacy.com/project/badge/Grade/1d42c486297a49158494e5f31b25793b https://img.shields.io/github/license/pymargot/margot https://travis-ci.org/pymargot/margot.svg https://readthedocs.org/projects/margot/badge/?version=latest https://codecov.io/gh/pymargot/margot/branch/master/graph/badge.svg https://img.shields.io/pypi/wheel/margot https://img.shields.io/pypi/pyversions/margot https://img.shields.io/pypi/v/margot

Margot makes it super easy to backtest trading elgorithms. Firstly, Margot makes it super easy tocreate neat and tidy Pandas dataframes for time-series analysis.

Margot manages data collection, caching, cleaning, feature generation, management and persistence using a clean, declarative API. If you’ve ever used Django you will find this approach similar to the Django ORM.

Margot also provides a simple framework for writing and backtesting systematic trading algorithms.

Results from margot’s trading algorithms can be analysed using pyfolio.

To get started:

pip install margot

Next you need to make sure you have a couple of important environment variables set:

export ALPHAVANTAGE_API_KEY=YOUR_API_KEY
export DATA_CACHE=PATH_TO_FOLDER_TO_STORE_HDF5_FILES

Once you’ve done that, try running the code in the notebook.