Aug. 26 at 4:50 PM
$IYH $IBB $XLV $SPY $RSP
Quant-Builder.ai - Simplifying Quant Trading
Building an ML Model That Finds a Tradable Edge
One thing that gets misunderstood about using machine learning in financial markets is the difference between building a great classifier and building a useful trading model. The goal is to find a repeatable statistical edge that can help a trader narrow thousands of possible opportunities into a manageable group of stocks with favorable characteristics.
This Healthcare model that is often used is a good example.
It's a LightGBM model using 45 selected technical and fundamental features and five years of healthcare market data. Five years isn't a default. That's the window because the post-COVID regime still looks intact, so the training period is the same kind of market you'd actually be trading in. The target is straightforward: identify stocks with the characteristics associated with a +3% move over the following five trading days.
In testing, the model hit its target - a +3% move within five trading days - on 37.9% of predictions, with a Sharpe ratio of 0.97. Sharpe is just return measured against how much that return swings around, so near 1 is promising once you add risk management.
So the next question is what happens when a thin edge gets traded with rules, a higher confidence threshold, a cap on positions, a stop loss and position sizing.
The backtest required 60%+ model confidence and then applied actual portfolio rules - a cap on simultaneous positions, a 5% stop loss, and slippage.
Run over two years of historical data with those rules in place, the strategy took 1,767 trades and returned 301.87%, with a 2.29 Sharpe ratio and a maximum drawdown of 15.70%. The average position was held 4.2 days, the profit factor came in at 1.48, and 72% of individual months finished profitable.
The number worth sitting with, though, is the win rate: 44.5%. The strategy loses more trades than it wins, and it isn't close. What makes it work is the gap between the two outcomes - the average winning trade was +9.50% while the average losing trade was -6.65%, roughly a 1.4:1 payoff, which comes out to about
$171 of expectancy on the average trade.
That's the part that tends to get lost. The model doesn't need to be right all the time. It needs to surface enough opportunities with favorable payoff characteristics that the portfolio as a whole has an edge.
Backtest Is Still a Backtest
So, the real question is what happens when the model stops looking backward and starts producing picks on data it has never seen.
The backtest ended on May 10. Since then, every stock the model surfaced has been recorded, day by day. These aren't names picked out afterward because they happened to work - they're the candidates that came out as the model scored new market data each morning.
Over the first 64 trading days, the Healthcare book has averaged about 8 picks a day above 60% confidence, at an average confidence of 64.3%. Taking all of them at the opening price on the signal day, using a 5% stop and holding through the target date, the average position returned +1.44% and 58% of them worked, with an estimated Sharpe of 4.55.
In practice that gets managed rather than blindly buying every name at the opening print. Confidence thresholds narrow the predictions, portfolio rules control how those signals get traded, and the trader's own judgment decides which of them are actually worth taking.
That's fundamentally what Quant-Builder.ai is built around. Machine learning isn't the trader. It's a tool for the trader.
Take hundreds of potential features. Train models against a specific market hypothesis. Test them historically. Walk them forward. Determine whether an edge exists. Then allow the model to continuously scan the market and surface the handful of stocks that currently fit what it learned.
Try a Free Demo! at Quant-Builder.ai/learn
Start for
$25 ! at Quant-Builder.ai/pricing