System Architecture
Under the hood of not-financial-advice — a 3-engine, AI-powered money maker.
System Overview
The architecture orchestrates market intelligence through a Tri-Tier AI framework. It dynamically adjusts to macroeconomic regimes, filters candidates via strict Risk/Reward math, and uses DeepSeek R1 to autonomously learn from failed paper trades.
Execution Pipeline
The scanner runs at the open and midday; a third job validates before the close. Mock/rate-limited responses are automatically discarded. Buy and Sell (fade) signals open risk-sized paper trades — each risking 2% of the paper book, not a flat dollar amount. A separate validation cron closes positions when the take-profit, stop, breakeven ratchet, or a time-stop is hit.
▸Show the full play-by-play (every step)
Risk/Reward Gates
The AI analyst is banned from recommending "Buy" unless the profit target is ≥ 3× the stop-loss risk. Then, before any (paper) capital moves, a server-side backstop independently re-checks the reward/risk at the real fill price and refuses anything below the ~1.22 break-even (floor 1.5×) — so a hallucinated gate can't open a losing-by-design trade.
Paper Trade Lifecycle
Every Buy or Sell (fade) signal auto-opens a risk-sized simulated position — sized so a stop-out loses a fixed 2% of the book. The validation cron closes it on a take-profit or stop touch (with a breakeven ratchet once +1R is earned), or via a time-stop.
Tri-Tier AI Strategy
The system is powered by a multi-provider fallback architecture to bypass free-tier rate limits and prevent timeouts.
Lightning-fast inference prevents 10s serverless timeouts.
High token limit safety net.
Deep quantitative reasoning (Slow: Warning 10s limits).
The Self-Learning Matrix
A fully autonomous money maker needs to evolve. We built a continuous feedback loop using the reasoning engine.
- 1Algorithmic Post-MortemsWhen a Paper Trade hits a Stop Loss, DeepSeek R1 analyzes the failure.
- 2Rule GenerationThe AI generates a permanent "Trading Rule" (e.g. "Do not buy gap ups in chop").
- 3System Context UpdatesThese rules are injected into future AI prompt weights so the same mistake is never repeated.
Dynamic Macro-Regime
The system is no longer "blind" to broader market conditions. Every morning, DeepSeek R1 categorizes the SPY/QQQ into a specific regime (Bullish, Bearish, Choppy, Volatile). The intraday scanner automatically adjusts its conviction weights based on this bias—demanding higher volume in bearish conditions before firing a signal.
Mock Mode & DB Protection
When API limits are hit across all 3 providers, mock data is generated for UI display but is explicitly discarded from the database. DB pollution guards prevent fake data from corrupting historical analytics.
The Gainer Fade Thesis
Empirical observation: stocks that gap up significantly on the daily Top Gainers list tend to fade sharply within 1-3 days. The larger the gap, the higher the probability of mean-reversion.
Low Fade Risk
3-8%
Moderate gap, sustainable momentum
Medium Fade Risk
8-15%
Overextended, watch for reversal
High Fade Risk
15%+
Extreme gap, likely to retrace hard
The Scanner UI now highlights the "Fade Risk" level on each candidate card. High-gap candidates that the AI rejects as "Hold" are potential short/fade opportunities.