Inside the SPY v4 Model: Architecture of an AI Trading Strategy
A transparent look at the SPY v4 model's architecture—how input features, regime detection, and position sizing work together in Lukra's flagship AI trading strategy.
Note: This post has been reviewed for proprietary information. Specific parameter values and thresholds are not disclosed. The architectural overview below reflects the model's design at a conceptual level.
Most algorithmic trading platforms describe their strategies in one of two ways: either vague marketing language about "AI-powered algorithms," or impenetrable academic notation that nobody outside a PhD program can parse. Lukra takes a different approach.
The SPY v4 model is Lukra's flagship strategy. Understanding how it works — not just that it works — is part of the transparency that we think serious investors deserve. This post walks through the architecture at a level that's honest without exposing the proprietary details that make it competitive.
Input Feature Layer: What the Model Sees
The SPY v4 model ingests a multi-layered input feature set. At the highest level, these break into four categories:
Price and volume features. Classic technical indicators across multiple timeframes — momentum, trend, mean-reversion signals, volume-weighted price levels. These form the baseline technical picture.
Volatility regime features. The VIX and related volatility derivatives are first-class inputs, not secondary filters. The model continuously assesses whether the market is in a low-vol, neutral, elevated, or crisis volatility regime. This classification gates certain strategies entirely and adjusts position sizing for others.
Sentiment features. NLP-derived sentiment scores from financial news and earnings call transcripts feed into the model as auxiliary signals. Sentiment doesn't drive trades on its own; it modulates confidence in technically-driven signals.
Cross-asset correlation features. The model monitors Treasury yields, credit spreads, and USD strength as contextual signals. A breakout in SPY that occurs against deteriorating credit conditions carries less weight than one occurring during broad risk-on conditions.
Across all these categories, the model processes over 1,300 individual features — far beyond what any human trader can hold in working memory simultaneously.
Regime Detection: Reading the Market Before It Reads You
The most important architectural decision in SPY v4 is that regime detection runs before signal generation, not after. The model doesn't ask "what's the trade?" and then check whether conditions are favorable. It first classifies the current market regime, then activates only the signal set appropriate for that regime.
Think of it as having multiple sub-strategies — a playbook for low-volatility trending markets, a different playbook for choppy elevated-volatility environments, and a conservative posture for crisis conditions. The regime classifier selects the playbook. The signals within that playbook then determine trade direction and sizing.
This design prevents a common failure mode in naive algorithmic systems: applying momentum strategies in mean-reverting regimes, or applying mean-reversion strategies in trending environments. The wrong strategy type applied in the wrong regime can systematically lose money even if the underlying signals are high quality.
Signal Processing and Confidence Scoring
Once the regime is classified and the appropriate signal set is active, the model evaluates each signal and computes a composite confidence score for the trade idea.
Signals aren't equally weighted. Historical performance across different market regimes informs each signal's weight. A signal that has been highly predictive during elevated-VIX environments gets higher weight when the regime detector identifies that condition. A signal that works well in trending markets gets downweighted during choppy regimes.
The composite confidence score is a real number between 0 and 1. Low-confidence environments produce small positions or no position at all. High-confidence environments unlock larger position sizes and, in some cases, leveraged exposure.
This is the core of how SPY v4 avoids forcing trades. Most retail traders feel compelled to always be in the market — the model has no such compulsion. When the edge isn't there, it waits.
Dynamic Position Sizing: From 1x to 3x
Position sizing in SPY v4 is dynamic, not fixed. The model uses a modified fractional Kelly framework adjusted for real-world constraints: slippage, execution costs, and portfolio concentration limits.
At baseline, the model trades at 1x exposure. As confidence rises and volatility regime conditions are favorable, it scales toward 2x and occasionally 3x using leveraged ETF instruments. This isn't reckless leverage — it's disciplined amplification applied only when the model's edge is statistically significant.
When confidence falls below a threshold or the volatility regime shifts to elevated or crisis classification, the model scales back to 1x or exits entirely. The dynamic nature of leverage is what separates high-conviction entries from low-quality ones. You don't need to trade bigger during uncertain markets — you need to trade bigger only when you're right.
For a deeper explanation of how the leverage scaling works, see Dynamic Leverage Explained: Why Our Models Shift Between 1x and 3x.
Execution Logic
The model generates trade signals. Execution converts those signals into filled orders. This layer handles:
- Order timing — signals generated during illiquid pre-market periods are held for regular session execution to reduce slippage
- Entry staging — large positions may be built incrementally over several bars rather than executed as a single block
- Stop-loss management — exits are governed by the same regime-aware logic as entries; stop levels widen in high-volatility regimes to avoid being stopped out by noise
- Tax efficiency — holding period optimization where the model can hold a position without sacrificing edge
The execution layer also handles the interface between the model and the brokerage API — order types, retry logic on failed fills, and real-time position reconciliation.
What Makes SPY v4 Different
Plenty of trading algorithms apply technical signals to SPY. What distinguishes SPY v4 is the integration of four design principles that most retail tools ignore:
- Regime-first architecture. Strategy selection is conditional on market state, not applied universally.
- Sentiment as a validation layer. NLP signals don't drive trades; they confirm or contradict the technical picture.
- Dynamic confidence-based sizing. Position size is a function of edge certainty, not capital allocation rules.
- VIX as a first-class input. Volatility regime classification gates leverage and strategy selection at the highest level of the model.
The result is a system that doesn't try to win every day — it tries to win consistently over time while limiting the magnitude of losing periods.
Limitations and Honest Caveats
No model is immune to regime shifts it hasn't seen before. SPY v4 is trained on historical market data that includes major drawdowns, volatility spikes, and trend reversals — but not every possible future condition. A genuinely novel market structure could degrade model performance.
The model also doesn't predict the future. It identifies high-probability conditions based on historical signal behavior. Those probabilities are meaningful but never certain.
Backtested performance and live performance will differ. The gap between them — caused by slippage, execution friction, and overfitting — is something Lukra addresses explicitly. You can read about that in Backtesting vs. Live Performance: What the Gap Really Means.
Understanding architecture is step one. Seeing the strategy trade live is step two. View Lukra's live performance data →
Past performance is not indicative of future results. Algorithmic trading and leveraged instruments involve significant risk of loss. Dynamic leverage amplifies both gains and losses.
Ready to see AI-driven trading in action?
View Live Performance