From Grassroots Demand Signals to Audited SEC Footnotes β’ Michael Mauboussin Reverse DCF β’ Dual Deliverables
ποΈ Live Forensic Journal β’ π° Daily Journal Analysis β’ β‘ Quick Start β’ π‘ Why MemeForensics? β’ π¬ Dual Deliverables β’ π Architecture β’ π» Full CLI Guide β’ π§ͺ Testing
π Live Intelligence Portal & Video Briefings: Read real-time forensic investigations, Reverse DCF implied growth hurdles, interactive SEC footnote receipts, and companion animated video reels at memetrading-journal.andangtruong085.workers.dev.
Retail investors repeatedly get caught at cyclical topsβchasing speculative narratives on Reddit or X right before catastrophic gross margin compression, unannounced secondary offerings, or inventory write-downs. Meanwhile, generic LLM financial "agents" hallucinate metrics, quote unverified marketing blogs, and rely on fuzzy keyword matching.
MemeForensics solves this. It is an institutional-grade deep research agent that bridges grassroots demand discovery with primary SEC forensic auditing, Michael Mauboussin reverse expectations modeling, and automated viral media generation.
grassroots demand signal (Reddit, forums, news)
β³ supply-chain beneficiary tracing (investable public companies)
β³ authoritative SEC execution audit (10-K/10-Q gross margins, inventory, CapEx, Form 4)
β³ Wall Street expectation gap (Reverse DCF: implied growth hurdles vs consensus)
β³ dual output: Institutional Investment Committee Memo + Viral Faceless Reel
- π Immutable SEC Evidence Ledger: Every material revenue, inventory, and margin claim is anchored in official SEC EDGAR filings (
10-K,10-Q,8-K) with exact accession numbers and disk receipts. Zero hallucinations. - π§ Dual-Track SEC Evidence Engine: Structured financial facts (XBRL statements, Form 4 trades) are parsed deterministically via edgartools β they never touch vector retrieval or an LLM. Qualitative filing text (MD&A, risk factors, footnotes, 8-Ks) flows through a section-aware RAG pipeline: filings are pre-parsed into SEC-item sections with Markdown pipe tables, chunked with section labels, and searched via hybrid FAISS+BM25 with optional section targeting (e.g.
section="Item 7"). - π‘ Philip Fisher Scuttlebutt & Channel Checks: Audits ground-truth leading indicators (developer commit velocity, distributor stockouts, spot-vs-contract spreads, operator chatter) via the model-callable
record_channel_checktool with defensive alias coercion. Tabulates Point72 concordance matrices and 3-way Expectation Arbitrage. Enforces the Scuttlebutt Inflection Exception in the CIO committee to recognize structural growth inflections (promoting upside to forward operating leverage and bounding downside by contracted pullback support). - π Keyless Quantitative Equity Screener: Instant factor-based and Wall Street preset screening across US exchanges (market cap, P/E multiples, revenue growth) with zero paid API keys or third-party subscriptions.
- π Reverse DCF (Expectations Investing) & Downside Floor: Instead of guessing future stock prices, the engine solves the discounted cash flow equation backwards: what cash-flow growth rate and ROIC is the current share price pricing in? Includes unit-scale auto-normalization and structural downside floor decoupling ($\max(\text{Low DCF}, \text{Tangible Book Value per Share})$).
- π‘οΈ Forensic Accounting Shields: Automatically computes the Beneish M-Score (manipulation risk), Sloan Accrual Ratio (earnings quality), and Days of Inventory Outstanding (DIO) drift to catch cyclical tops early.
- ποΈ Unified 3-Mandate CIO Governance: Enforces institutional capital governance across single-stock 3:1 asymmetry & fractional Kelly sizing, screening winner audits with actionable limit order prices, and top-down macroeconomic regimes (FRED rates, yield curve slopes, sector tilts).
- β±οΈ Point-in-Time (PIT) Temporal Air-Gapping: Air-gaps historical backtests (
--as-of YYYY-MM-DD) by strictly clamping SEC filings, Form 4 insider XML, FRED macroeconomic series, and market price bars to the cutoff date. Disables contemporary Wall Street consensus models and live social sentiment in backtest mode to eliminate lookahead bias. - π¬ Dual Deliverables Engine: Emits both exhaustive institutional investment memos (
memo.md) and viral video reel packages (faceless/dialogue.json) featuring animated character duos like Peter & Stewie or Rick & Morty. - π° The Meme Forensic Journal (Live Edge Portal): Distraction-free Wall Street Journal broadsheet editorial portal deployed live to Cloudflare Workers. Features interactive SEC EDGAR footnote popovers, synchronized 9:16 animated video briefings, and zero duplicate bibliographies.
- ποΈ Local Operator Studio (
python main.py --studio): Visual browser dashboard to run investigations, review articles, render reels, and 1-click publish without memorizing CLI arguments.
MemeForensics produces two synchronized deliverables for every investigation:
An exhaustive, audit-ready memorandum featuring executive verdicts, tradability scorecards, 5-year normalized financial statements, Reverse DCF growth matrices, and hostile bear red team kill criteria.
# Investment Committee Memorandum: Micron Technology ($MU)
**Verdict:** PASSED π« | **Conviction:** Tier 3 (Monitor Only) | **Kelly Allocation:** 0.0%
### Executive Rationale
While the grassroots AI demand signal is authentic, the Reverse DCF reveals the market prices in
a 14.8% FCF CAGR for 10 straight years at peak cycle. Meanwhile, Days of Inventory Outstanding (DIO)
expanded +28 days QoQ to 164 days, signaling channel inventory accumulation.
Reward-to-Risk Asymmetry stands at 0.91xβfailing our mandatory 3.0x hurdle.
### Valuation & Reverse Expectations Matrix
- Current Price: $927.60 | Implied 10-Yr FCF CAGR: 14.8%
- Conservative Bear Floor: $580.00 | Realistic Base Case: $895.00
- Asymmetry Ratio: 0.91x (Required: β₯ 3.0x) β FAILEDTranslates dense financial forensics, footnote anomalies, and reverse DCF math into 60-second viral storytelling for TikTok, YouTube Shorts, and Instagram Reels:
[
{
"index": 0,
"voiceId": "a84d19016bc34098b3c89d78f9299e33",
"text": "(excited) Holy crap, Stewie! I just dumped Lois's grocery money into Micron stock! Forty-five Wall Street analysts rated it a massive Buy, and price targets go straight to twenty-two hundred bucks!"
},
{
"index": 1,
"voiceId": "e91c4f5974f149478a35affe820d02ac",
"text": "(deadpan) Oh, marvelous, fat man. You just blindly bought a one-trillion-dollar cyclical chipmaker at nine hundred and twenty-seven dollars right into an inventory bear trap."
},
{
"index": 2,
"voiceId": "e91c4f5974f149478a35affe820d02ac",
"text": "(confident) If consolidated gross margins slide under thirty-five percent, or Days of Inventory breaches one hundred sixty-five days alongside DRAM price erosion, that pricing premium evaporates overnight. Institutional verdict is a flat zero percent capital allocation!"
}
]π Live Broadsheet & Daily Case Dossiers: memetrading-journal.andangtruong085.workers.dev
Deployed globally to the Cloudflare Workers edge network with sub-50ms latency.
Live Broadsheet Editorial Interface: Wall Street Journal-inspired serif typography, interactive SEC regulatory footnote popovers (e.g. [13], [15]), and companion synchronized animated video reels.
Most financial commentary either repeats corporate PR or chases momentum after a 300% run-up, while Wall Street brokerages issue consensus "Strong Buy" ratings based on linear extrapolations at cyclical peaks. The Meme Forensic Journal operates as an autonomous, adversarial audit bureau: taking high-velocity market memes, retail hype, and momentum narratives and stress-testing them against audited SEC accounting reality and reverse mathematical expectations.
Every published investigation provides an integrated, dual-format intelligence briefing:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE MEME FORENSIC JOURNAL PIPELINE β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ€
β BROADSHEET DOSSIER β INTERACTIVE RECEIPTS β SYNCHRONIZED REEL β
β (Wall Street Journal) β (SEC EDGAR Audited) β (Peter & Stewie Duo) β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β β’ Newsreader serif type β β’ Clickable SEC citations β β’ 60-second narrative hook β
β β’ Reverse DCF hurdle β β’ Accession-stamped 10-K/Q β β’ Plain-English forensic math β
β β’ Sloan accruals & DIO β β’ Pipe-table XBRL extracts β β’ Character banter explaining β
β β’ CIO Kelly allocation β β’ Interactive popover cards β unforgiving valuation gaps β
ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ
| Ticker & Dossier | Market Narrative vs. Audited Reality | Reverse DCF & Forensic Metrics | Deliverables & Receipts |
|---|---|---|---|
|
$NVDA The Five-Trillion-Dollar Mirage |
Narrative: Infinite AI data center CapEx guarantees unending 75% gross margins. Audit: Current valuation requires an impossible 44.01% FCF CAGR for 10 consecutive yearsβsurpassing the GDP of multiple G7 nations. Beneish M-Score flags non-cash capitalization distortion. |
Hurdle: 44.01% FCF CAGR Fair Value: $188.24 Verdict: Validation Watch |
π¬ Video Briefing Included π 122 Analyst consensus deconstruction π Audited Q1-Q2 XBRL cash flow statements |
|
$ADBE The Ghost in the Canvas |
Narrative: Generative AI has made creative software obsolete. Audit: The Street panicked on multiple compression; however, inference cost creep and an unfulfilled 3.0:1 reward-to-risk governance hurdle require zero capital deployed until a pullback below $237.50 restores asymmetric upside. |
Hurdle: 12.4% FCF CAGR Limit Order: $237.50 Verdict: Forensic Warning |
π¬ Video Dialogue π 19 Audited SEC EDGAR receipts π Enterprise ARR retention audit |
|
$PLTR The Hundred-Billion-Dollar Ontology |
Narrative: AIP creates an unassailable government and commercial monopoly. Audit: Trading at 150x earnings, current share price prices in uninterrupted 35%+ revenue expansion with zero room for contract lumpiness or federal procurement delays. |
Hurdle: Extreme multiple hurdle Fair Value: $31.50 Verdict: Validation Watch |
π Federal contract backlog audit π Form 4 insider transaction ledger βοΈ Reverse DCF expectation sensitivity |
|
$INTC The Six-Hundred-Billion-Dollar Fabrication |
Narrative: CHIPS Act subsidies and domestic foundry buildout guarantee parity. Audit: Subordinated cash flows, accelerating foundry operating losses, and trailing TSMC packaging yields destroy asymmetric capital allocation. |
Hurdle: Negative free cash flow base Verdict: Capital Prohibition |
π 10-Q Segment foundry losses π CapEx commitments vs grant subsidies |
|
$DELL Enterprise AI Server Margins |
Narrative: Explosive AI server revenue will permanently lift corporate margins. Audit: Low-single-digit operating margins on pass-through GPU architectures fail to yield institutional operating leverage. |
Hurdle: Working capital drag Verdict: Neutral / Monitor |
π Working capital & DIO drift receipts π Gross margin pass-through analysis |
- ποΈ Broadsheet Aesthetic: Styled like the Wall Street Journal with Newsreader serif typography, dark/light editorial themes, and hairline dividers for pure reading focus.
- π Interactive Financial Receipts (
<FinancialReceipts />): No vague hyperlinks. Every factual claim is paired with an interactive popover detailing the exact SEC filing, filing date, accession number, and extracted financial facts. - β‘ Zero-Latency Global Edge Delivery: Built with Astro and deployed directly to Cloudflare Workers (
memetrading-journal.andangtruong085.workers.dev), serving instant static HTML from edge datacenters worldwide. - π 1-Click Publishing Pipeline: Operators can go from CLI investigation to global live edge publication in seconds:
# Publish case to website and immediately deploy live to Cloudflare Workers python main.py --publish-case NVDA-2026-09-28-002 --deploy
The pipeline is modeled as a state machine in LangGraph, strictly separating model-directed research discovery from deterministic committee governance.
See PIPELINE_ARCHITECTURE.md for the complete end-to-end specification.
flowchart TD
START([User Research Prompt]) --> S1["Stage 1: Model-Driven Planning<br/>(assess_scout_need discovery + evidence-tier hypotheses)"]
S1 --> S2[Stage 2: Deep Research Agent Loop]
subgraph S2["Stage 2: Deep Research Agent (Analyst Workbench)"]
direction TB
EXEC["Research Agent Loop (The Analyst)"]
T_DISC["Web, Social & News Intelligence<br/>(search_web, search_articles, search_social)"]
T_MKT["Market Context & Macro<br/>(get_market_data, get_company_research, get_macro_context)"]
T_CAND["Candidate Screening & Workspaces<br/>(screen_stocks, register_candidate, compare_candidates)"]
T_DIL["Candidate Diligence Sub-Agent<br/>(conduct_candidate_diligence)"]
subgraph SEC_SPECIALIST["Autonomous SEC Specialist Sub-Agent (LangGraph)"]
direction TB
sec_entry["investigate_sec(ticker, task)"]
sec_fin["get_sec_financials: Deterministic XBRL parsing<br/>(margins, TTM FCF, DIO/DSO β no RAG, no LLM)"]
sec_tools["Private SEC Tool Loop (Section-Aware RAG):<br/>β’ list_filings β’ pull_filing (edgartools pre-parse β<br/>section-tagged Markdown-table chunks)<br/>β’ search_corpus (FAISS+BM25+RRF, optional section filter)<br/>β’ read_chunk β’ verify_claim β’ Form 4 insiders"]
sec_entry --> sec_fin
sec_entry --> sec_tools
end
EXEC --> T_DISC
EXEC --> T_MKT
EXEC --> T_CAND
EXEC --> T_DIL
EXEC --> sec_entry
end
S2 <--> S3[Stage 3: Evidence Ingestion & Immutable Ledger]
S2 <--> S4[Stage 4: Gap Reflection Audit]
S4 -->|Audit Passed / Budget Complete| S5[Stage 5: Committee Boardroom Gates]
subgraph S5["Stage 5: Boardroom Committee (Deterministic Math & CIO)"]
direction TB
G1["Evidence Gate (G1): Primary Citations Verified"]
G2["Accounting Gate (G2): Beneish M-Score, Altman Z-Score & Sloan Accruals"]
G3["Valuation Gate (G3): Mid-Year DCF & Mauboussin Expectations Reverse DCF"]
G4["Asymmetry Gate (G4): Reward-to-Risk β₯ configured hurdle (default 3.0x)"]
DEBATE["3-Way Risk Debate: Conservative vs Aggressive vs Neutral"]
CIO["CIO Deliberation: Deterministic Risk Limits (apply_risk_limits, 10-15% cap, 5% loss budget)"]
G1 --> G2 --> G3 --> G4 --> DEBATE --> CIO
end
S5 --> END([Dual Deliverables: Memo + Viral Reel])
Requires Python 3.11+ and Node.js 18+:
# Clone repository
git clone https://github.com/Unheat/memeTrading.git
cd memeTrading
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtCopy .env.example to .env and configure your API keys:
cp .env.example .env# Primary LLM provider (OpenAI, OpenRouter, Anthropic, or local proxy)
OPENAI_API_KEY="your_openai_api_key"
# SEC EDGAR Fair Access User-Agent (Required by SEC.gov)
# Format: "Sample User user@domain.com"
SEC_EDGAR_USER_AGENT="MemeTradingResearch yourname@domain.com"
# Optional: Fish Audio TTS API Key (for Peter & Stewie video reels)
FISH_API_KEY="your_fish_audio_api_key"# Interactive Mode β prompts for your research question
python main.py
# Single-ticker investigation
python main.py --ticker MU --query "DRAM cycle pricing power and gross margin expansion"
# Historical backtest audit β cuts off data as of date to eliminate lookahead bias
python main.py --ticker TSLA --as-of 2024-01-15 --query "Robotaxi regulatory path and auto gross margin floor"
# Thematic beneficiary discovery across an entire sector
python main.py --query "Find key supply chain beneficiaries of advanced EUV lithography"
# Generate research memo + cited Substack article
python main.py --ticker NVDA --query "Blackwell thermal and packaging yields" --article
# Generate cited article + viral video reel derived from it (Peter & Stewie)
python main.py --ticker TSLA --query "Robotaxi regulatory path and auto gross margin" --video
# 1-click publish case and deploy live to the edge journal
python main.py --publish-case NVDA-2026-09-28-002 --deployTip
For complete CLI argument descriptions, backtesting workflows, and production recipes, see the CLI Guide & Reference Manual.
| Command | Description |
|---|---|
python main.py |
Interactive research agent prompt. |
python main.py -t <TICKER> -q "<QUERY>" |
Single-ticker forensic equity diligence. |
python main.py -t <TICKER> --as-of <DATE> |
Cuts off market, news, and SEC data as of date for backtesting without lookahead bias. |
python main.py -q "<THEME>" --depth deep |
Thematic discovery & automatic candidate registration. |
python main.py -t <TICKER> --article |
Generates cited Substack forensic article (article.md). |
python main.py -t <TICKER> --video |
Generates cited article, character script based on the article, and renders MP4 video. |
python main.py --studio / python -m app.studio |
Launch browser-based Operator Studio GUI (http://127.0.0.1:3000). |
python -m app.cli.publish <CASE> --deploy |
Syncs article, citations, and video to Cloudflare Astro website (web/) and deploys live to The Meme Forensic Journal. |
python main.py --publish-case <CASE> --deploy |
Direct fast-path to publish and deploy a specific case live to edge. |
python -m app.cli.publish --list |
Lists all published articles, case IDs, and video URLs on the website. |
python -m app.cli.publish --delete <SLUG> --deploy |
Deletes article and companion video asset, then redeploys live to Cloudflare. |
python -m app.media.cli video --case-id <CASE> |
Standalone video reel rendering for an existing reviewed case. |
python scripts/run_backtest.py |
Historical backtest sweep evaluating verdicts against SPY alpha. |
node app/valuation/calculator.mjs |
Standalone deterministic Reverse DCF & scenario calculator. |
π Read the complete CLI Guide (doc/cli.md) for detailed argument tables, backtesting scorecard metrics, and custom recipes.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MEMEFORENSICS METHODOLOGY β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ€
β 1. SCUTTLEBUTT β 2. FORENSIC AUDITING β 3. EXPECTATIONS REVERSE β
β (Fisher & Lynch) β (Beneish & Sloan) β (Mauboussin & Rappaport) β
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β β’ Social demand signals β β’ Beneish 8-variable β β’ Back out implied cash β
β β’ Supply-chain choke- β M-Score manipulation β flow growth (CAGR) β
β points & wait times β β’ Sloan accrual ratio: β β’ Reinvestment rate & β
β β’ Beneficiary mapping β Operating CF vs Net Incβ ROIC sustainability β
β β’ Customer contract β β’ Days of Inventory β β’ Expectation gap: priced β
β validity (Form 8-K) β Outstanding (DIO) driftβ catalyst vs unpriced β
ββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ
- Scuttlebutt Grassroots Discovery (Philip Fisher & Peter Lynch): Monitors developer communities, subreddits, and industry reports to identify physical supply-demand imbalances before they appear in quarterly reports. Enforces the Bullwhip Phantom Inventory Circuit Breaker against Days Inventory Outstanding (DIO > 135d).
- Deterministic Forensic Accounting (Messod Beneish, Richard Sloan, Edward Altman): Evaluates earnings quality via the Beneish 8-Factor M-Score (manipulation risk), Sloan Accrual Ratio (cash conversion quality), Altman Z-Score & Z''-Score (distance-to-default distress zones), and 5-Stage DuPont ROE Decomposition.
-
Institutional Valuation & Reverse DCF (Michael Mauboussin & Alfred Rappaport): Employs true Unlevered Free Cash Flow (FCFF =
$\text{CFO} + \text{Interest} \times (1-t) - \text{CapEx}$ ), mid-year discounting convention ($(1+r)^{y-0.5}$ ), senior capital claims deductions in EV bridge (operating lease liabilities ASC 842, preferred, minority), and inverts the market price into implied revenue growth and Competitive Advantage Period (CAP) using the growth-funding identity ($I = g / \text{ROIC}$ ). - Deterministic Risk Governance & Fractional Kelly (John Kelly & Ed Thorp): Sizes recommended position weights based on calculated win probabilities and payoff asymmetries, clamped against hard fund mandates (10-15% single-name cap, 5% max loss budget) where trimmed exposure stays in cash ("Conviction requests, risk disposes").
Every run creates a timestamped case folder inside cases/:
cases/
βββ MU-2026-09-15-007/
βββ memo.md # Institutional Investment Committee Memorandum
βββ investigation.json # Complete structured state, metrics, and audit ledger
βββ evidence_ledger.jsonl # Append-only ledger of verified evidence items
βββ run-manifest.json # Execution metadata, model latency, and token consumption
βββ article.md # (Opt-in) Cited Substack / Blog forensic article
βββ sec/ # Downloaded raw SEC filings, Form 4s, and the section-tagged
β # RAG index (chunks.jsonl + sec.faiss) used for citation retrieval
βββ faceless/ # Viral Media Generation Assets (Opt-in)
βββ dialogue.json # Timestamped character dialogue with emotion tags
βββ caption.txt # Viral social caption with hashtags & hook
βββ video/ # Rendered 1080x1920 MP4 video reels
The repository maintains an extensive test suite verifying deterministic data pipelines, SEC parsing, Reverse DCF calculations, and graph transitions:
# Run the complete test suite (excluding slow live network smoke tests)
pytest --ignore=tests/smoke======================= 538 passed, 4 warnings in 23.99s =======================
- ποΈ Architecture Decision Records (ADRs) β Formal records of technical choices, trade-offs, and design rationales (ADR-001 through ADR-005).
- π» CLI Guide & Reference Manual β Exhaustive parameter tables, recipes, backtesting sweep instructions, and standalone calculator guide.
- π Pipeline Architecture Specification β Full specification of The Analyst Workbench vs The Committee Boardroom.
- πΊοΈ Code Flow & Pipeline Mapping β Comprehensive code-level guide mapping every file and function to graph stages.
- π Interactive Architecture Diagram β Standalone, responsive HTML visualization with theme toggling.
- π Full Architecture Plan β In-depth architectural principles, Scuttlebutt framework, and state schemas.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for the full license text.
For third-party open-source software and architectural attributions, see the NOTICE file.
