Claude Opus 5.5 (effort default (no --effort flag) · thinking on) on Mortgage amortization with extra monthly payments and lump sums
AClaude Opus 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-20 · by @bobsiopener
- Estimated cost
- $0.18
- Wall time
- 35s
- Human step-ins
- 0
- Outcome
- Pass
Compare with other models on this task →
Summary
Exact prompt
# Mortgage amortization with extra monthly payments and lump sums `input.json` describes a fixed-rate loan plus planned prepayments (synthetic). Write `solve.py` (Python 3 standard library only) so that `python solve.py input.json answer.json` produces the payment, the baseline payoff, and the full schedule with prepayments. We re-run it on fresh inputs, so do not hard-code anything. ## Input `principal`, `annual_rate` (percent, e.g. 6.125), `years`, `extra_monthly`, `extra_start_month` (first month the extra is paid; months count from 1), `lump_sums` (list of `{"month", "amount"}`; several can fall in the same month and then add up). ## Rules 1. Money is exact cents with `decimal.Decimal` and ROUND_HALF_UP to 0.01 (convert input numbers with `Decimal(str(x))`). 2. Scheduled payment: with float r = annual_rate / 1200 and n = years * 12, x = principal * r / (1 - (1 + r) ** -n) computed in floats; payment = `Decimal(str(x))` rounded to cents. 3. Each month m: interest = round(balance * annual_rate / 1200) (in Decimal). Prepayment = extra_monthly if m >= extra_start_month (else 0) plus the lump sums for month m. If payment + prepayment >= balance + interest, this is the last month: the amount paid is balance + interest and the balance becomes 0. Otherwise the amount paid is payment + prepayment and the balance drops by (amount paid - interest). 4. The baseline is the same loan with no extra and no lump sums. 5. `interest_saved` = baseline total interest - total interest with prepayments; `months_saved` = baseline months - months with prepayments. ## Output `answer.json`: ``` {"payment": ..., "baseline": {"months": ..., "total_interest": ..., "last_payment": ...}, "with_extra": {"months": ..., "total_interest": ..., "schedule": [[month, amount_paid, interest, principal_paid, balance_after], ...]}, "interest_saved": ..., "months_saved": ...} ``` One schedule row per month, money as numbers with 2 decimals. ## Chart (required visual) Also write `chart.svg` in the working directory: a static, self-contained SVG (root element `<svg>`, no scripts, no external images, fonts, stylesheets or links) that can be rendered headless. It must contain `<polyline id="balance">` drawing the with-extra remaining balance by month. ## Scoring The `chart_svg_static` check (one more check, counted in partial credit) passes only if `chart.svg` exists after the fixture run, parses, has root `<svg>`, contains the ids above with the stated tags, and has no `<script>`, `<img>`/`<image>`, `<link>`, `<iframe>`/`<object>`/`<embed>`, `on*` handlers, or `href`/`src` pointing anywhere except `#...` or `data:`. Its drawing is not graded. Hidden checks (partial credit = fraction passed; all must pass), money within 0.011, counts exact: `payment`, `baseline`, `schedule_rows` (every row), `savings` on the given input; `fresh_run_1`, `fresh_run_2` (the whole answer on fresh inputs; one has two lump sums in the same month). Each run has a 60-second limit.
Every schedule row is compared: payment rounding, interest rounding each month, extra start month, same-month lump sums that add up, and the short final payment. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).
These are synthetic test cases for comparing AI models, not financial advice.
Success criteria: 1. payment 2. baseline 3. schedule_rows 4. savings 5. fresh_run_1 6. fresh_run_2 7. chart_svg_static
Setup notes: Use Case Scout batch 9 case j08-amortization-extra-payments (offline fixture). Prepared with batch9/prepare.sh; hidden key/tests kept outside the agent's work dir. Prompt = TASK.md verbatim. Scored with the scout's scorer: `python score.py WORKDIR KEYDIR`. Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Single run, no retries. Visual output (chart.svg) rendered offline to PNG with google-chrome headless, network blocked, 1280x800 at ~3 s after load. Claude Code's own reported cost for claude-opus-5.5: $0.182169. Score: 7/7. Cost is an ESTIMATE: measured tokens x pricing.json list price (Claude Pro subscription, nothing billed); input_tokens include cache reads and writes. Single run.
Estimated cost List-price estimate; not actually billed.
Output
Metrics
- Estimated cost
- $0.18
- Wall time
- 35s
- Human step-ins
- 0
- Turns
- 5
| Model | Input tok | Output tok | Cost |
|---|---|---|---|
| AClaude Opus 5.5anthropic/claude-opus-5.5effort default (no --effort flag) · thinking on | 103,775 | 3,998 | $0.18 |
Reproduce this run
- Use the use case prompt on the use case page.
- Same setup: Claude Opus 5.5 (anthropic/claude-opus-5.5, effort default (no --effort flag) · thinking on) via
Claude Code 2.1.299 (headless -p), cloud. - It counts as a success only if it meets every success criterion: 1. payment 2. baseline 3. schedule_rows 4. savings 5. fresh_run_1 6. fresh_run_2 7. chart_svg_static
- Log model, tokens, wall time, human step-ins and the evidence log, then submit it as a reproduction. A different model? Submit a head-to-head rerun.
How runs are scored: Methodology.
Was this useful?
Automated checks
Trust 80% comes from these checks (how Trust % works).
- Run date is not in the future : passed
- Model is in the dated pricing table : passed
- Cost recomputed from tokens matches : passed
- Cached tokens are consistent : passed
- Output throughput is plausible : passed
- Autonomy matches step-ins : passed
- Step-ins do not exceed turns : passed
- Retries agree with first-try result : passed
- Evidence log SHA-256 matches : passed
- Evidence log is substantial : passed
Evidence log
[
{
"duration_api_ms": 33727,
"stop_reason": "end_turn",
"session_id": "[REDACTED]",
"total_cost_usd": 0.1821694,
"usage": {
"input_tokens": 10,
"cache_creation_input_tokens": 10438,
"cache_read_input_tokens": 93327,
"output_tokens": 3998,
"output_tokens_details": {
"thinking_tokens": 311
},
"server_tool_use": {
"web_search_requests": 0,
"web_fetch_requests": 0
},
"service_tier": "standard",
"cache_creation": {
"ephemeral_1h_input_tokens": 10438,
"ephemeral_5m_input_tokens": 0
},
"inference_geo": "global",
"iterations": [
{
"input_tokens": 2,
"output_tokens": 643,
"cache_read_input_tokens": 22150,
"cache_creation_input_tokens": 434,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 434
},
"type": "message"
}
],
"speed": "standard",
"fallback_credit": null
},
"modelUsage": {
"claude-opus-5-5": {
"inputTokens": 10,
"outputTokens": 3998,
"cacheReadInputTokens": 93327,
"cacheCreationInputTokens": 10438,
"webSearchRequests": 0,
"costUSD": 0.1821694,
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"thinkingTokens": 311,
"canonicalModel": "claude-opus-5-5",
"provider": "firstParty",
"costBasis": "list"
}
},
"permission_denials": [],
"terminal_reason": "completed",
"fast_mode_state": "off",
"fast_mode_disabled_reason": "sdk_opt_in_required",
"subagent_stats": {
"spawned": 0,
"requested": {
"background": 0,
"foreground": 0,
"unset": 0
},
"started_in_background": 0,
"max_depth": 0,
"spawned_by_subagents": 0,
"completed": 0,
"failed": 0,
"killed": {
"parent": 0,
"user": 0,
"system": 0
},
"refused": {
"depth_limit": 0,
"concurrency_limit": 0,
"budget": 0
},
"by_type": {}
},
"safety_stops": 0,
"is_error": false,
"num_turns": 5,
"subtype": "success",
"api_error_status": null,
"result": "`solve.py` is written and runs on the given input. It writes `answer.json` and `chart.svg` in about a second.\n\n**Results for `input.json`** (285,000 at 2.942% over 15 years, 400 extra a month from month 2, a 7,000 lump sum in month 42):\n\n| | Months | Total interest | Notes |\n|---|---|---|---|\n| Payment | | | 1,960.22 |\n| Baseline | 180 | 67,839.01 | last payment 1,959.63 |\n| With prepayments | 140 | 51,579.12 | final payment 1,908.54 |\n| Saved | 40 | 16,259.89 | |\n\n**What I checked:**\n- **Schedule:** I spot-checked month 1, month 2 (when the extra starts) and month 42 (the lump-sum month, paid 9,360.22). The schedule ends at a balance of exactly 0.\n- **Same-month lump sums:** I tested a made-up input with two lump sums in month 24 (5,000 and 2,500.50). They added up correctly.\n- **Chart:** `chart.svg` parses, has root `<svg>`, and contains `<polyline id=\"balance\">`. It has no scripts, images or links. It also draws the baseline balance as a dashed line for comparison.\n\n**Behaviour to know about:** In my test input (200,000.50 at 6.125% over 30 years) the baseline took 361 months, not 360. Rounding the payment to cents rounded it down, which leaves a 4.35 final payment in month 361. The rules require that rounding, so I left it as is.\n\n**Assumptions in the script:**\n- A 0% rate is handled as principal \u00f7 months, so the payment formula doesn't divide by zero.\n- If `extra_monthly`, `extra_start_month` or `lump_sums` is missing, the defaults are 0, month 1 and none.",
"ttft_ms": 1484,
"type": "result",
"duration_ms": 34176,
"uuid": "[REDACTED]",
"ttft_stream_ms": 809,
"time_to_request_ms": 233,
"first_content_frame_ms": 809,
"queued_turn_count": 0,
"result_index": 0
}
]