בס״ד

MIS v2 — Trade-Email Ingestion + Behavioral/Crowd-Fade Layer

docs/MIS_V2_TRADE_INGESTION_AND_BEHAVIORAL.md · last changed (pre-VM history) · rendered from GitHub master

MIS v2 — Trade-Email Ingestion + Behavioral/Crowd-Fade Layer

Captured: 2026-05-27 (Wed) Session 39 cont. Sam dictated both of these as vision while reviewing the Test Entry tickets. Status: DESIGN CAPTURED, not built (per "classify before building" — feedback_classifier_first_doctrine). This doc is the contract so the logic isn't lost.


PART 1 — Trade-Email Ingestion (the holdings/balances brain)

What Sam asked (2026-05-27, verbatim intent)

"I make trades, my emails come in — figure out where they're going so they can be properly mapped, and whether I should change which email/folder they go to. Pick them up. In the future, follow up with an API pull for the actual price per share / amount sold and how that changes my balance, totals, holdings, emails, and briefings. It should figure itself out based on certain keywords / certain locations — parsed through specific words in specific trade emails, only then it goes into that row. And that row is checked every single time before the briefing. A brain and a skill we need to learn, commit to, update, and learn from itself. And we should know about it already."

DISCOVERY (done this session — live Gmail scan, both accounts)

All broker email lands in the BUSINESS inbox (sam@hookstreetcapital.com), INBOX, unfoldered/unlabeled. Personal inbox (ztreitel@gmail.com) had ZERO broker mail (only a Bloomberg newsletter). So: no routing change strictly needed, but a Gmail filter+label would make parsing bulletproof (see "Routing rec").

