NTH

QBX: A Compiler for Well-Formed, Auditable Alpha Programs

AuthorsYichong Bai, Kaigui Bian

AffiliationsThe Hong Kong Polytechnic University, Hong Kong, China · Peking University, Beijing, China

November 11, 2026 2 min read
Watch on YouTube
The one-line take

QBX turns financial alpha strategies into auditable programs that are easier to validate, reproduce, and search efficiently.

Key results

95
Registry blocks

Versioned blocks define the compiler’s current strategy vocabulary.

97.7%
Typed-program evaluation validity

Compared with 26.8% for free strings and 36.4% for a grammar-only control.

7.50
Incremental replay speedup

Times faster than full re-evaluation, with numerical parity.

0.036
Hybrid test RankICIR improvement

Lower end of the 0.036–0.038 improvement over LLM-only books at matched budgets.

What the paper found

QBX is a compiler-based substrate for building and auditing formulaic alpha strategies. Instead of treating candidate formulas as free text, it admits whole strategies as typed port-DAGs drawn from a versioned registry of 95 blocks. Its compiler checks graph structure, types, executable linkage, and time-availability effects that reject contract-visible look-ahead, then emits an evidence-carrying representation with Merkle-style identities for reuse and trial accounting. On Chinese A-share panels, evaluation-valid candidates rose from 26.8% for free strings and 36.4% for a grammar-only control to 97.7% for typed programs; the checker found zero registered-contract violations across 23342 candidates. Incremental replay was 7.50× faster, with no value mismatches in 1760 comparisons. At matched LLM-call budgets, a hybrid of LLM-sourced breadth and compiler-closed search depth improved test RankICIR by 0.036–0.038. Experiments included a frozen DeepSeek-chat proposal pool, while the paper notes that it has no matched performance benchmark against Qlib. QBX improves validity, reuse, and auditability within its registered vocabulary; it does not add market information or establish that the restricted vocabulary captures every useful alpha.

Original abstract

Formulaic alpha miners increasingly differ in how they generate candidates, yet each system typically couples its own representation, evaluator, and selector into a bespoke pipeline whose results are difficult to reproduce or compare. We present QBX, a compiler that defines a well-formed, auditable space of alpha programs. A finite, versioned block registry and whole-strategy port-DAG language define the candidate space; the compiler either rejects a proposal with structured diagnostics or emits an evidence-carrying IR with types, time-availability effects, executable linkage, and Merkle-style content identities. Compiler-closed actions keep search inside the admitted space, node identities support incremental evaluation, and context-bound root identities govern program deduplication and trial provenance. The availability-effect system rejects contract-visible look-ahead while admitting legal point-in-time forecasts. On Chinese A-share panels, evaluation-valid proposals increase from 26.8% for free strings and 36.4% for a grammar-only control to 97.7% for typed programs. Incremental evaluation replays search lineages 7.5 times faster with numerical parity, while the availability checker admits zero registered-contract violations across 23,342 candidates. Under matched LLM-call budgets, compiler-closed search reaches the pool-specific diagnostic frontier with substantially fewer calls. These results concern validity, reuse, and search efficiency within the registered vocabulary, not an increase in the information available from the market panel.

Read the original paper

More in Efficient AI

Browse all 79 papers →
01Efficiency

Latent Feedback Is a Compute and Data Amplifier

Benhao Huang, Chaitanya Dwivedi, Xuezhe Ma, Alexander Moreno, Hector Liu

Latent feedback may let language models get more value from each training token and FLOP than simply repeating the data.

Read analysis