Work

SMT Formal Verification of Quantitative Execution Invariants and the Friday Afternoon Cross-Asset Exit Divergence: Microsoft Z3 Theorem Proving, Opening Range Compression Gates, and Pre-Weekend Equity vs. Safe-Haven Gold Asymmetry

Year: 2026
Type: preprint
Abstract: Quantitative trading engines rely predominantly on finite historical backtests and stochastic Monte Carlo simulations to validate execution and risk-sizing code. However, finite sample paths leave uncountable state-space regions—such as odd-lot discrete integer truncations, adverse fill slippage during scale-in pyramiding, and exception-masked SQLite schema drift—untested prior to live deployment. In this fourth installment of the Lumina Capital research series, extending the execution-cost governance framework of Hashimoto (2026a), the multi-chamber dynamic leverage boundaries of Hashimoto (2026b), and the timeout-bounded asynchronous econometrics of Hashimoto (2026c), we introduce a four-stage formal verification and regime-conditioned execution architecture. First, we formulate a Satisfiability Modulo Theories (SMT) verification framework using the Microsoft Z3 Theorem Prover over linear real and integer arithmetic (QF_LIRA), proving that six core execution invariants—discrete lot sizing bounds, slippage-proof pyramiding stop synchronization, risk-unit (R-multiple) sign symmetry, drawdown brake monotonicity, prop-firm lot consistency smoothing, and static SQL Abstract Syntax Tree (AST) schema parity—are strictly unsatisfiable under negation (UNSAT), guaranteeing zero mathematical counterexamples across the unbounded price-quantity domain. Second, we establish the Friday Afternoon Cross-Asset Exit Divergence Theorem: after 11:00 ET on Fridays, institutional T+1 balance-sheet de-risking induces negative drift in US equities, whereas weekend geopolitical hedge accumulation induces positive drift in spot gold. Across 1,254 trading days (2021–2026), tightening the trailing stop multiplier from 1.00x to 0.75x on Fridays after 11:00 ET improves US equity returns by +0.41R, whereas applying the same tightening to gold degrades returns by -1.08R—a 1.49R cross-asset divergence (p < 0.001). Third, we derive a cross-sectional Opening Range Compression Gate (Median(ORB_30m) < 0.75%) that eliminates morning bid-ask chop while preserving 100% of genuine institutional breakout trends (RVOL_open >= 1.50).
Language: English
Open Access status: green
OpenAlex ID: W7225578079
Cites:
Cited by:
Related to: 10