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::

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.

Status

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

Documentation

The documentation is at readthedocs.

Contributing

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.

License

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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file margot-1.13.tar.gz.

File metadata

  • Download URL: margot-1.13.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for margot-1.13.tar.gz
Algorithm Hash digest
SHA256 c32a59ef072f274a974bc7edb23d25d30685e9296bd658c8f7bc5b28f49996d6
MD5 40fdc33c4616923d4a25d051c855a61a
BLAKE2b-256 ea16d1db37c2b0d80eb1bd36f82dfd32abf1ba404f22d4554ef2d3f5fc8ea267

See more details on using hashes here.

File details

Details for the file margot-1.13-py2.py3-none-any.whl.

File metadata

  • Download URL: margot-1.13-py2.py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for margot-1.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 76e47f52348338a294d428e0e9a71656a9bef637150d9c3feb91c2d9c2ba934c
MD5 60beb4aaeeb6b61b797a709b1a9cb9cd
BLAKE2b-256 fc000c58329f8c51b107706e00a4f2bca0ca0f088015a01e257ca66a87e7efc8

See more details on using hashes here.

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