| ### Intelligence Layer | Component | Detail | |-----------|--------| | **9 ML Models** | RF, XGB, EMAformer, MOIRAI-2, Chronos-2, DDPM, PPO RL, GNN, LR | | **4-Role Perspective Panel** | Conservative / Aggressive / Macro / Quant analysts with **regime-aware DyTopo dynamic selection** (subset by regime, ~50% LLM call savings) | | **CORAL Shared Memory** | Unified read aggregator over per-role + tiered memory; cross-role consensus injected into prompts | | **Adversarial Debate** | Bull/Bear/Judge via Claude Sonnet + Haiku, full text stashed on `decision.extra` for offline eval-set assembly | | **8-Source Signal Fusion** | Technical + ML + News + Options + Institutional + Social (Reddit/X) + Earnings/PEAD + Prediction Markets (Polymarket + Kalshi) | | **10-Model ML Ensemble** | RF, XGB, LR + EMAformer, MOIRAI-2, Chronos-2, DDPM, PPO RL, GNN + **Kronos** (foundation model trained on 45+ global exchanges, 4 sizes) | | **Adaptive Source Weights** | Per-source rolling accuracy → dynamic weight scaling. Sources that earn their seat amplify; ones that don't get muted. | | **Regime-Conditional Strategies** | Detects trending / ranging / volatile and proposes a tuned strategy + params (heuristic or LLM-backed) | | **What-If Scenarios** | Claude Opus 4.7 simulates impact of hypothetical events on your portfolio | | **20-Agent Micro Swarm** | Rule-based Monte Carlo convergence simulation | | **Bias Self-Correction** | Tracks prediction accuracy, auto-adjusts confidence | | **Strategy Evolution** | LLM generates Python strategies → sandbox tests → evolves winners | | **10 Rule-Based Strategies** | Double MA, MACD, Bollinger, RSI reversal, trend-momentum, alpha combo, dual thrust, ensemble vote, regime ensemble, **VWAP reversion** | | **DSPy Phase B harness** | Compile pipeline ready: synthetic eval set → MIPROv2 → A/B vs hand-tuned baseline → 5%-gate ship/reject. Awaits 100 production debates worth of training data. | | **Multi-modal Debate** | Quant persona reads the K-line image alongside the numbers via Claude Vision. Lift harness compares vision-vs-text decision agreement against forward returns; cron runs nightly. Off by default (vision ~5× text cost) until ≥50 production pairs clear the +5% absolute-lift gate. | | **Daily Intel** | 50+ tickers, sector rotation, volume spikes, earnings watchlist, AI morning brief | | ### Execution Layer | Component | Detail | |-----------|--------| | **Portfolio Manager Gate** | Final approval layer — concentration, sector, streak checks + position sizing — runs on `analyze`, `deep-analysis`, AND `alpaca/execute` (rejected trades never hit the broker) | | **Token & Cost Budgets** | Client-side TokenBudget enforcer caps any agentic loop; deep-analysis short-circuits LLM-heavy steps gracefully when cap hits | | **Paper Trading** | Alpaca bracket orders with auto stop-loss/take-profit | | **Real-time Stream** | WebSocket prices every 5s + signal change alerts | | **LLM Observability** | Triple sink: JSONL log + PostHog (`$ai_generation` events) + Langfuse (`generation-create` traces, prompt versioning, evals) | | **Multi-Provider LLM** | Anthropic (default), OpenAI, Gemini all implemented; Ollama/Grok scaffolded. Switch via `ORALEXXA_LLM_PROVIDER` | | **Dashboard** | Next.js 16, Art Deco theme, EN/ZH bilingual | | **Desktop Coach** | Floating AI pet with voice input (Whisper) + TTS, API retry + caching | |
| Frontend | Next.js 16, React 19, Tailwind CSS 4, PWA |
| Backend | FastAPI, Python 3.11, WebSocket |
| AI | Claude Sonnet 4.6 + Haiku 4.5 (dual-tier routing) |
| ML | scikit-learn, XGBoost, PyTorch (EMAformer, DDPM, GAT, PPO) |
| Data | yfinance (real-time + historical), parquet cache layer (`ORALLEXA_USE_CACHE=1`) |
| NLP | FinBERT, VADER, TextBlob |
| Trading | Alpaca paper trading (bracket orders) |
| Orchestration | LangGraph (stateful debate pipeline) |
| Deploy | Docker, GitHub Actions CI/CD, Vercel |