Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking off) on Discounted cash flow valuation with mid-year option and a sensitivity grid

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

Trust 80%Fully autonomoussuccess · first try
Estimated cost
$0.05
Wall time
10s
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt

# Discounted cash flow valuation with a sensitivity grid `input.json` gives forecast free cash flows and valuation assumptions for a fictional company (synthetic). Write `solve.py` (Python 3 standard library only) so that `python solve.py input.json answer.json` computes the valuation. We re-run it on fresh inputs, so do not hard-code anything. ## Input `fcf` (forecast free cash flow for years 1..N), `wacc`, `terminal_growth`, `mid_year` (bool), `net_debt` (can be negative = net cash), `shares`, `ebitda_last` (year-N EBITDA), `sens_wacc`, `sens_growth` (lists). ## Rules 1. Discount year t (t = 1..N) by (1 + wacc) ** t, or by (1 + wacc) ** (t - 0.5) when `mid_year` is true. `pv_fcf` = sum of discounted cash flows. 2. Terminal value (Gordon growth, at the end of year N): `terminal_value` = fcf_N * (1 + g) / (wacc - g). It is always discounted by (1 + wacc) ** N, even with the mid-year convention: `pv_terminal`. 3. `enterprise_value` = pv_fcf + pv_terminal; `equity_value` = enterprise_value - net_debt; `per_share` = equity_value / shares; `terminal_share` = pv_terminal / enterprise_value; `implied_ev_ebitda` = enterprise_value / ebitda_last. 4. If terminal_growth >= wacc, the whole answer is `{"error": "growth_not_below_wacc"}`. 5. `sensitivity`: a list with one row per value in `sens_wacc` (same order); each row has one entry per value in `sens_growth`: the per-share value with that wacc and growth (other inputs unchanged), rounded to 4 decimals, or `null` when growth >= wacc. 6. Round money values to 2 decimals and `per_share`, `terminal_share`, `implied_ev_ebitda` to 6 decimals when writing. ## Output `answer.json` keys: `pv_fcf`, `terminal_value`, `pv_terminal`, `enterprise_value`, `equity_value`, `per_share`, `terminal_share`, `implied_ev_ebitda`, `sensitivity`. ## Scoring Hidden checks (partial credit = fraction passed; all must pass): `pv_of_cash_flows`, `terminal_value`, `ev_equity_per_share` (money within 0.011, the three ratios within 0.000001), `sensitivity_grid` (within 0.0001, nulls exact) on the given input; `fresh_end_of_year` and `fresh_mid_year` (the whole answer, tolerance 0.011); `growth_not_below_wacc` (rule 4). Each run has a 60-second limit.

Mid-year discounting of cash flows but not of the terminal value, net cash vs net debt, null cells where growth >= discount rate, and the error case. 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. pv_of_cash_flows 2. terminal_value 3. ev_equity_per_share 4. sensitivity_grid 5. fresh_end_of_year 6. fresh_mid_year 7. growth_not_below_wacc

Setup notes: Use Case Scout batch 9 case j10-dcf-valuation (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. Claude Code's own reported cost for claude-sonnet-5.5: $0.045139. 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.

Metrics

Estimated cost
$0.05
Wall time
10s
Human step-ins
0
Turns
3
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking off38,8621,198$0.05

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 off) via Claude Code 2.1.299 (headless -p), cloud.
  3. It counts as a success only if it meets every success criterion: 1. pv_of_cash_flows 2. terminal_value 3. ev_equity_per_share 4. sensitivity_grid 5. fresh_end_of_year 6. fresh_mid_year 7. growth_not_below_wacc
  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": 9148,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.0451394,
  "usage": {
   "input_tokens": 4,
   "cache_creation_input_tokens": 7504,
   "cache_read_input_tokens": 31354,
   "output_tokens": 1198,
   "output_tokens_details": {
    "thinking_tokens": 0
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 7504,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 350,
     "cache_read_input_tokens": 18815,
     "cache_creation_input_tokens": 1228,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 1228
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 4,
    "outputTokens": 1198,
    "cacheReadInputTokens": 31354,
    "cacheCreationInputTokens": 7504,
    "webSearchRequests": 0,
    "costUSD": 0.0451394,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 0,
    "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`, and `python solve.py input.json answer.json` runs cleanly on the given input. I haven't checked the output against the hidden checks. I also haven't tested the mid-year path or the `growth_not_below_wacc` error case, because the given input exercises neither.\n\nResults on the given input:\n\n| Field | Value |\n|---|---|\n| `pv_fcf` | 2105.26 |\n| `terminal_value` | 5896.57 |\n| `pv_terminal` | 2337.13 |\n| `enterprise_value` | 4442.39 |\n| `equity_value` | 3193.69 |\n| `per_share` | 11.101156 |\n| `terminal_share` | 0.526098 |\n| `implied_ev_ebitda` | 5.913727 |\n\nThe script reads every value from the input file, so nothing is hard-coded.\n\nThe sensitivity grid has one row per `sens_wacc` value, in the same order. Entries are `null` wherever growth is at or above that row's WACC. The first rows I printed have `null` in the last growth column.",
  "ttft_ms": 5821,
  "type": "result",
  "duration_ms": 9461,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 2473,
  "time_to_request_ms": 241,
  "first_content_frame_ms": 2473,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly