MIS Lineage — the family tree of Sam's trading brain (LIVING doc)
Purpose: preserve, formula-level, every generation of Sam's Market Intelligence System so the logic he built over years is never re-discovered or lost. This is "the heart of MIS." Built from a 9-agent deep-read (Jun 30, 2026) across the live sheets, Apps Script, forensic teardowns, and the formula archives.
Last updated: Tue Jun 30, 2026 · 4:23 PM EDT (NY). Canonical engine today =MIS/v2/Code.gs(frozen). Read this withMIS_OPERATOR.md(the beacon) +MIS_FSE_ARCHITECTURE.md.
The one-line genealogy
zGoogle Tracker (118 names, 4 flags) → v7.1 blueprint (thin, Oct 2025) → v7.1 rebuilt workbook (≈184 names, SACS born here, Apr 2026) → v11 family (183-ticker, 5-gate, 3 emails/day, broke Jun 2) → v2 (decomposed, 27 names, frozen, the clean re-pour).
The crucial truth: v2 is not a from-scratch design — it is a clean re-pour of v7.1's engine (it inherited the 56-column Momentum_Engine and the Snapshot gate cascade verbatim), with v11's 8 documented flaws fixed and v2's own cash-flow discipline added on top. The SACS formula has run unchanged from v7.1 through v2.
Generation 0 — zGoogle Finance Investment Tracker (the ancestor)
- Sheet:
1QUIJQBLTSkGcfbQ_nd1T7wvkOqv0fvni72lLREj18H8· created 2025-04-03 · last structural edit 2026-02-26 · owner sam@. No bound Apps Script — 100% native GOOGLEFINANCE + array formulas. - ⚠️ Live-on-open only: GOOGLEFINANCE recomputes when Sam opens the sheet. Nothing can read it live headlessly — the API returns the last cached values from when it was last open. This is exactly the "excavate the spreadsheet for hours" pain, and the reason "all my tickers live on my phone" must be served off a real quote feed (Schwab/Finnhub), not mirrored from this sheet.
- 28 tabs; 4 do the work:
Watchlist(the brain — 118 names, ~60 computed cols),EntryTracker(187-row buy/sell ledger — source of Last Buy Date/Qty/Lot Price),Entry Pad(conviction × risk-$ → target/stop/shares),Positions(held-position risk view, one big SORT(FILTER) of Qty>0). - The 4 hard flags (preserve these — they're the soul of Sam's read):
| Flag | Trigger | Cell |
|---|---|---|
| DROP | price < 85% of cost-basis/share ($C$1=0.85) |Q SmartPing|
| Re-entry | price < 80% of 13W-high ($O$4=0.8) |N / O / AR|
| Overweight | cost basis > 14% of account ($R$4=0.14) |R Rebalance|
| Momentum | price ≥ 87.5% of 13W-high ($Z$4=0.875) |Z Near High| - Conviction sizing rule (EntryTracker AL1): risk 0.5% / 1% / 2% of account at conviction 1 / 2 / 3.
- Position brackets (Positions tab): target = Last-Lot +5%, stop = Last-Lot −2.5%; trailing second-stop ratchets up once +4% in profit (
AC); optimal-shares =ROUNDUP(maxRisk / risk-per-share); emits "add N / sell N / oversized." - Composite decision layer:
BF Action Priority Flag(nested-IF off range-position/vol/compression/grade) → Lean In / Hold-High-Vol / Trim-Monitor / Breakout-Watch / Weak-Reassess…, withBGplain-English rationale,BJperf grade (A/B/C/D off 10-day return),BK13W risk-to-reward zone. Wash-sale:BN Do Not Buy+BO30-day expiry. - Data: GOOGLEFINANCE only. Hand-entered = Symbol, Qty, Cost Basis + the ledger + trigger constants.
Generation 1 — v7.1 ("Momentum Architect"). NOTE: two artifacts under one label.
(A) v7.1 blueprint — MIS/docs/MIS_v7.1_Production_Blueprint.md + Drive Doc 1DGILyPZEYr5Hx0QBTW7mHmaPGWJTri2EPbqnisks-og. Oct 18 2025. Thin: 13 tabs, 3 sample tickers, scoring = 6 columns, composite F=(B*2+D)/3. No SACS, no Flow, no gates. The clean theory: Data→Compute→Plan→Act→Score→Learn→Adapt; Portfolio_Start=25000; VIX bands 14/20/28/35.
(B) v7.1 rebuilt workbook — MIS_v7.1_gsheet_forclaudeedit (Drive xlsx 1-q0W2T0UEkrDhEXcsAH-vAUQGaRkfD-z, 59 sheets, 53,604 formula cells) + generator MIS/archive/MIS_v7.1_AppsScript.js (buildMIS(), 1,302 lines). Built Apr 30 2026 — this is where the real machine and SACS were born.
- Universe doubled: 118 → ~184 (Claude Log: "keep all 184 tickers," "184×56," "183 active").
Momentum_Engine(56 cols A–BD) = the brain. Key columns:AD FlowStrength Index (0–100)— the workhorse:50 + clamp(3D z-score)×8 + (Above30D ±8) + (Accumulating +18 / Rotating +6 / Distributing −14) + (AccelUp +8 / AccelDown −8) + (HighVol −8), clamped.AS RS_SPY= ticker 3D% − SPY's;AT RS_Sector= ticker 3D% − sector-mean 3D%.AZ SACS (Alpha Conviction Score)=FlowStrength×0.5 + RS_SPY×25 + RS_Sector×25. ← born here; unchanged through v2.AY VSM (Vol Stress Meter)=(W/V) + (G/H)*(V/10);AU RVI/AV Perf_Grade(sector percentile A/B/C/D);BC IPQ=(close−low)/(high−low).AG Composite=FlowStrength×0.6 + setup-weight + EventImpact×3 (+contrarian);AH Action Flag= In Sync ≥75 / Balanced ≥60 / Out-of-Sync ≥45 / Misaligned <45.Snapshot= the risk-gate/decision layer: ATR stops (1×/1.3×/2×), Risk%, Shares@1%, R:R, then gate 2.5% max risk + Grade A/B + (SACS≥60 OR Flow≥75) → FinalState ∈ {ADD, STARTER, WATCH, REJECTED, EARNINGS_RISK} + RejectCode + Reason.execution_playbookrenders the verdicts.- Added vs the tracker: universe ~2×; 56-col quant engine replacing 4 flags; SACS / VSM / Flow / RVI / IPQ; a formal risk-gate cascade; VIX regime engine; a closed behavioral loop (Trade_Planner→Trade_Log→Behavior_Tracker→Performance_Summary→Integrity_Check); daily history snapshotting.
- Security debt introduced: Schwab tokens in plaintext at
Control!B12–B16. - Data: GOOGLEFINANCE only.
Generation 2 — v11 ("Architect V11"). A FAMILY of 4 sheets + a dual engine.
The 4 sheets (same blueprint, diverged):
| Sheet | ID | Was | Status |
|---|---|---|---|
| Architect V11 | 1HEmRev… | reference scoring engine (SACS range 3.7–70.4); became the v1-script sheet | retired 6/2 |
| MASTER v11.0f | 1cosuFr… | most-evolved production: live Schwab API, 3×/day since 3/12, macro tape, news, buy-tickets | archived; plaintext-creds P0 (residual in CONTROL tab) |
| Dead 1F31z… | 1F31z… | TSLA fork; scoring collapsed to #NAME? (named ranges/functions didn't copy) | DEAD; mined |
| Microservices | 1MU_Ni… | sandbox firing "⚡ Power Hour" email; no weekend skip = the duplicate-email culprit | killed; mined |
The dual-engine problem (the core lesson): two scoring implementations co-existed —
- (A) Sheets formula engine (Momentum_Engine, GOOGLEFINANCE) — the all-183 engine.
- (B) Apps Script JS engine (MIS_ARCHITECT_COMPLETE_FIXED.js) — re-pulls each ticker from Yahoo Finance REST, scores in JS, emails Power-Hour.
Same concepts, different SACS math + thresholds → the surfaces disagreed (Apr 27: "5 Lean In incl INTC" vs "No setups, INTC blocked"). This is exactly what the FSE architecture was written to kill ("no surface independently classifies").
- ~15 canonical tabs: Reference_Rules · Tickers (183) · Catalyst_Log/EventDimension · Momentum_Engine · Snapshot (RiskGate) · Sector_Map · Sector_Intelligence · Macro_Context · Flow_Rankings · Risk_Sizer · Setup_Engine/Playbook · Open/Closed_Trades · Holdings · Macro_Tape · Earnings_Calendar · System_Health · News_Feed · LiveGuard · Activity_Log · KEY_VALUE/CONTROL.
- The 5 gates:
RiskGate_2.5(Risk%≤2.5) ·GradeGate_AB·SACS_Gate_60·FlowGate_75·FinalGate(AND of all four). - The honest funnel: Risk-gate pass 14.7% (27/183) · Grade-gate 59.8% · Final-gate 3.3% (~6 names) → the stated job is "183 → 3–6 trades." Genesis framing: "which 3–5 stocks have institutional money building, confirmed uptrend, supportive regime, clean $250-risk stop."
- Cadence: 3 emails/day + Sunday — ~9:53 Morning Brief, ~2:05 Trade Action, ~3:00 Power Hour, Sun ~6:05 Week-Ahead (weekend-skip on v1; the Microservices sandbox had none → duplicates).
- Sizing: portfolio $25K, risk 1%/trade (~$250), maxPosition 20%, 1.3×ATR stop, 2.5×ATR target;
Shares = floor(riskBudget × regimeFactor / stopDistance)capped at maxCapital/price. - NOT present at v11: the 2.5%/mo target, the −20% floor, wash-sale-in-verdict, lot-level (those are v2 additions / still-open).
Why v11 broke (3 stories):
1. Scoring design (8 flaws, SACS_ZScore_Analysis.docx): ZScore on price levels not returns (autocorrelation noise); ZScore→SACS correlation 0.014 (Flow is the real driver at 0.766); SACS ceiling 70.4 so the ADD tier was barely reachable; RR_13W divide-by-near-zero phantoms (AMGN 58M); single-day IPQ; 61% crammed in the 40–60 band; no trend-alignment factor; no regime-adaptive weighting. Compound = the "inversion problem": the RiskGate rejected the best high-ATR setups (LLY 70/Flow 100 → WATCH) and ranked calm low-ATR names #1 (BLK) because their tight stops passed the gate. It rewarded boring stocks.
2. Production safety (2 P0s): Schwab creds plaintext in KEY_VALUE; uncapped sizer firing 63 simultaneous BUY LMTs, some at 700% of portfolio (SGOV 1,746 sh = $175K on a $25K book).
3. Structural decay: non-tradeable indices/bonds/leveraged ETFs generated phantom tickets; 3 bad sector tags corrupted analytics; ghost/duplicate tabs disagreed; #NAME? on the dead fork; weekend duplicate emails.
Retirement: all v1/v11 email triggers killed 2026-06-02; history chose "option four: fresh v2 build" over patching.
Generation 3 — v2 (current, canonical, FROZEN)
- Bound to native Sheet
1N2v-MDDi_vv0uyD90HQvDjylKG7mGkKXydU_nEFJGIM· codeMIS/v2/Code.gs· seeded from v7.1 (MIS/v2/MIS_V1_FORMULA_ARCHIVE.mdheader: "Source: MIS_v7.1_gsheet_forclaudeedit.xlsx"). - Inherited verbatim from v7.1:
Momentum_Engine(same 56-col brain, SACS@AZ, RS@AS/AT, VSM@AY) +Snapshot(clean linked re-projection: every col=IF(Momentum_Engine!Xn="","",…)). - The v11→v2 bridge =
runSACSUpgrade.js— encodes the cure for v11's 8 flaws: RR_13W IFERROR guard; RiskGate → Shares≥1 (unblocks LLY/AMD); ATR floor (kills bond tickets); ZScore→returns-based; SACS 1.8× scale expansion (breaks the 70.4 ceiling → ~92); gap column; exponential catalyst decay (k: Earnings .07/Macro .35/Fed .14/General .10); pool-starvation gate → system goes⛔ DARKwhen <5 names qualify. - v2 KEPT from v11: SACS formula (unchanged), VIX-regime, ATR stops, 183→250 target, catalyst-decay-to-zero, EARNINGS_BLOCK, the funnel philosophy.
- v2 DISCARDED: the dual-engine/multi-sheet classification (→ single
misV2VerdictFor_accessor + FSE tab); GOOGLEFINANCE for reads at scale (→ ops-api Worker on Schwab API — required to beat the 15-min delay + 6-min ceiling + ~750-col wall when scaling to 250); the Mildred 4-field entry (→ zero-field broker-email auto-import). - v2 ADDED (the cash-flow discipline layer): the 2.5%/mo MTD clock (
fn=mtd), the −20% net-equity drawdown floor + cockpit, broker-verified equity recon (revealed v11's $32K was a margin phantom — real net ≈ $22K), the decision→outcome ledger, mandate/account split (ACTIVE 0600+898 carry the clock vs HOLD-ONLY 5692+kids), broker-email auto-import. Also the decomposed Durability/Trend/Setup shadow model (misV2ComputeShadow_→misV2SynthV2_) migrating off the FSE gate logic. - Still open even in v2: wash-sale inside the verdict path; absolute-score conversion (item F); the 50→183→250 scale (gated behind the freeze + ops-api off-sheets).
What must never be lost (the preserved heart)
- SACS =
FlowStrength×0.5 + RS_SPY×25 + RS_Sector×25(+ the FlowStrength build). Unchanged tracker→v7.1→v11→v2. - The tracker's 4 flags + thresholds (Drop 85% / Re-entry 80% of 13W-high / Overweight 14% / Momentum 87.5%) and conviction sizing 0.5/1/2%.
- The 8 v11 flaws + their exact fixes (
runSACSUpgrade.js) — so we never re-introduce the inversion problem / 70.4 ceiling / price-level z-score. - The 183-ticker universe (
docs/MIS_UNIVERSE.md) + the 183 → 3–6 funnel with honest pass rates (14.7% risk / 3.3% final). - The 7-step decision chain: Regime gate → Flow filter → ZScore (returns, sector-relative) → Structure → Catalyst decay → Sizing (ATR, $250 risk) → Rank-and-select 3–5.
- v2's discipline additions: 2.5%/mo clock, −20% floor, broker-verified net equity (not the margin-phantom gross), mandate/account split, wash-sale (still to wire).
Architectural law carried forward (FSE): one source of decision truth; no surface independently classifies. The whole point of v2 is to end the v11 dual-engine disagreement.
Source files (for re-extraction)
- Tracker decode: scratchpad
tracker.xlsx+parse.py/dump.py. - v7.1:
MIS/archive/MIS_v7.1_AppsScript.js·MIS/docs/MIS_v7.1_Production_Blueprint.md·MIS/v2/MIS_V1_FORMULA_ARCHIVE.md· Drive1-q0W2T0UEkrDhEXcsAH-vAUQGaRkfD-z(workbook),103OVLGkc_vEUh4OVLp20MPKz4vE3KO1m(audit),1PSRi8F7MNvXC8FkfwpeKlVxpZCghkEWM(59-tab summary). - v11:
MIS/audits/MIS_V11_Forensic_Teardown.md+MIS_Master_v11_0f_Forensic_Teardown.md+MIS_1F31z_Forensic_Teardown.md·MIS/scripts/MIS_ARCHITECT_COMPLETE_FIXED.js·runSACSUpgrade.js· scratchpadv11_SACS_ZScore_Analysis.txt+v11_Genesis_Context.txt. - v2:
MIS/v2/Code.gs·MIS/v2/.clasp.json(binds Sheet1N2v-MDDi…) ·MIS/docs/MIS_FSE_ARCHITECTURE.md·docs/MIS_UNIVERSE.md.