Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Mortgage amortization with extra monthly payments and lump sums

AClaude Sonnet 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-20 · by @bobsiopener

Trust 80%Fully autonomoussuccess · first try
Estimated cost
$0.06
Wall time
19s
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-sonnet-5.5: $0.058733. 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.06
Wall time
19s
Human step-ins
0
Turns
3
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on59,0982,018$0.06

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. Same setup: Claude Sonnet 5.5 (anthropic/claude-sonnet-5.5, effort default (no --effort flag) · thinking on) via Claude Code 2.1.299 (headless -p), cloud.
  3. 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
  4. 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?

⇄ Rerun on another model

Automated checks

Trust 80% comes from these checks (how Trust % works).

Evidence log
[
 {
  "duration_api_ms": 18379,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.05873250000000001,
  "usage": {
   "input_tokens": 6,
   "cache_creation_input_tokens": 8367,
   "cache_read_input_tokens": 50725,
   "output_tokens": 2018,
   "output_tokens_details": {
    "thinking_tokens": 83
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 8367,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 342,
     "cache_read_input_tokens": 19185,
     "cache_creation_input_tokens": 1721,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 1721
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 6,
    "outputTokens": 2018,
    "cacheReadInputTokens": 50725,
    "cacheCreationInputTokens": 8367,
    "webSearchRequests": 0,
    "costUSD": 0.05873250000000001,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 83,
    "canonicalModel": "claude-sonnet-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": 3,
  "subtype": "success",
  "api_error_status": null,
  "result": "I wrote `solve.py`. `python solve.py input.json answer.json` writes `answer.json` and `chart.svg`. I ran it once on the given input but did not run the hidden checks or the SVG static check.\n\nResults on the given input:\n\n| Item | Value |\n|---|---|\n| Scheduled payment | 1960.22 |\n| Baseline | 180 months, total interest 67,839.01, last payment 1,959.63 |\n| With extra | 140 months, last payment 1,908.54 |\n| Interest saved | 16,259.89 |\n| Months saved | 40 |\n\n- **Same-month lump sums:** several lump sums in one month are added together, as the rules require.\n- **Zero rate:** a 0% rate would divide by zero in the payment formula, so I use principal divided by months in that case. The spec doesn't cover this.\n- **Chart:** `chart.svg` is plain SVG with axes, two text labels and `<polyline id=\"balance\">`, which plots the with-extra balance by month. It has no scripts, images or links.",
  "ttft_ms": 4247,
  "type": "result",
  "duration_ms": 18739,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 4058,
  "time_to_request_ms": 232,
  "first_content_frame_ms": 4058,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly