Structural Edge Platform

Live, broker-connected FX trading infrastructure

Built from scratch: native C++ engine, Python execution stack, GPU-assisted research, Docker deployment, and an audited path from research artifacts into live configuration.

7

Liquid OANDA majors traded by the current live system.

64

Completed S5 candles in each rolling structural window.

16 / 117

Native C++ source-header files and Python modules in the platform codebase.

35

Historical peak overlap across the 180 / 90 / 30 / 7 day canonical replays.

What It Is

Signal-first mean reversion on live OANDA data

The platform trades seven liquid FX majors through OANDA. Every completed 5-second candle can trigger a new structural evaluation. The current method is signal-first mean reversion: the system compresses the latest 64 completed candles into a structural state, derives features, and decides whether a move looks exhausted enough to fade.

There is no machine-learning model required for primary entry admission. The live path is built around deterministic gates, pair-specific thresholds, portfolio controls, and a broker-connected execution stack.

Current Universe
  • EUR/USD
  • GBP/USD
  • USD/JPY
  • AUD/USD
  • USD/CHF
  • USD/CAD
  • NZD/USD
Architecture

Runtime path

OANDA S5 candles
  -> stream_candles.py
  -> Valkey runtime state
  -> native manifold / regime analysis
  -> Python gate loading and validation
  -> portfolio sizing and risk controls
  -> OANDA order routing
  -> live reconciliation and telemetry
Native Core

C++17 / pybind11

Byte-stream manifold logic, structural entropy, OANDA client integration, JSON / gzip handling, and Python bindings live in the native core.

Execution

Python trading stack

Gate loading, risk sizing, exposure tracking, execution management, session policy, and trade lifecycle orchestration run in Python on top of the native engine.

Research

GPU sweep and replay

Canonical parameter sweeps, multi-window replay, and parity checks are used to move from research artifacts into live configuration without manual copy-paste drift.

Core Signal

What the structural window produces

  • Hazard: how stretched or unstable the current structure looks.
  • Coherence: how cleanly the current pattern holds together.
  • Entropy: how disordered the current structure has become.
  • Stability: how likely the state is to remain intact versus break.
  • Regime label / confidence: categorical context layered over the structure.
  • Signature recurrence: repetition signals used in admission logic.
Key Engineering Decisions
  • No fallback trade path when the gate is not satisfied.
  • Pair-specific thresholds rather than one generic profile.
  • Centralized portfolio policy for live sizing and replay audits.
  • Market-hours-aware replay and restart rehydration.
  • Deployment path checks parity before promotion.
Code

Representative slices of the actual stack

Native interface

struct Candle {
    uint64_t timestamp;
    double open, high, low, close, volume;
    nlohmann::json toJson() const;
    static Candle fromJson(const nlohmann::json& j);
};

redisContext* connectValkey(const std::string& url);
void storeCandleZSET(redisContext* c, const std::string& key, const Candle& candle);
nlohmann::json buildManifoldFromCandles(
    const std::vector<Candle>& candles,
    const std::string& instrument
);

Taken from the current native trading-signal header. The C++ side owns candle storage, Valkey access, and manifold construction primitives.

Execution coordinator

self.gate_loader = GateLoader(self.config.redis_url)
self.exposure_tracker = ExposureTracker(service, self.risk_manager)
self.trade_stack = TradeStackProcessor(
    self.strategy,
    self.session_policy,
    self.risk_manager,
    self.trade_state,
    self.risk_sizer,
    self.execution_engine,
    self.config.hold_seconds,
)

The Python side coordinates gate loading, exposure tracking, trade-stack processing, execution, and policy enforcement.

Canonical Evidence

Replay windows

Window Trade Count Positive Pair Sharpe Median Pair Sharpe Peak Overlap
180 day 5,330 7 / 7 2.27 35
90 day 3,033 7 / 7 2.45 35
30 day 1,218 6 / 7 3.84 35
7 day 312 5 / 7 0.53 35

180-day pair exports ending March 23, 2026

Pair Trades Return % Sharpe Profit Factor Max Drawdown
AUD/USD1,29256.132.191.3419,527
EUR/USD66542.813.692.027,494
GBP/USD51119.293.491.614,160
NZD/USD1,23547.052.271.2917,116
USD/CAD29333.223.292.447,837
USD/CHF43939.912.251.6415,769
USD/JPY89544.452.171.4320,049
What Exists
  • Live broker-connected execution on OANDA.
  • Seven-pair deployment built on completed S5 candles and a 64-candle structural window.
  • Canonical sweep and multi-window replay workflow.
  • Centralized portfolio policy and overlap audit.
  • Parity checks between promoted research output and live configuration.
Current Build Status
  • Native C++ and Python services run through a Dockerized deployment path with Valkey-backed runtime state.
  • Pair-specific thresholds are promoted from sweep output instead of hand-tuned live overrides.
  • The evidence shown here is the current replay and overlap package as of March 23, 2026.
  • The platform is still being iterated, but the live execution path and validation workflow already exist.