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

This version

0.8.5

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.8.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.3 MB view details)

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

pyalgoengine-0.8.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.4 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.8.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyalgoengine-0.8.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e8eb70902276fefbfd9ce03e421fcc260841c163753c3a1121af5ba5c5acfa95
MD5 2a33ce6e8b3cf41c34b62bd749ec7d1b
BLAKE2b-256 f94e5f7b290645094f0e704adca8bc2e3aa9a897978629247894776bfde01126

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyalgoengine-0.8.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37e8779dce14ccd5e5206f5614026850e25409e908150f23dfee50258b923238
MD5 a5b3786f7301baeb4fa0146bb87afb52
BLAKE2b-256 7b3e50adcb3886600a4b998c1cf890a57b9bf6a1de35fbe9af4922894c1fcbc3

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