Two email classes already arriving (no API required to start):

  1. TRADE EXECUTIONS — the fills.
    - Fidelity: sender Fidelity.Alerts@fidelity.com · subject "Fidelity Alerts: Order Execution" (and "Order Partially Filled"). Body pattern:
    Account *****<last4> · Your order to <buy|sell> <qty> shares of <TICKER> was filled · Filled <qty> shares @ $<price> · Execution time <h:mm am/pm ET> · Order number <id>
    - Schwab: sender donotreply@mail.schwab.com · subject "Your trade was executed in your Schwab account ending in ".
    - Example caught (TODAY 5/27): sold ORCL — acct 0600: 0.847 sh @ $188.44 (1:09 pm); acct 5692: 1.00 + 0.267 sh @ $188.56 (1:11 pm). (Answers Sam's "I'm not sure if it traded today" — it did.)

  2. POSITION SUMMARIES — a holdings snapshot already emailed daily ~5:30 PM ET, one email per account.
    - Fidelity: sender Fidelity.Alerts@fidelity.com · subject "Fidelity Alerts: Position Summary" · body: Account: XXXXX<last4> then a Symbol / Acct Type / Quantity / Price / Value table.
    - This is a full holdings feed sitting in email — HOLDINGS_CLEAN can be seeded from these WITHOUT the Schwab API. Schwab also sends "My Closing Summary" (daily) + "My Weekly Summary".

Account map (corrected from the scan — MORE accounts than the plan assumed)

Broker Last-4 seen Plan label Notes
Fidelity 0600 Fid Margin (Z29720600) confirmed
Fidelity 5692 Fid Cash (Z29835692) confirmed
Fidelity 5378 — (NEW) not in the plan; classify (IRA? other?)
Fidelity 4073 — (NEW) not in the plan; classify
Schwab 898 Schwab …898 confirmed
Schwab (2nd?) 2nd Schwab (issue #8) not seen in this window — confirm it exists

Open item for Sam: what are 5378 and 4073? (And is there a 2nd Schwab?) The account label drives which bucket/owner a fill maps to.

NOISE to exclude (so the parser doesn't false-positive)

Fidelity "Fixed Income Offerings" (muni bond blasts), "Daily Alert Summary (AM)" (news), EFT/transfer alerts, Schwab workshop/marketing, SchwabAlerts@markit.schwab.com Price Alerts. None are trades. This is exactly the false-positive risk Sam flagged — the parser must key on the execution subjects + body fields, not just sender.

Routing recommendation (the "should they go to a different folder" answer)

Keep delivery to the business inbox, but add a Gmail filter: from:(fidelity.com OR schwab.com) (subject:"Order Execution" OR subject:"Partially Filled" OR subject:"trade was executed") → apply label Trades (+ optionally skip inbox). Then the parser targets label:Trades — deterministic, immune to inbox clutter. A second filter → label Positions for the Position Summary emails. (Mildred boundary: these labels live in the business account; fine.)

The pipeline (phased — NOT all now)

"We should know about it already"

We do now — this doc + reference_broker_trade_emails memory are the institutional knowledge. Senders, subjects, body fields, account map, noise list are all captured.


PART 2 — Behavioral / Crowd-Fade / Mean-Reversion Layer

What Sam asked (2026-05-27, verbatim intent)

"It needs to pick up some behavioral psychology — after a couple of strong days in specific companies or the overall market, [people] follow the crowd. It has to fade and go somewhere; there's selling and profit-taking. It has to think about that and grow in that way, always — be willing [to play] the downside of its own theory, especially if that's the way to make money on it. Not [profiting] on someone's pain, just a way of moving — making money from the way the market is moving."

Translation into MIS logic (Phase 3 forward layer + FSE awareness — NOT a new engine)

Where it lives

Phase 3 (forward layer), surfaced in the briefing + the entry ticket's "Position read" (already started). FSE stays the single classifier — the fade/extension signals are inputs/flags, not a parallel scorer (per MIS_FSE_ARCHITECTURE.md — no surface classifies independently of FSE).



PART 3 — Holdings cadence / notify / settlement + folder routing + "Aladdin" probing (2026-05-27 cont.)

DONE this session (real, verified)

Sam's cadence/notify/settlement asks (2026-05-27, verbatim intent)

"Clean my holdings right now, but it has to be consistently done and I'm notified somewhere it was done — to me or Mildred or tracked — so I'm up to date and it's fully compounded. If there's a day or two for things to settle, they have to match. Based on certain emails, organize my folders. Maybe request different searches/alerts from IBKR/Schwab/Fidelity to skip the inbox and go somewhere else — instead of you doing APIs."

"Real market snapshot" on the Test Entry (2026-05-27 ask) — STARTED

Sam: "On the snapshot test entry I need a real market snapshot — micro & macro in 2 seconds: S&P, Dow, VIX, overall, sector. My last info, my last trades, any warnings, watch-losses, the things I had in my old test entry (Momentum + snapshot info). And ask me different things — psychologically see what else I want — like an Aladdin of my own."
- SHIPPED today: a Market now (live) block on the entry ticket = S&P (SPY) · Nasdaq (QQQ) · VIX + regime, all LIVE-tagged. Plus the Scenarios block (Base / Contrarian-fade / Macro / Micro).
- TODO (bring back from the old test entry): Dow + Russell; my last trades (from TRADE_LOG once wired); watch-losses / warnings (positions breaching stop, near-earnings, do-not-buy, wash-window); last info / Momentum snapshot rows he used to have. Consider a separate one-screen MARKET tab (the "2-second micro+macro" view) distinct from the per-ticker entry.
- The "Aladdin that asks me" layer: the system should prompt Sam ("does this still make sense? still believe the thesis? would you change it? what else do you want to see here?") and learn from the answers — surfaced through the bot, tuned over time. This is the self-prompting/self-learning cadence (ties issue #9 + project_self_learning_loop_gap). Capture his answers → adjust what each ticket shows. Design item, not built.


PART 4 — Portfolio cockpit vision + design language (2026-05-27 cont.)

Design language (researched, now the standard for MIS surfaces)

From Aladdin + 2026 fintech UX research (synthesized this session): glanceable (key state in 2 seconds), coherent (no contradictory signals — one story), self-explaining (every number says what it means + how to act), contextual behavioral nudges (ethical, Kahneman/Tversky), high-contrast color + dark-mode aware, adaptive/asks-and-learns. Applied to the entry ticket v3: THE READ with inline colored badges, GUT CHECK (behavioral), HOW IT'S PROTECTED + plain how-to steps, ★-marked self-explaining number chips, reworded scenarios, smart (red-if-stale) data-freshness, commas on ≥$1,000.

DONE this session

Sam's portfolio-cockpit asks (2026-05-27, verbatim intent) — DESIGN, not built

Build order implied (when we leave the 2-ticker brain)

  1. TRADE_LOG (parse executions) → cost basis → per-lot + realized/unrealized P&L.
  2. Always-on portfolio P&L + target-progress view (his accounts only; kids segregated).
  3. Sell-simulator.
  4. Telegram surfacing of holdings/P&L (Phase 2 bot wiring) → then a PWA.

    Discipline: none of 1–4 starts until the 2-ticker brain is locked + Sam says go (feedback_classifier_first_doctrine, feedback_capture_is_not_closure).


PART 5 — Live-read punch-list + the intent/horizon insight (2026-05-27, "Stop Building")

Sam live-read the v3 ticket and gave detailed notes, then said "Stop Building." Build paused at deploy @17 (the v3 ticket he's reading). Source matches deploy (no half-shipped drift). Everything below is captured, not built — run when Sam says go. Discipline: he's right that I was spiraling on re-renders; the thinking is now logged so the next pass is fast.

THE BIG reframe — buy INTENT / hold HORIZON changes the verdict (NVDA-for-his-daughter)

Sam: "What if I want to buy NVDA for my daughter — long-term, 5+ years? It's recently down, the space should go up, it's the biggest one, it'll eventually go up even if earnings disappoint. So is it still set up for me? Is it protecting me or mothering me? I'm NOT giving it full control to trade — but the thinking has to be done already so when I look, it's all there (XYZ), not too much thinking."
- The same ticker is a different decision by horizon. The FSE today is a swing classifier — REJECTED-for-swing ≠ REJECTED-for-a-5-year-core. The engine must take intent/horizon as an input (Swing / Position / Long-term core) and judge against the matching rubric. A REJECTED swing can be a fine long-term accumulate. → wire Position_Intent (why am I buying: trade vs core; target hold) into the verdict + the ticket ("for a 5-yr hold, this looks like X; for a swing, it's REJECTED because Y").
- Advisory, NOT autonomous (hard boundary). It does the thinking and lays it out; it does not place trades. "Is it mothering me?" → right level = decision-ready, low-cognitive-load ("XYZ, not too much thinking"), Sam decides. → memory feedback_mis_advisory_not_autonomous.

Punch-list from the live read (concrete ticket fixes)

  1. Explain the target. Show % upside to target, the R:R, the $ reward, time expectation (how long it should take), and a time-stop ("if not ~halfway in N trading days, the system flags it to re-decide"). He didn't understand "target $143.81" alone.
  2. Real market data, not proxies. Gold = actual spot $/oz (not GLD ETF) and real Bitcoin price (he stressed this). GOOGLEFINANCE may not do spot gold/BTC → likely Finnhub (OANDA:XAU_USD, BINANCE:BTCUSDT) or another feed. (S&P/Dow/Nasdaq/VIX/10Y read fine.)
  3. Track record / learn-from-itself (he stressed twice). On every ticket show what MIS said before on this ticker (from FINAL_STATE_HISTORY) + whether it was right (forward-return scoring +1/3/5/30d) + did Sam act (tie to TRADE_LOG / Position_Intent "why I bought"). Pull up the same ticket tomorrow / a month from now and see the evolution. = the self-learning loop (issue #9, project_self_learning_loop_gap).
  4. Trading-calendar awareness (system-wide rule). Never brief/report/pull on a closed day (weekend/holiday); when closed, label values "as of last close"; express horizons in business/trading days. Applies to ALL surfaces + the briefing cadence.
  5. Two sides — clearer wording. "The other side" → say the action it implies (wait / fade / pass). Sam: "if you go with it / the other side — what does that mean? I'm not sure."
  6. Macro deeper on VIX (level + what it means: <20 calm / 20-30 nervous / 30+ fear + recent trend). Micro: expected swings over the next ~7/10/14 business days ("what to be ready for, what kind of swings").
  7. Crowded / herd / hedge-fund read. Is this move crowded — "the herd doing what someone else is doing — could I be getting played by a hedge-fund move?" Flag crowded momentum + unwind risk.
  8. Deeper behavioral gut-check (go further than the one-liner).
  9. Polish: checklist could look even better; 10× the look/usefulness/coloring; more compact / interactive; charts (future). Timestamps felt "a little too late" — keep the live dot prominent.
  10. Dark-mode toggle (default light) — portal layer.

Future (explicitly "not for this")

A universe-wide view (toward 200+ tickers) that's more than a heatmap/grade — tickers cross-referencing each other, the sheet vis-à-vis its own history, learning across names. North-star, after the 2-ticker brain + the above.


PART 6 — Cost basis, MARGIN (levered/unlevered), and the one-login hub (2026-05-27 cont.)

Cost-basis sources found in the repo (all STALE — do not trust against current positions)

MARGIN — the critical gap Sam flagged

Sam's portfolio asks (this round) — DESIGN, sequence after cost basis is real

Cross-references

Source trail · docs/MIS_V2_TRADE_INGESTION_AND_BEHAVIORAL.md @ master · rendered 2026-07-02 7:23 PM EDT by scripts/build-docs.py · the .md in the repo is the truth; this page is the phone-readable view