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.10.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.9 MB view details)

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

pyalgoengine-0.10.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

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

pyalgoengine-0.10.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

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

pyalgoengine-0.10.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.8 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.10.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyalgoengine-0.10.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c89abef85f5e52b495674f63df447c14e0be752c0d0e16b1b1ad6aeec811e32c
MD5 fcdffd7eac6b772c719b2ac3ad0eff19
BLAKE2b-256 e9cf35fd6b6d50484beb582da7cf71bc1fa3f4c41544d511c18aac54ba49c77f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyalgoengine-0.10.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 749051838d0ae3262b7c5e85fbd1296da733938965a76ccdb4ac6bf0ee4ec243
MD5 0707c1d882c5fc3c8799e6ca90d720ba
BLAKE2b-256 03e0ae69803246f77df5bd4332232821233cf54151456a857afa8a002c545ac8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyalgoengine-0.10.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 86c5cb88c8fb5d5008348efb5627db3195ab0da1ccfa92c877aea81a1634d9ab
MD5 cf801f4e029eba0b8f496e313fdd336e
BLAKE2b-256 77f558f1ab47eab1a4ec19512f10a03b8b294ce2144eb2a6055b16e4600aa07d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyalgoengine-0.10.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2c301a7c77299a9a42b2086e3f5ca74722d92d8b084acfc17da27050b99e1328
MD5 3ce274d3f56eb802e0f8746c2a68e4be
BLAKE2b-256 382a28cffa571eabc53608058d57c3e3d1c08b1eb443f02e547642a30ea55b06

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