Skip to main content

Basic algo engine

Project description

PyAlgoEngine: Python Algo-Trading Engine

This module is a high-performance market data buffer implementation written in Python, Cython and C, designed for HFT (High Frequency Trading) system.

📦 Features

  • C-level data structures for fast market data access
  • Efficient shared memory support for interprocess communication
  • Compile-time configurable parameters for memory and layout tuning

⚙️ Compile-Time Configuration

This module allows overriding several constants at compile time via environment variables.

Available Parameters

Variable Default Description
TICKER_SIZE 32 Max length of a ticker symbol
BOOK_SIZE 10 Max depth of the order book
ID_SIZE 16 Max length of ID field
MAX_WORKERS 128 Max number of concurrent workers

These values are defined in c_market_data_config.h, but can be overridden at build time.


🚀 Building with Custom Parameters

To override default values, set environment variables before building:

Using pip install

TICKER_SIZE=64 BOOK_SIZE=20 pip install .

Using setup.py directly

TICKER_SIZE=64 BOOK_SIZE=20 python setup.py build_ext --inplace

These environment variables are passed to the C compiler as -D flags and will override the fallback values in c_market_data_config.h.


🧪 Verify Compilation

You can verify the values were compiled correctly by running:

from algo_engine.base import C_CONFIG

print(C_CONFIG)

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyalgoengine-0.9.4.post6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyalgoengine-0.9.4.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (11.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyalgoengine-0.9.4.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (11.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyalgoengine-0.9.4.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file pyalgoengine-0.9.4.post6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyalgoengine-0.9.4.post6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3601e2d13e55485c43eec149b2a49d04de9eb8f061819a6a2d73e4d3ef06430b
MD5 997af2d6736f8798a49d1e3718110fd8
BLAKE2b-256 a11a8edca26f46f2e4b12fccc718a924a94986e9278a94e1c1e493d77fe63442

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.4.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyalgoengine-0.9.4.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96220105a614fcb3a9ee56cf658b60a1c4d7452f4d05fdcc4940642a942a56ed
MD5 c2bc923505e6f1e20a00b8a7ad53ca71
BLAKE2b-256 1505ccd7687144c0f6fa27a05aeb188b4e455992ce14752c7244b070602f2129

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.4.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyalgoengine-0.9.4.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df6c78902cc7b8d59245e9a4ab3508de258d99810229fb039550d9d9fa243f42
MD5 2d254aa15d87160d2df4d95314969afe
BLAKE2b-256 bd4937e4c24c2dd9257431589566395311be11333bd9ebed5f75488b63344da3

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.4.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyalgoengine-0.9.4.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af2e081e8a3030ef7cd6596d34571efc3c899334ec8446d44885439002250949
MD5 6cb1c0f38909652f283d772cd0ceebc7
BLAKE2b-256 b0385d9bed371e77c89b31f0dbdaea2a4ec0527822bdcc0c31cf107b5a2826ac

See more details on using hashes here.

Supported by

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