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.7.0.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.7.0-py3-none-any.whl (304.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gorazd-0.7.0.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.7.0.tar.gz
Algorithm Hash digest
SHA256 ff4150bfda15d27c976782f3f895e5626c15918fe4fd2e951abb5cf2a585e0a1
MD5 fb84b55b434c0749e0e4d320e1c9dfec
BLAKE2b-256 c32a1739f556bc7206e282d350991ec19f88f43ca8eef7dde8893a5cd9bf2b91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gorazd-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 304.9 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.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b2b6d2260f3b034792265fd81cec22c5e5e056941d1e32bea27c9a9d4e8e17a
MD5 816cfc012e20d27517771052ddcd83d7
BLAKE2b-256 66c04d92e6d51c17a3124d29919ebe6b085f32d84586c6c0c0ed015f6c0489e3

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