Skip to main content

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.

Metadata

Release files for margot 1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for margot 1.13
File Size Uploaded
margot-1.13.tar.gz 42.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for margot 1.13
File Interpreter ABI Platform
margot-1.13-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 76.7 kB

Release files / margot-1.13.tar.gz

Download URL margot-1.13.tar.gz
Size 42.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c32a59ef072f274a974bc7edb23d25d30685e9296bd658c8f7bc5b28f49996d6
BLAKE2b-256 checksum
How to use checksums
ea16d1db37c2b0d80eb1bd36f82dfd32abf1ba404f22d4554ef2d3f5fc8ea267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / margot-1.13-py2.py3-none-any.whl

Download URL margot-1.13-py2.py3-none-any.whl
Size 34.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
76e47f52348338a294d428e0e9a71656a9bef637150d9c3feb91c2d9c2ba934c
BLAKE2b-256 checksum
How to use checksums
fc000c58329f8c51b107706e00a4f2bca0ca0f088015a01e257ca66a87e7efc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.13 This release

2 release files

0.14

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12

2 release files

0.11.1

2 release files

0.11

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10

2 release files

0.9

2 release files

0.8.1

2 release files

0.8

2 release files

0.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6

2 release files

0.5.34

2 release files

0.5.33

2 release files

0.5.30

2 release files

0.5.28

2 release files

0.5.27

2 release files

0.5.25

2 release files

0.5.18

2 release files

0.5.16

2 release files

0.5.15

2 release files

0.5.13

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4

2 release files

0.3.9

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page