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 executes 3x daily. Mock/rate-limited responses are automatically discarded. Buy signals trigger $1,000 paper trades. A separate validation cron closes positions when TP, SL, or a 14-day expiry is hit.
3:1 Risk/Reward Gate
Gemini Flash is explicitly banned from recommending "Buy" unless the profit target is ≥ 3× the stop-loss risk. If the math doesn't pass, the AI must output "Hold".
Paper Trade Lifecycle
Every Buy signal auto-opens a $1,000 simulated position. The validation cron closes it when the price hits the AI's exact take-profit or stop-loss target, or after 14 days.
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.