Metadata-Version: 2.4
Name: gorazd
Version: 1.0.0
Summary: GORAZD: Gradient-Optimized Regime-Aware Zero-allocation Dispatcher
Requires-Python: >=3.10
Requires-Dist: numba>=0.59.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: optuna>=3.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: polars>=0.20.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyzmq>=25.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: rich>=13.0.0
Requires-Dist: tomli>=2.0.0
Requires-Dist: xgboost>=2.0.0
Description-Content-Type: text/markdown

# GORAZD: Gradient-Optimized Regime-Aware Zero-allocation Dispatcher

GORAZD is an elite, cross-platform quantitative execution matrix. Designed for institutional developers, it bridges the gap between local workstation simulation and bare-metal high-frequency deployment. It physically bypasses the Python Global Interpreter Lock (GIL) to achieve deterministic, microsecond-latency execution.

## The Universal Matrix
GORAZD is architected for total environmental superiority:
* **Tactical Simulation (Windows / macOS):** Build, train, and backtest your non-linear risk matrices locally utilizing full multicore concurrency and ZeroMQ tactical dashboards.
* **Live Deployment (Linux / Equinix NY4):** Deploy the exact same codebase to a bare-metal server. GORAZD automatically maps to Linux `isolcpus` and native `.so` C-libraries for zero-latency physical execution.

## Architectural Supremacy
* **The 4-Core Hydra:** Mechanically hijacks 4 CPU cores for Asynchronous Ingestion, Routing, 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 the underlying `libxgboost` C-library.
* **Microstructure Physics:** Custom objective gradients mathematically constrained by Maker/Taker exchange rebates.
* **Avellaneda-Stoikov Routing:** Dynamic Kelly capital exposure scaled by inverse volatility and skewed by real-time inventory risk.
* **Immutable Parquet Ledger:** Zero-blocking asynchronous trade journaling ensures absolute PnL persistence.

## Environmental Configuration (.env)
Create a `.env` file in your root execution directory to securely lock your credentials and risk parameters:

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

    # 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"

    # Structural Risk Constraints
    max_leverage=1.5
    base_capital=250000.0

## The Global CLI Matrix
GORAZD installs directly into your operating system's PATH. Drive your entire quantitative stack from the terminal:

    gorazd-fetch   # Polls physical APIs, calculates multipliers, locks Parquet tensors.
    gorazd-train   # Executes Purged Cross-Validation and Non-Linear Optimization.
    gorazd-ui      # Ignites the ZeroMQ tactical terminal dashboard.
    gorazd-ignite  # Launches the 4-Core UHFT memory-mapped daemon.

## Top-Level Python API
For deep integration, the `gz` 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()