feat(sizing): strata sense-check — market-share-implied TAM cross-check (EDGAR-backed) - #143
Merged
Conversation
Comparable-revenue sense check for any market: implied TAM = sum(player revenue) / sum(market share), with a revenue floor and a per-player spread that flags inconsistent share estimates. With --concept it compares the implied TAM to the curated market's sourced scenario range (within/above/below), like convergence. Market shares are analyst estimates so the implied TAM is MODELED, never persisted (Q20). New strata.sizing.sense_check module + CLI command; strata size prints a cross-check pointer. 17 unit/CLI tests; ruff + pyright clean; 64 regression tests green.
…sidual, assumptions) Adversarial-review hardening so the market-share-implied TAM survives a TAM expert's critique: a sensitivity band (shares +/-25% -> the estimate is a range, not a point), a leverage factor (1/share) with a warning when combined share is small, an implied residual (rest-of-market revenue), a sourced-vs-estimate count per player, and an explicit assumptions block printed every run. New docs/methods/sense-check-defensibility.md maps the 10 standard expert arguments to how each is handled. 22 sense-check tests; 104 regression tests green; ruff + pyright clean.
…ll fy/fp) sense-check --player 'Name|edgar:TICKER|share' resolves a US-listed company's latest annual revenue live from SEC EDGAR XBRL (regulator-tier, sourced) instead of an analyst estimate, picking the newest annual fact across the Revenues and ASC-606 RevenueFromContract concepts. yfinance is quotes-only so not used; private cos stay estimates; STRATA_OFFLINE refuses live lookups. Fixes a latent EDGAR bug: _parse_fact crashed on present-but-null fy/fp in real companyconcept data. New revenue_lookup module; 6 lookup tests (mocked client) + 2 CLI tests + 2 edgar-parse regression tests; 275 regression tests green; ruff + pyright clean.
…#143) - EDGAR: select annual revenue by the fact's own period end, never fy/filed (a 10-K's comparatives all share the filing's fy + filed date); fiscal-year label derived from end; skip null/zero-val facts; Fact carries start/end; 3 more us-gaap revenue tags; miss error names every tag tried - MODELED (Q20) label is unconditional — shares are always analyst estimates, so an all-sourced-revenue run still carries the marker - Σshare ≥ 100% suppresses the sensitivity band, leverage, and residual (a band that excludes its own point estimate is never emitted); only the revenue floor + overlap warning survive - EDGAR revenue flagged as TOTAL company: inline caveat at resolution + per-player '(filing, total-co)' tag - Warn on a bare share token parsing to exactly 100% (the '1' → 100% trap) - CSV players parse directly into Player (no pipe-DSL round-trip; '|' in a name can't inject fields), optional 'sourced' column, ONE shared EDGARClient across rows; edgar specs enforce the same field count - New MCP tool 'sense_check' (27 tools): mirrors the CLI result, carries machine-readable modeled=true + label, edgar_ticker gated behind STRATA_MCP_LIVE_CONNECTORS=1 like get_connector_data - Docs aligned (≤ 25% leverage threshold, total-co caveat, unconditional MODELED); CHANGELOG [Unreleased] entries Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nnector, single-source labels, one-request revenue lookup Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ied) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
strata sense-check: a comparable-revenue cross-check for any market. Implied TAM = Σ(player revenue) / Σ(market share), with:docs/methods/sense-check-defensibility.md).--player 'Name|edgar:TICKER|share'resolves a US-listed company's latest annual revenue live from SEC EDGAR (+ fixes EDGAR null fy/fp parsing).test_edgar_parse_fact.py+ sizing tests.Why
A TAM number with no independent cross-check is just an assertion. This gives every sized market a second, sourced opinion from public-company revenue.
🤖 Generated with Claude Code