work / engineering and ai
Supporting work
A smaller, standalone project: a genetic-programming alpha search with pre-registered splits.
Formulaic Alpha Search (GP)
The problem
Generating formulaic alphas is cheap. Evaluating them honestly is the hard part, because every extra look at the data quietly overfits. A search that breeds thousands of formulas will always find something that looks good in-sample; the question is whether the process can tell a real signal from luck.
What I built
A genetic-programming searchgenetic programmingEvolving formulas by mutation and crossover, keeping the ones that score best, much like breeding. over formulaic alpha expressions on multi-year public Binance daily data:
- Pre-registered splits. Formulas may breed only on train data, are chosen on validation, and get exactly one test score.
- Delay-1 signals with trading costsdelay-1A signal computed from today's data may only trade tomorrow, so it never uses a price it could not actually have traded at.. A signal computed today can trade only tomorrow, after costs.
- An equal-budget random-search control, sharing the GP’s filter and validation rule, so any difference comes from breeding alone.
- A grammar parser instead of eval. Every candidate passes through the same AST parser, so a hostile line cannot run.
How it works
- 01Grammar parserparse, never eval
- 02Seed formulasreplayed, hash-keyed
- 03GP searchbreeds on train
- 04Validation pickcorrelation-filtered
- 05Single testone untouched score
- Real-data configurations were committed before any real-data run, so thresholds could not be tuned on the results.
- Every candidate’s lineage is stored in SQLite, so any reported formula can be traced back to its parents.
designed and verified by Oscar, implemented with AI coding agents (Claude Code, Codex)
Limits
- The coin universe is survivorship-biased: only coins that exist today.
- The cost and portfolio model is simple, with no borrow or funding.
- The repository reports its own result in full. This page states the method only.