Skip to main content

Institutional quantitative execution and physical reality matrix.

Project description

GORAZD: Institutional UHFT Execution Matrix

Gorazd is an ultra-high-frequency, zero-allocation quantitative execution engine designed for bare-metal Linux deployments. It physically bypasses the Python Global Interpreter Lock (GIL) and OS-level mutexes to achieve deterministic microsecond execution for Machine Learning models.

Architectural Supremacy

  • The 4-Core Hydra: Mechanically hijacks 4 CPU cores (isolcpus) for Ingestion, Execution, Risk (Kill-Switch), and Concept Drift monitoring.
  • Page-Aligned Memory: Eradicates OS page faults by mapping monolithic tensors directly to physical RAM via mmap.
  • Lock-Free IPC: Inter-Process Communication utilizing C11 atomic pointers and 64-byte L1 cache-line padding.
  • Native C-API Inference: Bypasses Python wrappers entirely, mapping RAM directly to libxgboost.dll/so via ctypes.
  • Microstructure Physics: Custom XGBoost objective gradients mathematically constrained by Maker/Taker rebates and Continuous Risk Lagrangians.
  • Avellaneda-Stoikov Routing: Dynamic Kelly capital exposure scaled by inverse volatility and skewed by real-time inventory risk.

Environmental Configuration (.env)

Gorazd operates across two distinct deployment realms. You must create a .env file in your execution directory.

# Execution Mode: RETAIL (Free APIs) or BLOOMBERG (B-Pipe)
data_source="RETAIL"

# Free API Infrastructure (Used if data_source="RETAIL")
tiingo_api_key="YOUR_TIINGO_KEY"
alpaca_api_key="YOUR_ALPACA_KEY"
alpaca_api_secret="YOUR_ALPACA_SECRET"

# Risk Constraints
max_leverage=1.5
base_capital=250000.0

The Global CLI Matrix

Gorazd installs directly into your operating system's PATH. You do not need to write scripts to operate the core pipeline.

gorazd-fetch   # Polls APIs/Bloomberg, calculates scalars, bakes Parquet.
gorazd-train   # Executes Purged CV and non-linear risk Optimization.
gorazd-ui      # Ignites the ZeroMQ tactical terminal dashboard.
gorazd-ignite  # Launches the 4-Core UHFT memory-mapped daemon.

Top-Level Python API

For quantitative researchers looking to integrate Gorazd into existing frameworks, the gz top-level namespace provides brutal, operational brevity.

import gorazd as gz

# 1. Synthesize Physical Tensors
compiler = gz.TensorCompiler(target="SPY")
compiler.compile(start_date="2016-01-01")

# 2. Optimize Physics-Aware Matrix
optimizer = gz.Optimizer()
optimizer.fit(parquet_file="SPY_institutional_matrix.parquet")

# 3. Ignite the Multicore Daemon
engine = gz.Engine(target="SPY", model_file="core.ubj")
engine.ignite()

Bare-Metal OS Tuning (Equinix NY4)

Do not run this engine on a standard OS if capital is at risk. You must alter the Linux kernel via GRUB to isolate the physical CPU cores from background OS interruptions.

# /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=1,2,3,4 nohz_full=1,2,3,4 rcu_nocbs=1,2,3,4"

Project details


Download files

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

Source Distribution

gorazd-0.6.1.tar.gz (103.4 MB view details)

Uploaded Source

Built Distribution

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

gorazd-0.6.1-py3-none-any.whl (304.4 kB view details)

Uploaded Python 3

File details

Details for the file gorazd-0.6.1.tar.gz.

File metadata

  • Download URL: gorazd-0.6.1.tar.gz
  • Upload date:
  • Size: 103.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gorazd-0.6.1.tar.gz
Algorithm Hash digest
SHA256 063347538766bdda59d72b2d26bbfa21e5aa777671c720e57919893274f832e5
MD5 7e593e5929456244b84403585218d1ef
BLAKE2b-256 159df627cf61f99b3e988b42b01320a6f2ce76815230fa9e126a77fcfee944cf

See more details on using hashes here.

File details

Details for the file gorazd-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: gorazd-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 304.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gorazd-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3beb4fb0083648d4978b668c32b94794ed4a6c82c90273d3126e7e9961246f10
MD5 70a29664955f7f9833d17d9430771244
BLAKE2b-256 bef52c2af430f1d4f3e1b1f4f2d530f1a94bc60b11c31fc57c9280ac626135bd

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