Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Loan servicing with daily accrual, 30/360 quirks, dues crediting and a payment waterfall

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.08
Wall time
27s
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt

# Loan servicing: daily accrual and payment waterfall `input.json` (synthetic) gives a `loan` (`principal`, `start_date`, `annual_rate`, `day_count` "ACT/365" or "30/360", `installment`, `due_day`, `grace_days`, `late_fee`), `payments`, `rate_changes`, `fees` (each with ISO `date`), and `end_date`. Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json`. Fresh inputs are generated (both day counts, with and without payoff). One early mistake changes every later number, so follow the order exactly. ## Rules 1. Use exact decimals (`decimal.Decimal` built from the JSON numbers' string form). "Round" = half up. 2. Simulate each day d from the day after `start_date` through `end_date` inclusive. Within a day, in this order: (a) rate changes dated d take effect; (b) interest accrues; (c) fees dated d are added; (d) if d is a due date, a due is created; (e) payments dated d are applied, in input order; (f) late-fee checks; (g) if d is a due date, a statement is written. 3. Accrual (only while not paid off), added to `accrued` (unrounded): - ACT/365: round(principal * rate / 365, 8 decimals) every day. - 30/360: round(principal * rate / 360 * n, 8 decimals) where n = 1 for a normal day, **0 on the 31st**, and on the last day of February n = 30 - day + 1 (Feb 28 = 3, leap Feb 29 = 2). 4. Due date each month: day `due_day`, or the month's last day if shorter. No due is created on `start_date`'s day itself or after payoff. Due amount = min(installment, principal + accrued rounded **down** to cents + outstanding fees). 5. A payment first **credits dues**: open dues dated on or before the payment date, oldest first, each up to its remaining unpaid amount. Independently, the whole payment goes through the **waterfall**: outstanding fees oldest first, then interest = min(rest, accrued rounded down to cents), then principal; anything left is `refunded`. Interest paid reduces `accrued` exactly (sub-cent fractions stay). 6. When principal reaches 0: `payoff_date` = that date, accrued is set to 0, and accrual stops. 7. Late fee: on the day due date + `grace_days`, after payments, if that due is still not fully credited, add a fee of `late_fee` (kind "late") once for that due and mark it late. 8. Statement on each due date (rule 4's days, including after payoff): `{"date", "principal", "accrued_interest" (rounded to cents), "fees_outstanding", "rate"}`. ## answer.json `{"statements": [...], "payoff_date": date or null, "final": {"principal", "accrued_interest", "fees_outstanding"}, "totals": {"interest_paid", "fees_paid", "principal_paid", "refunded", "late_fees" (count)}, "dues": [{"date", "due", "paid", "late"}, ...]}` (money as JSON numbers). ## Scoring Hidden checks (partial credit; all must pass; money within 0.001): `first_3_statements`, `all_statements`, `dues_and_late_flags`, `totals`, `final_and_payoff` on the given input; `fresh_run_1`, `fresh_run_2`, `fresh_payoff_30_360`, `fresh_payoff_act365` (whole answer) on fresh inputs. 30-second limit per run.

Eight-decimal daily accrual vs cent rounding, the 30/360 day-31 and end-of-February rules, the within-day event order, dues crediting separate from the waterfall, interest paid in whole cents only, and payoff. 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).

Success criteria: 1. first_3_statements 2. all_statements 3. dues_and_late_flags 4. totals 5. final_and_payoff 6. fresh_run_1 7. fresh_run_2 8. fresh_payoff_30_360 9. fresh_payoff_act365

Setup notes: Use Case Scout batch 12 case m03-loan-servicing-waterfall (offline, synthetic fixture). Prepared with batch12/prepare.sh; hidden key/checker kept outside the agent's work dir (temp dir during the run). Prompt = TASK.md verbatim. Scored with the case's scorer: `python score.py WORKDIR KEYDIR` (python3, run from the case dir). Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Single run, no retries. 1-min load average at scoring 0.12 (8 cores). Claude Code's own reported cost for claude-sonnet-5.5: $0.079204. Score: 9/9. 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.

Metrics

Estimated cost
$0.08
Wall time
27s
Human step-ins
0
Turns
4
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on82,4922,974$0.08

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. first_3_statements 2. all_statements 3. dues_and_late_flags 4. totals 5. final_and_payoff 6. fresh_run_1 7. fresh_run_2 8. fresh_payoff_30_360 9. fresh_payoff_act365
  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": 25582,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.079204,
  "usage": {
   "input_tokens": 8,
   "cache_creation_input_tokens": 10564,
   "cache_read_input_tokens": 71920,
   "output_tokens": 2974,
   "output_tokens_details": {
    "thinking_tokens": 492
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 10564,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 461,
     "cache_read_input_tokens": 20344,
     "cache_creation_input_tokens": 2759,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 2759
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 8,
    "outputTokens": 2974,
    "cacheReadInputTokens": 71920,
    "cacheCreationInputTokens": 10564,
    "webSearchRequests": 0,
    "costUSD": 0.079204,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 492,
    "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": 4,
  "subtype": "success",
  "api_error_status": null,
  "result": "I wrote `solve.py` and ran it on `input.json`, which produced `answer.json`. I had no expected answers to compare against, so I only checked that the output looks plausible.\n\nOn the given input:\n- **Payoff:** none. At `end_date` the principal is still 11,985.62, with 28.64 accrued interest and no outstanding fees.\n- **Dues:** the first due (2027-04-01) was paid in full and on time. The next three (2027-05-01 through 2027-07-01) were credited in full but flagged late. Their payments landed after the grace period, which is a consequence of the payment dates in the input.\n- **Totals:** 20 late fees, 3,576.78 interest paid, 14,414.38 principal paid, 592.16 fees paid, and nothing refunded.\n- **First statement (2027-04-01):** principal 26,400, accrued interest 197.38, rate 0.0941.\n\nI also made three interpretation calls where the spec was silent:\n- Fees in the input aren't in date order, so each fee joins the outstanding list on its own date. \"Oldest first\" then means the order they were added.\n- A late fee joins the outstanding list on the day it's charged, just like any other fee.\n- Payments after payoff go to outstanding fees first, and the remainder is refunded.\n\nI didn't exercise the 30/360 path or a payoff case, since the given input is ACT/365 with no payoff.",
  "ttft_ms": 2642,
  "type": "result",
  "duration_ms": 26049,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1838,
  "time_to_request_ms": 299,
  "first_content_frame_ms": 1838,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly