Claude Opus 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 Opus 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-20 · by @bobsiopener
- Estimated cost
- $0.22
- Wall time
- 47s
- 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.21 (8 cores). Claude Code's own reported cost for claude-opus-5.5: $0.219439. 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.22
- Wall time
- 47s
- 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 | 111,269 | 4,677 | $0.22 |
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. 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
- 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": 46255,
"stop_reason": "end_turn",
"session_id": "[REDACTED]",
"total_cost_usd": 0.2194392,
"usage": {
"input_tokens": 10,
"cache_creation_input_tokens": 13283,
"cache_read_input_tokens": 97976,
"output_tokens": 4677,
"output_tokens_details": {
"thinking_tokens": 1301
},
"server_tool_use": {
"web_search_requests": 0,
"web_fetch_requests": 0
},
"service_tier": "standard",
"cache_creation": {
"ephemeral_1h_input_tokens": 13283,
"ephemeral_5m_input_tokens": 0
},
"inference_geo": "global",
"iterations": [
{
"input_tokens": 2,
"output_tokens": 703,
"cache_read_input_tokens": 24370,
"cache_creation_input_tokens": 1059,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 1059
},
"type": "message"
}
],
"speed": "standard",
"fallback_credit": null
},
"modelUsage": {
"claude-opus-5-5": {
"inputTokens": 10,
"outputTokens": 4677,
"cacheReadInputTokens": 97976,
"cacheCreationInputTokens": 13283,
"webSearchRequests": 0,
"costUSD": 0.2194392,
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"thinkingTokens": 1301,
"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": "I wrote `solve.py` and ran it on `input.json`; it produced `answer.json` without errors. I can't run the hidden checks, so the numbers aren't confirmed against the expected answers yet.\n\n**Results on the given input:**\n- **Payoff:** none (`payoff_date` is null). Final principal is 11,985.62, accrued interest 28.64 and fees outstanding 0.\n- **Totals:** interest paid 3,576.78, fees paid 592.16, principal paid 14,414.38, nothing refunded.\n- **Late fees:** 20 were charged. The April 30 payment comes one day before the May 1 due exists, so it credits nothing (the April due was already fully paid). From then on each payment covers the previous month's due after its 15-day grace period has ended. So almost every due from May 2027 onward is marked late. This follows rule 5 to the letter, and I believe it's the cascade the task means by \"one early mistake changes every later number.\"\n\n**Second test:** I also ran a made-up variant: 30/360 day count, due day 31, plus a 30,000 payment on Feb 29, 2028. It paid off that day. Accrued interest went to 0, statements kept coming out on later due dates, and the extra money was refunded.\n\n**Cases the rules don't settle, and what I chose:**\n- Fees are applied in the order they're added: by date, then input order, with late fees after any other fee from the same day. The input lists fees out of date order, so this matters.\n- Rate changes and fees dated on or before `start_date` apply from the start. Payments dated on or before `start_date` are ignored.\n- Late-fee checks still run after payoff. Payments made after payoff still credit dues and pay fees, and anything left over is refunded.\n- Final `accrued_interest` is rounded half up to cents, the same as in statements.\n\nIf a hidden check fails, these choices are the first place I'd look.",
"ttft_ms": 2892,
"type": "result",
"duration_ms": 46785,
"uuid": "[REDACTED]",
"ttft_stream_ms": 1996,
"time_to_request_ms": 249,
"first_content_frame_ms": 1997,
"queued_turn_count": 0,
"result_index": 0
}
]