Smart money tracker + quant research terminal + defensive portfolio engine. Follows 20+ top hedge funds via SEC filings. 5-factor quant engine (Kalman filter, Markov chains, Hurst exponent) scoring 150+ stocks across the full AI infrastructure value chain. Beta-adjusted alpha + downside-protected portfolio construction (AQR Total Portfolio Approach) β win when the market is down. Congressional & insider trade monitoring. Real-time macro shock alerts. Delivered to your inbox every morning at 7 AM.
Built for investors who want to think like the world's best allocators: buy great businesses at fair prices and hold. Not a trading tool. No day-trading noise. Buffett/Klarman-style fundamental analysis enriched with quant scoring and AI.
"The stock market is a device for transferring money from the impatient to the patient." β Warren Buffett
The full picks-and-shovels stack behind the AI buildout β ~50 names mapped across every layer, from the chip to the power grid. This is where the next 10x ideas live before the market finds them.
| Layer | What it is | Tickers |
|---|---|---|
| π§ Compute Silicon | GPUs, accelerators, CPUs | NVDA, AMD, AVGO, ARM, MRVL, ALAB |
| π Foundry & Equipment | The factories making the chips | TSM, ASML, AMAT, LRCX, KLAC |
| πΎ Memory & Storage | HBM, NAND, flash | MU, WDC, STX, SNDK |
| π Networking & Optics | Moving data at AI speed | ANET, CSCO, CRDO, CIEN, COHR, FN |
| π₯οΈ Servers & Cooling | The physical body of AI | SMCI, DELL, HPE, VRT, ETN, MOD |
| βοΈ Neoclouds & Data Centers | GPU cloud landlords | NBIS, CRWV, IREN, APLD, CORZ |
| β‘ Power & Energy | The fuel (most underpriced layer) | CEG, VST, NEE, GEV, TLN, EQT |
| ποΈ Hyperscalers | The buyers driving all demand | MSFT, GOOGL, AMZN, META, ORCL |
Opportunity Score (0β100) β built to find asymmetric setups before re-rating:
Opportunity = Valuation (0β30) β GARP + forward P/E
+ Upside (0β25) β analyst consensus target
+ Growth (0β25) β revenue + earnings growth
+ Quant (0β20) β 5-factor quant confirmation
β Extended penalty β demotes names up >80% on rich multiples
Labels: π EMERGING WINNER Β· π UNDERVALUED Β· π₯ HIGH UPSIDE Β· β‘ MOMENTUM Β·
python3 main.py --mode aiiA beta-adjusted alpha engine + downside-protected portfolio constructor, built on AQR's Total Portfolio Approach research. The goal: keep most of the upside, lose far less when the market falls.
Beta-adjusted alpha β every name's return is split into the free market ride (beta) and genuine unique edge (alpha), then scored by the appraisal ratio (alpha Γ· idiosyncratic vol β AQR's prescribed weighting metric):
| Metric | What it captures |
|---|---|
| Beta | Market sensitivity β the part you can buy free from an index |
| Dimson Ξ² | "True" beta incl. 1-day lag (Asness: plain beta understates real risk) |
| Alpha (Jensen's) | Annualized return left after stripping out beta |
| Appraisal ratio | Beta-adjusted alpha score = alpha Γ· idiosyncratic vol |
| Convexity | Up-beta β down-beta (positive = participate up, resist down) |
Three-sleeve construction:
- π’ Alpha β high beta-adjusted-alpha growth (the return engine)
- π΅ Defensive β low-beta ballast (BRK-B, COST, XLU, XLP, XLV, SCHD)
- π£ Convexity β the AQR crisis-diversifier playbook: DBMF/KMLM (managed-futures trend-following β AQR's #1 convex diversifier), BTAL (anti-beta), GLD, TLT
Weights β appraisal ratio with a low-beta tilt (betting-against-beta), then the convexity sleeve is sized to pull whole-portfolio beta down to a target (default 0.60).
βοΈ Second method β Risk Parity (Bridgewater "All Weather"): the same universe is also built as an Equal Risk Contribution book, where position sizing ignores expected return entirely and instead equalizes each name's share of portfolio volatility (Maillard-Roncalli-Teiletche 2010, solved by cyclical coordinate descent). A 60/40 book is ~90% equity risk despite looking balanced by dollars; ERC scales low-vol ballast (bonds, gold, defensives) up and high-vol growth down until every holding carries its weight. The terminal renders both books head-to-head (annual return, vol, Sharpe, max drawdown, downside capture, beta) so you can see AQR's return-quality sizing vs Bridgewater's risk-balanced sizing on identical inputs.
Stress test β measures "win when the market is down": downside/upside capture, capture ratio, win-rate in down months, max drawdown vs SPY, and cumulative return through historical selloffs (2022 inflation bear, 2025 tariff shock).
python3 main.py --mode portfolio # target beta 0.60
python3 main.py --mode portfolio --target-beta 0.4 # more defensiveπ Full concept primer:
docs/PORTFOLIO_METHODOLOGY.md
Track what the world's best investors are actually buying β parsed live from SEC filings, congressional disclosures, and social signals. 23 funds, 7 tabs.
| Tab | Source | What you get |
|---|---|---|
| 1β2: Institutional + AI Funds | SEC 13F (live EDGAR parse) | Holdings, QoQ changes, new positions β Berkshire, Bridgewater, Renaissance, Tiger Global, Coatue, D1, Whale Rock, Situational Awareness |
| 3: Quant Giants | SEC 13F | Citadel (15,000+ positions), Two Sigma, D.E. Shaw, Point72, WorldQuant |
| 4: Crypto Whales | Public disclosures | Saylor/MSTR, a16z, World Liberty Financial, Pantera, Galaxy Digital |
| 5: Insider Buying | Finviz scraper | C-suite & director purchases β the strongest buy signal that exists |
| 6: Congressional Trades | Capitol Trades / QuiverQuant | Real-time STOCK Act disclosures β what politicians are actually buying |
| 7: Social Intelligence | StockTwits + Finviz News + SEC RSS | Trending tickers, sentiment on whale holdings, 13F filing alerts |
Funds tracked β 23 managers across 4 categories:
| Category | Managers |
|---|---|
| π Value / Activist | Berkshire Β· Baupost Β· Pershing Square Β· Scion Β· Third Point Β· Elliott Β· Sachem Head |
| π Growth / Macro | Duquesne Β· Viking Global Β· D1 Capital Β· Durable Capital Β· Whale Rock Β· Dragoneer |
| π€ AI / Tech | Situational Awareness (Leopold Aschenbrenner) Β· Coatue Β· Tiger Global Β· ARK |
| βοΈ Quant Giants | Bridgewater Β· Renaissance Β· Citadel Β· Point72 Β· D.E. Shaw Β· Two Sigma Β· WorldQuant Millennium |
Every holding enriched with:
- 5-factor quant score β follow signal:
βββ STRONG FOLLOWtoβ AVOID - QoQ change detection: NEW BUY / INCREASED / DECREASED / CLOSED
- Novelty scoring: non-consensus picks from Scion/Situational Awareness boosted; mega-cap consensus down-ranked
python3 main.py --mode whalesπ Sector Scan + Hidden Gems (--mode stocks)
- 5-module quant scoring (each 0β100): Technical Β· Statistical Β· ML Trend Β· Risk Β· Fundamental
- 100+ stocks across 10 sectors Β· 75 ETFs (Tech, Bonds, Commodities, International, Factor, Dividend)
- 30 Hidden Gems: quantum computing, space tech, nuclear, biotech, eVTOL β small/mid-cap, under analyst coverage
| Method | What it does |
|---|---|
| Kalman Filter | Tracks "true" fair value behind noisy price data |
| Markov Chain | Models market regime (BULL/BEAR/SIDEWAYS) via transition probability matrix |
| Hurst Exponent | Detects mean-reverting (H<0.45) vs trending (H>0.55) via the structure-function (generalised Hurst) estimator β correctly centred at 0.5 for a random walk |
| MACD / Stochastic / ADX | Momentum + trend strength signals |
| Bollinger Bands | 20-day mid Β± 2Ο β BB% (0 = lower band, 1 = upper) flags over-extension |
| OBV | On-Balance Volume β detects institutional accumulation |
| ATR + Fibonacci | Volatility regime + key support/resistance levels |
| Sharpe / Sortino / VaR | Risk-adjusted return + tail risk |
| Multi-Factor Model | Value 25% Β· Growth 30% Β· Quality 25% Β· Momentum 20% |
| QMJ Quality | AQR "Quality Minus Junk" β Profitability Β· Growth Β· Safety pillars (margin, ROE, leverage) |
| GARP / PEG Ratio | Growth At Reasonable Price scoring |
| Linear Regression ML | Price slope, RΒ², velocity, acceleration |
A separate entry-timing overlay that combines momentum direction (MACD), momentum persistence (Hurst), and over-extension (Bollinger %) into one call β without touching the long-term quant score. The key is the pairing: MACD-up + Hurst-trending is a real trend worth entering, while MACD-up + Hurst-mean-reverting is fake momentum that will snap back.
| Rating | When | Meaning |
|---|---|---|
| π’ BUY NOW | MACDβ + Hurst trending + not over-band | Real, persistent uptrend β buyable today |
| π‘ WAIT DIP | MACDβ but through the upper band | Right idea, wrong price β limit-order a pullback |
| π΄ AVOID (fake) | MACDβ + Hurst mean-reverting | Momentum will revert β don't chase |
| π΅ PROBE | MACDβ + mean-reverting + oversold | Faded extreme β small mean-reversion probe only |
| π΄ AVOID (trend) | MACDβ + Hurst trending | Real downtrend β don't catch the knife |
| βͺ WAIT | No clean directional edge | Wait for a clearer entry |
Surfaced as BB% + Entry columns in the sector scan and screener tables, and in every stock's quant thesis.
LLM scans live RSS from Reuters, FT, WSJ, Bloomberg β identifies macro shock events (rate decisions, earnings, geopolitics) and surfaces the immediate trade setup for each.
GitHub Trending Β· TechCrunch Β· VentureBeat Β· arXiv Β· Reddit AI communities Β· YC companies β AI-generated bilingual briefing: top startups, research breakthroughs, funding intelligence, non-obvious trends.
Runs the full pipeline and delivers a dark-themed HTML report to your inbox every morning at 7 AM. Includes all sections: AI infra leaderboard, whale tracker summary, market intelligence, macro alerts, and tech briefing β in English and Chinese.
Sign up at console.groq.com β free tier, very fast, uses Llama 3.3 70B.
pip install -r requirements.txtcp .env.example .env
# Required: GROQ_API_KEY
# Optional: GMAIL_ADDRESS + GMAIL_APP_PASSWORD for daily email# AI Infrastructure value chain β hunt the "next Micron"
python3 main.py --mode aii
# Defensive Alpha β beta-adjusted alpha + downside-protected portfolio
python3 main.py --mode portfolio
# Smart money tracker β 23 hedge funds, 7 tabs
python3 main.py --mode whales
# Full run: AI infra β whales β sectors β tech briefing
python3 main.py --mode full
# Email mode: full run + deliver to inbox
python3 main.py --mode email
# Just stocks (sectors + ETFs + hidden gems)
python3 main.py --mode stocks
# Hidden gems only (~1 min, fastest)
python3 main.py --mode gems
# Tech briefing only
python3 main.py --mode briefingpython3 setup_cron.py
# Installs a cron job: every day at 7:00 AM (America/Los_Angeles)
# Sends the full report to the Gmail address in your .envEvery mode uses a built-in scrollable pager (less).
| Key | Action |
|---|---|
β β |
Scroll horizontally through wide tables |
β β or j / k |
Scroll vertically |
G |
Jump to bottom |
g |
Jump to top |
/ then text |
Search |
q |
Exit pager |
All data fetches run on a concurrent thread pool β stocks, ETFs, and whale holdings are fetched in parallel, not sequentially. SEC EDGAR requests go through a global rate limiter (8 req/s, under EDGAR's 10 req/s fair-access ceiling).
| Task | Before | After |
|---|---|---|
| 100+ sector stocks | ~3 min | ~25s |
| 75 ETFs | ~90s | ~8s |
| 23 hedge fund 13F filings | ~45s | ~12s |
| 30 hidden gems | ~60s | ~7s |
signalforge/
βββ main.py # Entry point β 7 modes
βββ config/
β βββ universe.py # AI infra value chain + 10 sectors + 75 ETFs + 30 hidden gems
β βββ whales.py # 23-fund registry with CIKs, styles, known-for
β βββ settings.py # Screener thresholds, signal weights
βββ stocks/
β βββ ai_infrastructure.py # AI infra value-chain scanner + Opportunity Score engine
β βββ parallel.py # Thread-pool helper β concurrent ticker fetches
β βββ quant.py # Master quant engine (5 sub-scores, 0β100)
β βββ technical.py # MACD, Stochastic, ATR, OBV, Fibonacci, ADX
β βββ risk_metrics.py # Sharpe, Sortino, VaR, CVaR, Beta, ML trend
β βββ sector_scan.py # Sector scanner + ETF table
β βββ hidden_gems.py # Small/mid-cap experimental picks
β βββ screener.py # Discount buy signals + GARP value picks
β βββ backtest.py # Walk-forward backtester + OLS weight optimization
β βββ data_enrichment.py # Finviz scraper β short interest, analyst ratings
βββ portfolio/ # Defensive Alpha engine (AQR Total Portfolio Approach)
β βββ factor_model.py # Beta-adjusted alpha: CAPM beta, Dimson beta, appraisal ratio, convexity
β βββ construction.py # Appraisal-weighted + low-beta-tilt defensive constructor
β βββ risk_parity.py # Equal Risk Contribution constructor (Bridgewater All Weather)
β βββ stress.py # Downside/upside capture, drawdown, stress-window backtests
β βββ data.py # Parallel multi-year price fetcher
β βββ engine.py # Orchestrator: data β factor model β construct β stress
β βββ display.py # Rich tables + concept primer
βββ whales/
β βββ whale_display.py # Whale tracker β 7 tabs, quant enrichment, novelty ranking
β βββ sec_13f.py # SEC EDGAR 13F parser β rate-limited, parallel, no re-downloads
β βββ social_signals.py # Congressional trades, insider buying, StockTwits, news
βββ scrapers/
β βββ github_trending.py # GitHub Trending
β βββ feeds.py # TechCrunch, VentureBeat, arXiv RSS
β βββ reddit_ai.py # Reddit AI communities
β βββ yc.py # YC company directory
β βββ macro_news.py # Reuters, FT, WSJ macro headlines
βββ analysis/
β βββ ai_analyst.py # Sell-side style bilingual AI reports (EN + δΈζ)
β βββ llm_client.py # Multi-provider LLM client β Groq, Claude, Gemini, Ollama
β βββ headline_trades.py # Macro shock β trade idea LLM analysis
β βββ emailer.py # Dark-themed HTML email via Gmail SMTP
βββ run_daily.sh # Cron entry point
βββ setup_cron.py # One-command cron installer (7 AM daily)
βββ output/ # Daily reports saved as Markdown
| Provider | Cost | Model | Setup |
|---|---|---|---|
| Groq (default) | Free | Llama 3.3 70B | console.groq.com |
| Anthropic | Paid | Claude Opus/Sonnet | console.anthropic.com |
| Google Gemini | Free tier | Gemini 1.5 Flash | aistudio.google.com |
| Ollama | Local/free | Any local model | ollama.com |
LLM_PROVIDER=groq
GROQ_API_KEY=your_key_here
# Optional β for daily email delivery
GMAIL_ADDRESS=you@gmail.com
GMAIL_APP_PASSWORD=your_16_char_app_passwordThis project demonstrates end-to-end financial engineering across four pillars:
π‘οΈ Defensive Alpha Portfolio Engine β CAPM factor model computing beta-adjusted alpha (appraisal ratio = alpha Γ· idiosyncratic vol), Dimson/lagged beta for true market sensitivity, betting-against-beta tilt, and a convexity sleeve (trend-following, anti-beta, gold, long bonds) sized to a target portfolio beta. Includes a second construction method β Equal Risk Contribution risk parity (Bridgewater All Weather, solved by cyclical coordinate descent) β rendered head-to-head against the AQR book on the same universe. Stress-tested with downside/upside capture, win-rate in down months, max drawdown vs SPY, and 2022 / 2025 historical selloff windows. Grounded in AQR's Total Portfolio Approach and Maillard-Roncalli risk-budgeting research.
π°οΈ AI Infrastructure Value Chain β ~50 picks-and-shovels names scored across 8 layers (compute silicon, foundry, memory, networking/optics, servers/cooling, neoclouds, power, hyperscalers) with a custom Opportunity Score rewarding fair valuation + high growth + analyst upside before market re-rating.
π Smart Money Tracker β Live SEC EDGAR 13F XML parsing for 20+ funds (Berkshire, Bridgewater, Renaissance, Tiger Global) with QoQ change detection, congressional trade monitoring (STOCK Act), and insider buying signals. Concurrent pipeline with global rate limiting completes in <90 seconds.
π 5-Factor Quant Engine β Kalman filter (fair value tracking), Markov chain regime detection (BULL/BEAR/SIDEWAYS), Hurst exponent (mean-reverting vs trending), and multi-factor model (Value/Growth/Quality/Momentum) scoring 150+ stocks. Walk-forward backtested with OLS factor weight optimization. LLM-generated bilingual (EN/δΈζ) analysis delivered by automated daily email.
| Skill | Implementation |
|---|---|
| Portfolio construction | CAPM factor model, Jensen's alpha, appraisal ratio, Dimson/lagged beta, betting-against-beta, convexity, AQR Total Portfolio Approach, risk parity / Equal Risk Contribution (Bridgewater All Weather) |
| Quantitative finance | Kalman filter, Markov chain regime detection, Hurst exponent, Sharpe/Sortino/VaR/CVaR, multi-factor models, AQR Quality Minus Junk (QMJ), GARP/PEG, walk-forward backtesting |
| Data engineering | Multi-source ingestion: SEC EDGAR 13F, Finviz, Yahoo Finance, StockTwits, Reddit, GitHub, RSS, with concurrent thread-pool architecture and global rate limiting |
| Systems design | Modular CLI (8 modes), thread-safe caches, automated cron scheduling, HTML email delivery, idempotent installers |
| AI/LLM integration | Multi-provider client (Groq/Claude/Gemini/Ollama), bilingual sell-side research, macro event analysis, portfolio strategist commentary |
| Financial analysis | 13F XML parsing, QoQ change detection, congressional trade monitoring, insider signal tracking, value-chain mapping |
| Investment research | Opportunity scoring, novelty ranking, asymmetric setup detection, sector rotation, defensive sleeve construction |
For educational and research purposes only. Not investment advice. All models have inherent limitations. Do your own due diligence.
MIT License β free to use, modify, and distribute.