Skip to main content

An algorithmic trading framework for PyData.

Project description

What is 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.

Getting Started

pip install margot

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


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


This is still an early stage software project, and should not be used for live trading just yet.


The documentation is at readthedocs.


Feel free to make a pull request or chat about your idea first using issues.

Dependencies are kept to a minimum. Generally if there's a way to do something in the standard library (or numpy / Pandas), let's do it that way rather than add another library.


Margot is licensed for use under Apache 2.0. For details see the License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

margot-1.13.tar.gz (42.2 kB view hashes)

Uploaded Source

Built Distribution

margot-1.13-py2.py3-none-any.whl (34.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page