Skip to main content
Back to timeline

QBX hands alpha mining to a compiler: typed programs reach 97.7% evaluation validity, against 26.8% for free strings

Synopsis

Formulaic alpha mining has kept candidate representation, evaluation and selection inside bespoke pipelines, making results hard to reproduce or compare. QBX writes candidates as typed port-graph strategies, lets a compiler decide admission, and assigns content addresses to nodes and whole strategies. On Chinese A-share panels, evaluation-valid proposals rise from 26.8% for free strings and 36.4% for a grammar-only control to 97.7% for typed programs, and the availability checker records zero registered-contract violations across 23,342 candidates.

Source-provided article image: QBX: A Compiler for Well-Formed, Auditable Alpha Programs
arXiv

Interpretation

Alpha candidates now pass through a compiler before they reach a backtest. Previously each system carried its own candidate representation, evaluator and selection rule, and whether a free-text candidate was legal could only be learned by running a backtest, so the expensive evaluator doubled as syntax checker and leak detector. In the representation ladder on the extended A-share panel, evaluation-valid proposals rise from 26.8% for free strings and 36.4% for a grammar-only control to 97.7% for typed programs, with type and availability checks accounting for 86.5% of the admission gap relative to the grammar control.

The compiler decomposes a strategy into a typed port graph, where each node declares input and output docks, a parameter schema and a time-availability transfer function. Admission checks structural completeness, registered-only binding, acyclicity, dock types, information availability, semantic intent and executable linkage, returning structured diagnostics on failure and an evidence-carrying intermediate representation on success. The current registry holds 95 versioned blocks, 261 typed-port declarations and 13 value-type expressions; the availability checker records zero registered-contract violations across 23,342 candidates, and static checking rejected 6/6 planted look-ahead factors that a train/test split detected 0/6.

Perspective

The results rest on two Chinese A-share universes, a 20-day forward return and pre-cost cross-sectional statistics; the mechanism probes use 2025 Apple one-hour bars, and the extended vintage uses a current-membership snapshot. The authors name provider timestamps, kernel purity and context-key completeness as assumed rather than verified parts of the trusted base.

The authors state that evidence is single-market, that the steelman and book studies use three seeds, that leak-incidence rates are generator-specific, and that the LLM prompt targets next-day returns while scoring uses a 20-day horizon. They also note that no matched Qlib or hash-consed-AST benchmark exists, that several graph actions remain prototypes, and that typed-only books lose behavioral breadth.