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.0-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.0-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.0-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.0-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.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.9.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53e0fc39bbe44ce2832cf350e72a1c7ac4a1de0dce57ec69f718403d94e1e47d
MD5 c19033103647ac02a6253d0fe3799f1b
BLAKE2b-256 c45d7a019aacdae6e71a93da80ceb4ff3d7bf983d5caca2fd81f84fa31c5e6c8

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.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.9.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f435f75fca91b87dcfc0b969e13aaaf40ec4de413d80228aede22c96f3977471
MD5 4a3fff38498154348c91052f38c879d4
BLAKE2b-256 193dc0d67fd63d65c62437dac6798ece4086f473fe9fb794cc33cb2ba6ae5734

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.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.9.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfb30b8b0e2954c5c167f0195a9877bdb71e7f0cc2153da18e9dc0ec74570aed
MD5 e2165d5338fa4a05a2ed411818a88953
BLAKE2b-256 854e32d37b42d5eff0b6696a6236aff238f1e3b2cbdf3c650afdfdcebb7dc83b

See more details on using hashes here.

File details

Details for the file pyalgoengine-0.9.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.9.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73c5a6909861cee9b9efbacf7d643555d8ad2ea3f12b1f8f0083f47522da8f70
MD5 1c61f58b40e6227023814491b225e438
BLAKE2b-256 87ed9343d3ca3501453dc12e187d3b4eeb4a747644a873bb19757789e8ae40d5

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