Projects
Selected Projects
Five public projects. The first three are one research workflow: a factor research pipeline, the optimizer it calls, and the test suite its backtest engine has to pass. The other two score prediction-market prices and test whether AI agents notice data traps.
- Factor Research Pipeline
01
Factors
- Factor Research Pipeline
02
Combination
- Robust MVO
03
Portfolio
- Bias Test Suite
04
Backtest
- Factor Research Pipeline
05
Statistics
- 01
A factor research pipeline that is checked on synthetic data with a known answer before it is run on U.S. equities. Every backtest is written to a ledger, so the Sharpe ratio of a winner is judged against everything that was tried. The one configuration chosen in sample was then run once on five years held back, and the result is reported.
Python · pandas · NumPy · scikit-learn · cvxpy · pytest · uv
- 1.50 → −0.36
- Net Sharpe ratio, in sample and on the holdout
- 1 look
- At the holdout, after the design was frozen and committed
- 8 / 8
- Bias traps passed by the backtest engine
- Challenge:
- A factor backtest is easy to make look good. The factor is chosen on the full sample, only the best of many variants is shown, and the Sharpe ratio comes with no account of the search behind it.
- Method:
- A synthetic panel with planted and noise factors as ground truth; walk-forward combination with purge and embargo; an append-only trial ledger that feeds the deflated Sharpe ratio; a backtest engine that passes all eight traps of the bias test suite; a holdout set aside before any result was read.
- Evidence:
- On U.S. equities the frozen configuration had a net Sharpe ratio of 1.50 in sample and −0.36 on five years held back, and both are published. 218 tests run in CI.
- 02
A test suite for backtest engines. It runs an engine on small synthetic markets with known answers and fails if the engine lets lookahead, survivorship, missing costs, unadjusted splits, or free shorting into the results.
Python · pandas · NumPy · pytest · uv
- −12.6% → +211%
- A losing momentum strategy, after one day of price lookahead
- 8 / 8
- Single-bug engines caught by their own trap, and by no other
- 28 lines
- To plug a second, independently written engine into the suite
- Challenge:
- Backtest bugs such as lookahead, dropped delisted stocks, or ignored costs rarely raise errors; they make the equity curve look better.
- Method:
- Eight traps, each run on a seeded synthetic market whose correct result is computed independently. Probe checks record what the strategy was shown; outcome checks compare NAV, fills, and costs with ground truth.
- Evidence:
- One day of price lookahead turns a losing momentum strategy (−12.6%) into a +211% one in the suite's own test market. In the mutation matrix every single-bug engine fails its own trap and no other, and an independently written vectorized engine passes all eight traps.
- 03
Mean-variance optimization for one rebalance of a long-short book. A near-singular covariance, contradictory constraints, a failing solver, and missing data each have a defined, tested behaviour and a recorded reason.
Python · cvxpy · NumPy · SciPy · hypothesis
- 0.95 vs −705
- Portfolio efficiency at N/T = 0.9, eigenvalue clipping against the sample covariance
- 4 levels
- In the degradation chain, each step down with a recorded reason
- 1e-6
- Tolerance within which property tests hold every constraint
- Challenge:
- A textbook optimizer fails quietly when the covariance is near-singular, constraints contradict each other, the solver stops early, or inputs are missing.
- Method:
- Sample, Ledoit–Wolf, and eigenvalue-clipped covariance estimates; a factor risk model with costs and liquidity caps; a four-level degradation chain that reports why each step down happened.
- Evidence:
- With nine assets for every ten observations, a portfolio built on the sample covariance loses 705 times what the true optimum gains; with eigenvalue clipping it reaches 95% of the true optimum. Property, closed-form, comparative-statics, and fault-injection tests run in CI.
Prediction markets and AI agents
- 04
Polymarket's pre-match prices for the 104 matches of the 2026 World Cup, scored against Elo, Poisson and Dixon–Coles models that see only past results. The market scored best on every rule, but its lead over Dixon–Coles is within noise, and the prices show no detectable favourite–longshot bias.
Python · pandas · SciPy · forecast evaluation · prediction markets
- 0.498 vs 0.508
- Brier score over 104 matches, market against Dixon–Coles; the paired interval includes zero
- 1.08
- Market calibration slope (95% interval 0.77–1.52); above 1 would mean a favourite–longshot bias
- 104 / 104
- Matches priced and scored, none excluded
- Challenge:
- A market should beat a model that only knows past scores. The useful question is by how much, and whether one tournament can even tell.
- Method:
- Time-weighted prices from two hours to one hour before kickoff, against four results-only forecasters whose hyperparameters were frozen before the tournament; paired bootstrap over matches, a reliability diagram, and a one-parameter calibration slope.
- Evidence:
- Brier 0.498 for the market against 0.508 for Dixon–Coles, a paired difference of −0.011 with a 95% interval from −0.042 to +0.021. The market's calibration slope is 1.08 (0.77–1.52).
- 05
A benchmark of 22 quant research tasks, most with a planted trap such as survivorship, lookahead or full-sample selection, and a quarter without one to measure false alarms. Scoring is deterministic, two scripted reference agents validate every task, and no language model has been run on it yet.
Python · pandas · NumPy · LLM agents · evaluation
- 22 tasks
- Eight trap families with two tasks each, plus six controls without a trap
- 16 / 16
- Trap tasks where the naive reference agent falls for the trap and the oracle corrects it
- ≥ 2.8
- Tolerances separating the corrected and naive values on every task
- Challenge:
- An agent asked for a number will usually compute it from the data as given. In quant research the data as given is often the trap.
- Method:
- Tasks generated from seeds, each with a truthful data dictionary and a hidden key holding a corrected and a naive reference value; one Python tool in a temporary directory; a scripted naive agent and an oracle to validate the tasks.
- Evidence:
- The naive agent lands on the naive value in all 16 trap tasks and is right on all 6 controls; the oracle corrects all 16 using only the files the agent sees.
Other work
Private repository
Resolution rule linter
Flags what a prediction-market contract's resolution rules leave open, using the rule filings the venues make public with the CFTC; the rule engine and its tests are built, and the evaluation labels are still under review, so there are no accuracy numbers yet.
Private repository
benchlint
Audits agent benchmarks without running a model: agents that do nothing or answer at random, perturbed reference answers, and static checks on the task files, tried first on defects that papers have already published.
Private repository
One FOMC meeting, priced three ways
Kalshi, Polymarket and fed funds futures put on one scale for the December 2026 meeting; the code stays private because the venues' terms restrict redistributing their data.