All evaluations Benchmark

QuantCode-Eval

Reproduce a paper strategy as executable code

What it evaluates

What is under test
configured coding-agent system plus executable checker validation
How tasks are built
Two experienced quants select 30 papers in six categories; 572 property checkers
Size
30 tasks; five attempts/task/configuration = 150 attempts; 572 checkers; expanded release 2,400 attempts across 16 systems
Authors
Lu, Wenhao (SSRN metadata: Wenaho); Yuan, Ziqi; Wu, Hao; Jin, Dunhong; Wu, Chuan
Affiliations
University of Hong Kong
First public
2026-06-02

The task environment. QuantCode-Eval releases 30 strategy-reproduction tasks, five each in momentum, mean reversion, factor, volatility, event-driven and systematic-strategy groups (counted from sample_cards/corpus_overview.csv). Coding agents receive source-paper material, an interface contract and data, then submit Python to 572 executable properties: 238 applicable domain properties and 334 paper-specific properties. The inspected expanded release includes 16 systems × 30 tasks × 5 attempts; ten task panels are self-contained and twenty require WRDS entitlements, as distinguished in DATA_LICENSE.md.

Sample tasks

Each task is taken from the evaluation's own released material or the authors' worked examples, never written by us. The provenance under each task says exactly where it comes from.

Task 1

T01: reproduce time-series momentum

Quoted from the source

What the system receives

All required functions must be importable as top-level module functions from `strategy.py`. [...]
Inputs and tools
Released task T01 supplies the source-paper text for Moskowitz, Ooi and Pedersen (2012), its strategy digest, interface contract and 22 instrument CSVs covering 1999-01-2025-04. The contract declares a smaller universe and longer period than the original paper. The agent writes Python in a coding environment; exact global runtime/step budget was not established from the inspected release files.
Expected output
A strategy.py implementing load_and_prepare_data, compute_monthly_returns, compute_ex_ante_volatility, compute_tsmom_signal, compute_position_size, compute_tsmom_returns and construct_tsmom_portfolio. The released reference uses 12-month momentum signs, inverse-volatility sizing and equal-weight aggregation; the contract fixes one-month volatility lag and signal/forward-return alignment. Reference implementation: tasks/T01/golden_ref.py; this is a code-fidelity task rather than matching the paper's historical Sharpe.
How this item is graded
All 17 checkers must pass (7 domain properties, 10 paper-specific). For example, B1 in checkers/run_all.py checks that the first non-null signal in the first instrument occurs at zero-based month 10-13; where comparisons exist, more than 95% must match the analytical 12-month return sign. A10 uses differential fuzzing against the reference pipeline. There is no single numerical tolerance covering every checker.
A failure the source reports
The released Codex + GPT-5.5 attempt 2 fills initial missing momentum signals with zero in compute_tsmom_signal. Its result is runnable but not a full pass; the human-reviewed annotation identifies B1 as a temporal-indexing failure. Inspection of B1 explains the mismatch: zero-filled initial rows make the first valid position 0, outside the accepted 10-13 interval. This last explanation is an inference from the released code, not a newly executed result.
Source
https://huggingface.co/datasets/quantcodeeval/task_data/blo… (Required Functions, IO Shape and declared conventions R1-R5); https://huggingface.co/datasets/quantcodeeval/task_data/blo… (task ID T01); https://huggingface.co/datasets/quantcodeeval/task_data/blo… and tasks/T01/checkers/run_all.py (B1); https://huggingface.co/datasets/quantcodeeval/task_data/blo… and results.json; https://huggingface.co/datasets/quantcodeeval/task_data/blo… (system_id=codex-gpt5.5, task_id=T01, attempt=2, property_id=B1)
Split
other: publicly released tasks split, task T01; not a held-out secret test
Licence
CC BY 4.0 covers QuantCodeEval's original instructions, code and annotations (https://huggingface.co/datasets/quantcodeeval/task_data/blo…; https://creativecommons.org/licenses/by/4.0/) Original finance papers and market data retain their own rights.

Task 2

T27: combine equity-premium forecasts and allocate to equity

Quoted from the source

What the system receives

The `combine_forecasts` function below must support all five methods as interface-level arguments, with `"mean"` as the task default. [...]
Inputs and tools
Released task T27 supplies Rapach, Strauss and Zhou (2010) source-paper text and a 236-row welch_goyal_quarterly.csv covering 1947-03-31-2005-12-31. The task requires an offline pandas/numpy/statsmodels-style pipeline using those inputs. It explicitly forbids runtime downloads and event-driven trading frameworks, and declares exact column names, quarter-end timing, and publication lags for inflation and I/K.
Expected output
A strategy.py with eight top-level functions: compute_predictors, individual_forecasts, combine_forecasts, historical_average_forecast, estimate_variance, optimal_weight, portfolio_return and run_strategy. run_strategy must return date, equity_return, risk_free, forecast, variance, weight and portfolio_return. The headline method averages 15 expanding-window univariate forecasts; risk aversion is 3, the variance window is 40 quarters, and allocation is clipped to [0,1.5]. Full reference: tasks/T27/golden_ref.py.
How this item is graded
All 18 checkers must pass: 9 domain properties and 9 paper-specific properties in the released manifest. They cover causal/temporal use, interfaces and complete-pipeline consistency, plus 15 predictors, DP/DY definitions, lagged inflation, expanding OLS, equal forecast weights, a 10-year variance window, gamma=3 and [0,1.5] allocation bounds. The manifest runner imports the corresponding executable checkers; exact tolerances are checker-specific and were not exhaustively audited for this task.
Split
other: publicly released tasks split, task T27; not a held-out secret test
Licence
CC BY 4.0 for original benchmark instructions, code and annotations (https://huggingface.co/datasets/quantcodeeval/task_data/blo…; https://creativecommons.org/licenses/by/4.0/) third-party paper and predictor-data rights remain separate.

How it is graded

All executable domain and paper properties must pass; trace diagnosis labels separate

Metric
pass@1 over 150 attempts; pass@5 over 30 tasks with at least one fully passing attempt

What it cannot establish

Mutation sensitivity is not natural-error recall; original strategy profitability untested; current expanded panel differs from SSRN; WRDS limits reuse

Data and code

Data
HF inventory lists tasks/contracts, references, data manifests and checker assets; original licensed panels not freely redistributable
Reference answers
Reference implementations and canonical verdicts listed
Code
Checker code listed in HF release; anonymous mirror linked but automated retrieval returned 401
Data licence
CC BY 4.0 for original assets per HF card; third-party entitlements in DATA_LICENSE.md
Code licence
Card terms cover original assets; independent code-license file not found in inspected HF inventory
Released artifacts
https://huggingface.co/datasets/quantcodeeval/task_datahttps://anonymous.4open.science/r/QuantCodeEval-Anonymous

Sources checked: 2026-10-19. Sources for this description: https://huggingface.co/datasets/quantcodeeval/task_data/blo…; https://huggingface.co/datasets/quantcodeeval/task_data/blo…; https://huggingface.co/datasets/quantcodeeval/task_data/blo…; https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6801618