MIS v2 — Definition of Done / Pre-Build Completeness Contract
Why this exists (Sam's ask): "How can we be SURE we don't miss anything before we build — even for 2 tickers: every formula, every thought process, every angle, formatting, all the lessons, forward-thinking, Snapshot, Test Entry, the bot connection?"
The guarantee, three layers:
1. Coverage — this checklist enumerates every element. Nothing gets built that isn't on it; nothing is "missed" that isn't either [SCOPE: 2-ticker] or [CAPTURED → Phase N] (deferred with a home).
2. Correctness — for INTC + NVDA, every cell gets a formula trace (input → formula → output) hand-verified against an independent calc.
3. Rigor — adversarial multi-hat review (quant / PM / data-auditor / Einstein-skeptic), check → fix → re-check until a pass finds nothing → a written 2-ticker proof doc.
The gate: Sam reviews THIS list and adds anything missing. We lock it. Then build. "Done" = every [SCOPE: 2-ticker] row passes its test.
Source of truth for the logic:docs/MIS_V2_LOGIC_CAPTURE.md(capture + full-history sweep). This doc is the acceptance contract on top of it.
Legend: [2T] = must work in the 2-ticker build · [→Pn] = captured, built in Phase n · PROVE = the acceptance test.
A. Every formula / data field
| Field | Formula (from capture §2-4) | Scope | PROVE (INTC+NVDA) |
|---|---|---|---|
| Price / %chg / name | GOOGLEFINANCE now (Finnhub-cached →P3) | [2T] | matches a manual quote within the 15-min window |
| 3D / 10D / 30D %, 30D-avg, Above/Below | close-window returns | [2T] | hand-recompute one window from raw closes |
| 13W/52W hi-lo + % from | MAX/MIN close windows | [2T] | matches chart |
| Vol%(30D), Today-Range%, Compression | STDEV/AVG; range≤0.9×vol | [2T] | compression flag correct vs the math |
| Trend / Momentum-Regime / Flow-proxy | derived booleans | [2T] | logical truth-table check |
| Flow Strength (rescaled — fix the 76-peg) | continuous (vol-vs-avg + RS + slope), NOT the ±8/±18 step | [2T] | INTC≠NVDA Flow values; not pegged |
| Composite (rescaled 0-100 — fix the cap) | real 0-100, not Flow×0.6+Event×3 | [2T] | can exceed 46; spans the range |
| SACS (weighted, capture §10b) | Composite×0.3+Flow×0.3+min(100,RR×20)×0.2+Grade×0.2 | [2T] | components sum correctly; 0-100 |
| Grade bands | A≥40·B≥25·C≥10·D<10 | [2T] | a strong name can reach A/B |
| RS_SPY / RS_Sector, z-score, Outlier, Contrarian | returns-based (not price levels) | [2T] | z denominator = sector stdev; no div0 |
| ATR14, Stops 1/1.3/2×, %Risk, Shares, $Risk | capture §4 (sound) | [2T] | Shares = FLOOR(equity×1%/ |
| R:R (fix the hardcoded 2.0) | varies by setup (target/stop distances) | [2T] | INTC R:R ≠ NVDA R:R |
| Regime / VIX / 10Y / Treasury | capture §5 | [2T] | regime label matches VIX vs bands |
| Earnings next-date (+depth →P3) | EARNINGS_MASTER | [2T] date · [→P3] dividend/insider/surprise | date matches a known calendar |
| Volume surfaced (was captured, never shown) | vol vs 30D-avg | [2T] | renders "Vol 1.4x avg" |
A2. Macro / Market pulse — correctness (the layer the old system NEVER got right) — [2T]
Audited 2026-05-26 brief (latest; no 5/27 yet at 12:30 AM). Verbatim Macro row: Gold $412 · Bitcoin $75,871 (+0.00%) · Ethereum $15.65 · USD $27.77 · Oil $137 · Brent $53 · 10Y 4.51%. Verdict: ✅ Indices (S&P/Dow/Nasdaq/Russell) + 10Y = real, keep. ❌ Gold $412 = GLD ETF not spot (~10× off); BTC delta frozen +0.00% (no prior close); ETH $15.65 = ETHA ETF not ETH (~200× off); USD $27.77 = UUP ETF not DXY; Oil $137 / Brent $53 = USO/BNO ETFs and Brent
B. Every thought-process / angle (analytical lenses)
Momentum (multi-window + RS) · Volatility/risk (ATR, vol, VSM, drawdown) · Mean-reversion (z-score, distance-from-extremes, compression) · Flow/quality (rescaled Composite, Flow) · Regime context (VIX/treasury/sector) · Event (earnings proximity, news) · Behavioral gates (Do-Not-Buy, wash-sale, never-add-to-loser, −20% stop, max-12). [2T] — each lens feeds an FSE input for INTC+NVDA; PROVE: trace each lens → its effect on the FinalState.
C. FSE — decision logic (the single classifier)
| Element | Scope | PROVE |
|---|---|---|
| 11-gate resolver, first-fires-wins (capture §10a) | [2T] | INTC + NVDA each resolve to ONE FinalState via a named gate |
| Reject codes (canonical list) | [2T] | the firing code is the correct one |
| 6 permission tiers (not binary) | [2T] | top-line tier matches the day's regime/state |
| No surface classifies independently | [2T] | the briefing line reads FinalState FROM FSE — no second opinion; zero OK-vs-EXIT contradictions |
| FINAL_STATE_HISTORY append + delta | [→P3] | (captured; delta block later) |
| 15-point acceptance test (capture §10d) | [2T] the applicable subset | the test-basket logic holds for 2 tickers |
D. All the lessons (locked rules → enforcement)
| Lesson | Enforced how | Scope |
|---|---|---|
| No-Monday-morning-QB | every warning surfaces INLINE before the decision | [2T] |
| Direction on every signal | ↑/↓ + today's % @ price leads every line | [2T] |
| Tab-duplicity defense | Include literal "Y"; IFERROR(primary,IFERROR(secondary,warned)) never silent-0 |
[2T] |
| Check-sheet-before-external | read the tab before any API claim | [2T] |
| Capture-is-not-closure / done-survives-Tuesday | each phase ends at a passing acceptance test | [2T] |
| Anti-80% / Session-Stop | one ticker end-to-end before scaling; stop at the gate | [2T] |
E. Formatting / render
Bold dark tickers · action labels as badges · middle-dot separators · colored % (green+/red−) · plain-text vs HTML variants · NO markdown in Telegram · 12-hr times, no seconds · decision-grade (answers: can I trade? what passed? what failed? what's blocked? what's the risk? what invalidates it?) not dashboard. [2T] for the one briefing line + the FSE row render; full email polish [→P3].
F. Forward-thinking
FORWARD_NOTE (pre-open futures + pre-market movers + real macro calendar + overnight news → synthesized "what to watch") · scenario framing ("if SPY holds open → X") · "what would invalidate the thesis" · the follow-up tracker → self-correction (act on the miss, don't just log it). [→P3] — captured + has a home; PROVE (now): the FORWARD_NOTE tab exists + the brief is wired to lead with it (empty until P3).
G. Snapshot (sizing) — [2T] + dual-stop override [→P3]
The ATR cascade (capture §4, now with the REAL ATR = avg daily High−Low range): ATR14 → stops 1/1.3/2× → %risk → shares (1% of equity) → $risk. Stop capped at Max_Stop_Pct (default 8%); RiskGate passes when the position is sizeable (Shares≥1). PROVE (done, Run 2): INTC ADD @ 26 sh ≈ 1% risk; NVDA REJECTED; no lethal sizing.
- Dual stop — system default + per-trade hard max-loss OVERRIDE (Sam, 2026-05-27): the R:R/ATR stop is the default; the trader can set a per-trade Max_Loss_Pct (e.g. 2.5%) and the actual stop = the TIGHTER of (ATR-based stop, Max_Loss_Pct), with the position re-sized to that hard cap. Rationale: on a volatile high-conviction name (e.g. NVDA) where the ATR stop is wide because the upside R:R justified it, you can still "go for it" but never get quietly taken 7% down on an unexpected adverse move. Mechanism = the Entry Pad ACTUAL-vs-IDEAL (your ACTUAL stop overrides the system's IDEAL); plus a global Default_Max_Loss_Pct dial in Reference_Rules. Fixed where sensible, customizable per trade. PROVE (P3): set Max_Loss_Pct=2.5% on a wide-ATR name → stop clamps to −2.5%, shares re-size, $risk still ≈ 1%.
H. Test Entry / Entry Pad — ANALYZED (formulas read 2026-05-27) — [→P3, captured]
Three layers found in the repo (MIS/audits/v2_extracts/ + MIS/scripts/v11_excerpts_for_v1.gs):
- Mobile sandbox (buildTestEntryTab/runTestEntry): type ONE ticker in a cell → computes Category · SACS · Live Price · Model Size · Stop · Target · Downside% · Upside% · Risk$ · Target$ · Reason · Blocks · Headline-Check. The 1-field→everything primitive.
- Entry Pad ticket (Entry_Pad.csv): single screen, ACTUAL (your call) vs IDEAL (system says) side-by-side — Entry/Qty/Stop/Target/Risk-per-share/$Risk/R:R/Position$ — plus MIS CONTEXT (Sector·Composite·Setup·Flow·10D%·52W-high·RiskGate·RejectCode) + VERDICT + Last-Buy date/price + Net Qty Held + Re-Entry Zone + 7-day RECENT PERFORMANCE + a PRE-TRADE CHECKLIST (Symbol? live price? Composite≥60? RiskGate clear? Stop set? R:R≥2x? $Risk in budget?). This discipline tool is a keeper — build it into v2.
- EntryTracker (EntryTracker.csv, 48 cols): the trade journal — Buy/Sell·Symbol·Date·Qty·Price·Fees·%ChgSince·$P/L·Net-Qty-Held·Stop·Target·Conviction(1-3)·Strategy·TradeType·Re-Entry-Zone·R:R·Position-Size·Outcome-Archetype… → the source for HOLDINGS_CLEAN + the backtest + wash-sale/re-entry tracking.
PROVE (P3): a 4-field/1-field entry cascades to a full computed ticket with ACTUAL-vs-IDEAL + the pre-trade checklist; EntryTracker is the trade-log of record.
K. Interactive ticker explorer — the "Airbnb of your tickers" — [→P4, captured]
Not just static charts. The vision: an interactive, filterable, sortable explorer over the full ~200-ticker universe — the way you search Airbnb (neighborhood + price + reviews + stars + check-in + seasonal + amenities), but the facets are ticker attributes. Facets/filters: sector · SACS · grade · FinalState (ADD/STARTER/WATCH/REJECTED) · momentum window · RS vs SPY/sector · price range · volume-vs-avg · earnings proximity · regime fit · held/not-held · Do-Not-Buy · wash-sale window · compression. Views: top-10 / top-200 (sort any column) · sector pie · universe heatmap (by SACS/return) · per-ticker drill-down (candlestick + the lenses). Saved personal watchlists + sorts. Interactive now; open to 3-D / AI-rendered later. PROVE (P4): on the portal (behind Access), filter the universe by ≥3 facets at once, sort, and drill into a ticker — reading the same MIS-sheet output feed.
I. The bot connection — [→P2, captured]
Same bot, new sheet: MIS_TRADES_SHEET_ID (= 1N2v-MDDi…) + getTradesWorkbook_() + buildMisContext_() (reads FSE + holdings + FORWARD_NOTE) + MIS/POSITION/TRADE commands; briefing leads with MIS; MIS already in sensitiveLanes. PROVE (P2): Telegram MIS returns the live FSE state read from the v2 sheet; no bot regression; clean clasp push.
L. Harvested from the z-tracker (Sam's personal workflow — 2026-05-27) — [→P3/P4, captured]
Read MIS/working-copies/zGoogle Finance Investment Tracker.xlsx. Take into v2:
- Preset filtered views = the explorer's lenses (§K): TopConviction · OversoldSetups · ContrarianView · SignalView · Buy Radar · Filtered Picks — each a SORT(FILTER(universe, criteria)). Ship these as the named presets of the Phase-4 explorer.
- Buy Radar already carries Attractive Re-Entry · Do Not Buy · Wash Sale Expiry · Closed Date → the re-entry/wash-sale columns for Ticker_Memory.
- "Do Not Buy List" = the closed-trades tax-lot log (Symbol/Closed/Opened/Qty/Proceeds/Cost/GainLoss/Term/Wash Sale?). This is the SOURCE that feeds Do-Not-Buy (recently closed → wash window). v2: ingest closed trades → derive Do_Not_Buy + Wash_Until in Ticker_Memory.
- Watchlist staleness: "Weeks Before a Position = Stale" + Re-entry-trigger % + Price-drop-trigger → time-in-position discipline (MIS lacked it). v2: Position_Intent computes weeks-held + a Stale flag from Entry_Date/Target_Hold.
- Entry Pad carries live index context (NASDAQ/S&P/DOW) + a Conviction level (1-3) that scales Risk:Reward → fold into the Entry Pad + bucket logic.
- Option Expressions (per-signal: Suggested Option Play / Strike Zone / Time Horizon / Logic / Risk) — a later explorer view.
M. Harvested from recent MIS briefings (outputs/, last 3 weeks) — net-new, no contradictions
- REDUCE/EXIT graduation into FSE.FinalState (thresholds LOCKED, propagation TODO when holdings wire): P&L<−7% & held>30d → REDUCE (trim 25-50%) · P&L>+20% & trending-down 5d → REDUCE (lock) · P&L<−15% & held>90d → EXIT. The 2-ticker FSE has no holdings input; add the held-position gate (canonical resolver gate 3) at P2/P3 so the verdict graduates, not just a text note. (5/20 §4, 5/14 §3.)
- Surface signals already computed but hidden: Volume (
Vol 1.4× avgin BLUF) + RVI (Snapshot already carries them) — render them. (5/20 §8.) - Moving averages: add 50DMA/200DMA via
GOOGLEFINANCE(t,"price50"/"price200")(2 new Momentum cols) → "AAPL · 50DMA $290 (+3.4%) · 200DMA (+11.9%)". (5/20 §8.) - Market-cap bucket (Mega>$200B/Large/Mid/Small/Micro) via Finnhub profile2 → a
MarketCap_Bucketcolumn on Tickers. (5/20 §8.) - Holdings seed = the 5/20 paste block (
outputs/2026-05-20_14-00_action_holdings-paste-may20-v2.md, 21 rows, 4 sub-accounts: Fid Margin Z29720600 / Fid Cash Z29835692 / Schwab …898 / a 2nd Schwab) — supersedes the 5/14 block; single source of truth. - Command Center 9:00 AM SMS (alert string CC J3:N11) — already in v1; in v2 the bot covers notifications (verify; likely moot).
The 5/13/5/14/5/20 briefings otherwise confirm the weighted-SACS / ATR / grade-bands / FSE-single-classifier approach — no architecture changes needed.
N. Foundations to LOCK before scaling the universe (Sam, 2026-05-27)
Sam: don't add tickers until these are right + understood + always visible.
- Earnings — always-right across sources. Pull next-earnings from Finnhub (authoritative) → cache in EARNINGS_MASTER (Ticker · Next_Earnings · Source · Last_Updated · Confidence). When sources disagree on the date, take the sooner confirmed date (conservative — block early) and flag Confidence. Always show DaysToEarn + EarnFlag (Pre-Earnings if ≤5d). Needs FINNHUB_API_KEY (setup card Step 2). PROVE: 5 known earnings dates match; a disagreeing source flags low confidence.
- Market cap + milestones. Add MarketCap (Finnhub profile2) + MarketCap_Bucket (Mega>$200B / Large $10-200B / Mid $2-10B / Small $300M-2B / Micro<$300M) on Tickers. Flag milestone proximity (round-number cap, 52w extreme) — small $ move = big % on small caps. Always shown.
- Volatility + volume — understand AND always see. Already computed (Vol30D, Volume-vs-30d-avg, RVI) — surface them ("Vol 1.4× avg", "30d vol 2.2%", RVI) in the brief + Entry Pad. Volume judged vs prior volume. Never hidden.
- Classification + benchmarks. Sector · Industry · sub-category · Type (Stock / ETF / Index / Leveraged 1-2-3x / Commodity / International / Bond) on Tickers. Sector_Map maps sector→benchmark ETF. Add the broad benchmarks (SPY/QQQ/IWM/DIA + the 11 sector ETFs + key commodity/intl/leveraged proxies) so RS + hedging comparisons are correct.
- Up / down / protected playbook (the thesis answer to "is there money if it's not an up-market?"). Regime drives posture: Up → lean into ADD + selective leverage; Choppy → STARTER only, smaller size; Down → mostly cash + selective inverse/short ETFs + hedges, capital protection first (the −20% hard stop + the per-trade Max_Loss_Pct override). Yes there's money down (inverse/hedge) — but never get the rug pulled; protect first. Encode regime→posture in the brief's top line.
- Universe construction (the right names). Pick by weight / news / 5-10yr direction / what Sam thinks. Sam's rules: default >$20 (saner swings) — <$10 only if the sector/opportunity is too important to miss; include hedges + 1x/2x/3x sector leveraged ETFs (up & down) where they make sense; bonds/corp-bonds = probably not. Each ticker carries a short "why included." Flag any significant name we're missing.
J. Verification protocol + sign-off
- Build the 2-ticker engine against rows above. 2. Cell-by-cell trace INTC+NVDA (input→formula→output vs independent calc). 3. Adversarial hats: quant (stats/look-ahead/div0?), PM (actionable/risk-first?), data-auditor (stale/NaN/contradiction?), Einstein-skeptic (hidden assumption? edge cases — 52w-high, halted, earnings-tomorrow, missing data?). 4. Fix → re-review until a pass finds nothing. 5. Write
docs/MIS_V2_2TICKER_PROOF.md(the trace + every flaw found + resolution). Only then is Phase 1 "perfect with 2 tickers."
Sign-off gate
Sam: review this list. Add anything you feel is missing (a formula, an angle, a lesson, a format). When you say it's complete, we lock it and build the 2-ticker engine against it — and it's "done" only when every [2T] row passes its PROVE test and the proof doc is clean.
Pre-build contract · 2026-05-26 · Claude Code. Pairs with MIS_V2_LOGIC_CAPTURE.md.