[ BENCHMARKS / v5.0 / TASKS / 183_heston_little_trap ]
Heston European call pricer (long maturities) in Python.
Price European calls under the Heston stochastic-volatility model, maturities up to 30 years included, to 1e-6 with the standard library only.
- Unit
183_heston_little_trap- Category
- Mathematical FinanceStochastic volatility
- Language
- Python
- Difficulty
- Hard900 s wall clock (15 min)
- Origin
- New in v5
- Ranked rows passed
- 1/7single seed each
The prompt
The agent receives exactly this text as its task, verbatim. The harness adds its own system prompt and, in some campaign arms, guidance of its own; the harness chapter describes those. The task’s setup also writes the files its working directory starts with (a worked sample, a repository or a service, where the prompt names them); they are not reproduced here.
Create /tmp/eval_heston183/heston.py: a Python 3 program that prices European call options under the Heston stochastic-volatility model. Standard library only: it is run as `python3 -I -S heston.py` from /tmp/eval_heston183, so no third-party package (numpy, scipy, mpmath, ...) is importable. The source is linted: imports of third-party, ctypes, subprocess or multiprocessing modules and dynamic code (exec, eval, __import__, importlib) are rejected.
Model, under the pricing measure:
dS_t = (r - q) S_t dt + sqrt(v_t) S_t dW1_t
dv_t = kappa (theta - v_t) dt + sigma sqrt(v_t) dW2_t, d<W1, W2>_t = rho dt
S_0 = S0, v_0 = v0; call price = exp(-r T) E[max(S_T - K, 0)].
Input on stdin: the first token is N (1 <= N <= 200), followed by N lines of ten whitespace-separated decimal numbers: S0 K T r q v0 kappa theta sigma rho.
Output on stdout: N lines, the call price of each input line, in order, as a decimal number. Nothing else.
Every hidden case lies in this domain: 50 <= S0 <= 150; 0.6*S0 <= K <= 1.6*S0; 0.02 <= T <= 30 (years; maturities up to and including 30 occur); -0.01 <= r <= 0.08; 0 <= q <= 0.05; 0.005 <= v0 <= 0.25; 0.1 <= kappa <= 5; 0.01 <= theta <= 0.25; 0.1 <= sigma <= 1.5; -0.95 <= rho <= 0. The Feller condition 2*kappa*theta >= sigma^2 does not necessarily hold.
Accuracy: each printed price must be within 1e-6 (absolute) of the exact model price; the validator compares against an independent high-precision reference. Speed: the hidden run is 140 options in one process (no child processes) and must use at most 8 seconds of CPU time in total.
Sample: /tmp/eval_heston183/sample_input.txt holds 3 options, /tmp/eval_heston183/sample_output.txt their prices to 10 decimals. Validation uses 140 hidden, seeded cases spread over the whole domain and reports only the index of the first failing case, so write your own tests.What it tests and why it is in the suite
What it asks. Price European calls under the Heston stochastic-volatility model, maturities up to 30 years included, to 1e-6 with the standard library only.
Why it is here. A new family in Mathematical Finance.
In the suite README: evals/README.md:133
How it is graded
The validator holds its checks where the agent cannot read them, and runs them against what the agent left on disk once it stops. Its hidden cases are generated inside the validator from a seed; any worked sample the prompt names is only a sample, and no expected output for a hidden case is in the agent’s directory. Before any model ran it, the unit was proven: its reference solution passes, plausible wrong solutions fail for the reason declared in advance, an empty solution and a leak probe fail, and, where the unit is timed, a slow solution fails by the validator’s own limit. The family also went through up to three adversarial review rounds, in which an independent verifier tried to pass every unit without solving it.
- Time. The agent has 900 s of wall clock (hard tier) before an arm’s scaling; at the wall it is stopped and whatever is on disk is validated. Any time limit in the prompt applies to the program itself.
- Verdict. Pass or fail, from the validator alone. A unit the integrity scan finds contaminated is withheld and counts as not passed; a unit lost to infrastructure is rerun, and one still lost counts as not passed.
- Scoring. SCORE is 0.75 × SOLVE + 0.25 × LANG over the whole suite, with hard problems weighted above medium ones. Scoring and ranking
Upstream: the prover’s controls · one unit’s life cycle · why v5 is built this way
How each ranked run did
One run per board row, the DGX Spark pair first, then the RTX 5090, then the gold standard. Each is a single seed: a pass or a fail on one unit is one draw, and a difference between two rows on one unit says little on its own. Claude Opus 5.5 is the unranked reference, in its own scaffold.
DGX Spark pair
- DeepSeek-V4.1-Flash#1 on the boardPassedPassed the validator.
- Hy4-flash#2 on the boardFailedDid not pass the validator.
- GLM-5.3-Flash#3 on the boardFailedDid not pass the validator.
One RTX 5090
- Inkling 2 Mini#4 on the boardFailedDid not pass the validator.
- Inkling 2 Mini Derisked#5 on the boardFailedDid not pass the validator.
- Inkling 2 Mini SC117 abliterated#6 on the boardFailedDid not pass the validator.
- Qwen3.8 27B Uncensored MTP#7 on the boardFailedDid not pass the validator.
Gold standard · unranked
- Claude Opus 5.5Claude Code tools, no turn cap, 2× wallPassedPassed the validator.