Skip to main content

msqd

The msqd library (pronounced "em squared") is a small boilerplate library for designing, testing and spinning up trading algorithms using Python.

Notes

  • Upon class instantiation, ping database to get timestamps for which we have data, whether this is the downsampled timestamps or the timestamps we got from the database, and maybe some record of the furthest lookback would have to consider to get well-defined features.
  • What data do we need to get from the database? How/where shall we cache it? For how long? Either we need to get some data and compute the feature value OR we already know (or can work out) that we won't yield any more information by pinging the database again and should just return the most recent value available.

Design Goals

  • We build up trading systems and strategies by composing functions. For example, we may have a filtering layer where we only trade a particular strategy when certain conditions are met; we may filter instruments.
  • A strategy is a function: it has some fixed parameters and it has some time-dependent inputs.
  • What is the most convenient way to define strategies?
  • We require full-stack control: we can spin up strategies using simple moving averages really quickly but can also do deep market-making strategies with full control over individual orders, sizes, etc.
  • Pass to Rust for calculations that are really really slow. Most of the time, numpy calculations will be working fine.
  • Let certain features augment multiple values, e.g. RETURNS[-5:] would give the most recent 5 returns (according to some frequency), even though it is just one input in the code.

Metadata

Release files for msqd 0.0.1

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

Source distribution (sdist)

Source distribution for msqd 0.0.1
File Size Uploaded
msqd-0.0.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for msqd 0.0.1
File Interpreter ABI Platform
msqd-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / msqd-0.0.1.tar.gz

Download URL msqd-0.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d6906e99e7f656ff1068d5e9bbfc319f34e88048f29c12f1c5e1658f748532dd
BLAKE2b-256 checksum
How to use checksums
1bfa25873121ba3b096d0046e5152f1d031f83e45b4b618f615464053b535bc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.2

Release files / msqd-0.0.1-py3-none-any.whl

Download URL msqd-0.0.1-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8528ef1cadd8c3d78a96bc8c09f0868f20bacaedfdf64789cc6b30630b7066f
BLAKE2b-256 checksum
How to use checksums
ecc41614609d6d32a50b51e6e5665d6f66281c7d85edd0ca976f7deaaf45ee13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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