Fix D1 spec-test gaps in 3 tasks#219
Merged
Merged
Conversation
…ward-cross-rate
dupire-local-vol: The spec said forward variance "must be positive
everywhere" but the test accepted ≥40% positive — a direct
contradiction. The oracle always stores forward_variance=0 for the
last expiry (no next tenor to difference against), so the test should
exclude that row. New test skips the last row and requires ≥90% of
interior forward variances to be positive, matching the corrected spec
language.
mc-greek-surface-1: The spec said LR Gamma "requires the second
derivative of the log-likelihood" but gave no formula, while the test
asserts a non-null value within 10% of BS Gamma. Added the explicit
score-function estimator:
Γ_LR = e^{-rT} · E[payoff · (Z²−1−Zσ√T) / (S₀σ√T)²]
so agents know exactly what to compute.
fx-forward-cross-rate: The spec gave only conceptual guidance ("think
about which side a dealer would trade") while the test asserts specific
cross-rate mid values to 5e-4 tolerance. Added the explicit
triangulation formula (bid×bid / ask×ask for each USD leg) with a
GBP/JPY example so agents can implement it without guessing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PQCat
approved these changes
May 6, 2026
labubububula78-poop
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three tasks had confirmed D1 (Output Schema / Spec Compliance) issues where the instruction and the verifier disagreed in ways that could cause a correctly-implemented agent to fail the benchmark.
dupire-local-vol: Spec said forward variance "must be positive everywhere"; verifier accepted ≥40%. Root cause: the oracle always writesforward_variance = 0for the last expiry (no next tenor to difference against), so the verifier must exclude that boundary row. New test excludes the last row and requires ≥90% of interior values to be positive, consistent with the updated spec language.mc-greek-surface-1: Spec said LR Gamma "requires the second derivative of the log-likelihood" but gave no formula. Verifier asserts a non-null value within 10% of BS Gamma. Added the explicit score-function estimator so agents know what to compute:Γ_LR = e^{-rT} · E[payoff · (Z²−1−Zσ√T) / (S₀σ√T)²].fx-forward-cross-rate: Spec gave only conceptual guidance ("think about which side a dealer would trade") while the verifier asserts specific cross-rate mid values to 5×10⁻⁴ tolerance. Added the explicit bid×bid / ask×ask triangulation formula with a GBP/JPY worked example.Test plan
dupire-local-vol— confirm all tests still pass with new 90% thresholdmc-greek-surface-1— confirm LR Gamma test passesfx-forward-cross-rate— confirm cross-rate tests pass🤖 Generated with Claude Code