A second layer of judgment sits between every signal your strategy generates and every order that reaches the market — deciding whether to act, how much to risk, and why. This page is educational and forward-looking: the model described below does not exist yet. What already exists is the data pipeline feeding it, built and running today.
Training Data Status
Live counts from the pipeline already collecting the data this layer will eventually train on.
—Decisions Logged
—Signals Taken
—Trades Closed
Loading…
What Feeds the ML Layer
Five sources, already flowing, converge into one training set.
📊
Bar Data
ohlcv_cache
Price, volume, and indicators for every bar. Becomes the feature vector the model evaluates at signal time.
📋
Decision Log
decision_log
Every signal the strategy evaluated, taken or skipped, with the exact market state it saw. This is the training set — the skipped signals are the control group.
🌊
Regime State
market_regimes
ADX and VIX-based classification of current market conditions. Teaches the model that a momentum signal in a choppy market is not the same as one in a trend.
💹
Trade Outcomes
trades
What actually happened after each taken signal. The ground truth that defines winning vs. losing decisions in the training labels.
🛡️
Gauntlet Profile
variant_profile
The sealed behavioral baseline from validation — expected Sharpe, slippage, MAE. The model uses this to detect when live behavior departs from the backtest promise.
↓↓↓↓↓
🧠
Meta-Label Model
Not yet trained — see the build timeline below.
How It Will Work
Should we take this signal?
Your SMA crossover fires a LONG. A second model asks: given everything we know about this exact market moment — volatility, regime, recent momentum, time of day, how this strategy has performed in conditions like these — how confident are we that this specific signal will work? The answer is a score 0–1. Above a configurable threshold: take the trade. Below: skip it and record why.
LONG signal→ML scores 0.78→TAKE
LONG signal→ML scores 0.31→SKIP
Does this strategy work in today's market?
An SMA crossover works in trends and gets chopped up sideways. The model learns this pattern from the decision_log automatically — no manual rules needed. It sees that signals fired during trending_up regimes had a 71% win rate historically while choppy regime signals had 38%, and weights its confidence accordingly.
Trending Up
71%
Choppy
38%
Trending Down
29%
Volatile
44%
Illustrative — actual values learned from your strategy's history.
How much to bet?
Instead of binary take/skip, the model's confidence score scales the Kelly-calculated position size directly. High conviction = full Kelly. Moderate conviction = reduced size. This means the worst trades — the ones that cause drawdown — are automatically undersized even when taken.
Confidence 0.90
100% Kelly notional
Confidence 0.70
70% Kelly notional
Confidence 0.60
40% Kelly notional
Confidence < 0.60
Skip entirely
Before / After
Illustrative — actual improvement depends on your strategy.
Metric
Without ML
With ML
Win Rate
54%
63%
Max Drawdown
18%
11%
Sharpe Ratio
1.2
1.6
Trades Per Month
42
27
Position Sizing
Fixed Kelly
Confidence-scaled
Regime Awareness
None
Learned
📉
Smaller Drawdowns
Low-confidence signals get sized down or skipped entirely — the trades most likely to hurt never get full size in the first place.
🎯
Higher Win Rate
Filtering out the weakest signals raises the average quality of every trade that's actually taken, without changing the underlying strategy.
🌦️
Market-Aware Autopilot
The model learns which regimes a strategy actually works in — automatically, from real history — instead of trading blind to current conditions.
📈
Better Sharpe
Same edge, better-sized bets. Reducing variance on the losing side improves risk-adjusted return without needing a better base strategy.
🔍
Transparent Reasoning
Every skip is recorded with why. No black-box override — every decision the model makes is auditable after the fact, same as the gauntlet.
🔄
Self-Improving Over Time
More logged decisions and closed trades mean a better-trained model. The system gets more selective as its own track record accumulates.
Build Timeline
Where this capability actually stands today.
✓
Step 1 · Done
Decision log live — recording every signal taken and skipped with full feature snapshots.
✓
Step 2 · Done
Trade outcomes linked — each decision connected to its trade result via trace_id.
›
Step 3 · Next
Triple-barrier labeling — assign ML training labels (profit hit / stop hit / timed out) to each historical decision.
›
Step 4 · Next
Feature engineering — RSI, ATR, regime, volatility, momentum computed per bar at signal time.
—
Step 5 · Future
Train meta-labeler — first model once 100+ closed trades exist.
—
Step 6 · Future
Wire to execution — score every signal before it reaches Alpaca.