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

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

pyalgoengine-0.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.9 MB view details)

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

pyalgoengine-0.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view details)

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

pyalgoengine-0.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (5.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.1-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.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b410acbbd456cde92731e68a6dfc85409bddf52695db6503e20a222baf5c7029
MD5 2d5d03463abce13ce506aefd624572a9
BLAKE2b-256 4af66ff629bcca29012af199427fdbf8dab9febc672c50907bc80ca02c773481

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.1-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.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c1e10904eed4fc62986d978be0b9cfc650bada67b6390880f4c629f9bb9339b1
MD5 d5f107d2ecdbbbf9244038013feb62c9
BLAKE2b-256 801f2968f0407d915601223373cf1525956ae2414edfc643a67784a4a8df129c

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.1-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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6a3ce2a5b5e91f67d57f3fd70678ebcc4a50f5fb9b8af1f171bdf7d53f01dfcd
MD5 05971cd9d37d81fabad05d45273f272e
BLAKE2b-256 0d8ab3d3829f921bd5389c294c8ab0660d06744e8c3d578e681dedd09b30083a

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.1-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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2c2983f82aabda60c3530ca0b046669aeddd52ff8d432aec3c7b8d7cf50b8db
MD5 3f24b82851392c4f8c8e2643582eface
BLAKE2b-256 385c2b0773bae8568f44fb12175749d0de4b547e107c7a8ef5bf038c7754f596

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