Skip to content

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

AClaude Haiku 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.0085
Wall time
39s
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-haiku-5.5: $0.008531. 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.0085
Wall time
39s
Human step-ins
0
Turns
5
Model usage
ModelInput tokOutput tokCost
AClaude Haiku 5.5anthropic/claude-haiku-5.5effort default (no --effort flag) · thinking on124,3128,491$0.0085

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. Same setup: Claude Haiku 5.5 (anthropic/claude-haiku-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": 37743,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.00853104,
  "usage": {
   "input_tokens": 10,
   "cache_creation_input_tokens": 16008,
   "cache_read_input_tokens": 108294,
   "output_tokens": 8491,
   "output_tokens_details": {
    "thinking_tokens": 4426
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 16008,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 742,
     "cache_read_input_tokens": 27692,
     "cache_creation_input_tokens": 855,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 855
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-haiku-5-5": {
    "inputTokens": 10,
    "outputTokens": 8491,
    "cacheReadInputTokens": 108294,
    "cacheCreationInputTokens": 16008,
    "webSearchRequests": 0,
    "costUSD": 0.00853104,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 4426,
    "canonicalModel": "claude-haiku-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": "I wrote `solve.py` and ran it on the given `input.json`. It produces `answer.json` and `chart.svg` and follows the rules as written.\n\n**Results on the given input:**\n- Payment: 1960.22\n- Baseline: 180 months, total interest 67,839.01, last payment 1959.63\n- With extra: 140 months, total interest 51,579.12\n- Interest saved: 16,259.89; months saved: 40\n\n**Checks I ran:**\n- The SVG parses as XML, its root is `<svg>`, it contains `<polyline id=\"balance\">`, and it has no script, image, link, iframe, object, embed, `on*` handlers, or external `href`/`src`.\n- A second input with two lump sums in the same month (12) runs cleanly and sums them correctly.\n- Money in `answer.json` is written as fixed two-decimal numbers (e.g. `0.00`, `1908.54`).\n- The script runs in about 0.02 s, well under the 60 s limit.\n\n**Choices I made:**\n- `chart.svg` is written to the current working directory, as the spec says. The polyline runs from month 0 (principal) through each month's `balance_after`, with the axes scaled to the principal.\n- `extra_monthly` and `extra_start_month` default to 0 and 1 when absent, and missing `lump_sums` is treated as empty.\n- The loop stops with an error after 12,000 months, so a loan that never amortizes cannot hang the run.\n\n**Something you may see in fresh runs:** the baseline can end with a tiny final payment. In the second test, the baseline ran 361 months with a last payment of 1.21. The payment is rounded to cents, so the loan is slightly under-amortized after the scheduled term. This follows rule 3 exactly, so I left it as is. If the checker expects the baseline to end at `years * 12`, that would be a rule change to discuss.\n\nThe scratch files are in `/tmp/j08t`, outside the work directory.",
  "ttft_ms": 8034,
  "type": "result",
  "duration_ms": 38279,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1387,
  "time_to_request_ms": 320,
  "first_content_frame_ms": 1387,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly