Walk-Forward Backtest · Zero Lookahead Bias · Built with Claude Code

Can ML beat
the market?
We ran the test.

A 6-model ensemble — LinReg, LogReg, GBT, LightGBM, LSTM, and Regime Classifier — tested on 68 S&P 500 stocks across 16 quarterly windows from 2022 to 2025. Zero lookahead bias. Full transparency.

Signal Final Value
Starting from $100K
Alpha vs S&P 500
Excess return
Sharpe Ratio
vs SPY
Max Drawdown
vs SPY
Methodology

Walk-forward backtesting.
The honest way to test.

Traditional backtests often cheat — they train on future data. Alpha Signal uses walk-forward validation: models see only what a real investor would have known at each point in time.

// 01
📊
Historical Data Collection
Price, volume, and technical indicators are collected for 68 S&P 500 stocks. Each feature is lagged so only past data informs predictions.
// 02
🔄
16 Quarterly Windows
Q1 2022 through Q4 2025. Each window trains the model on all prior data, then tests on the next quarter. The training set expands — never the same model twice.
// 03
📈
Portfolio Simulation
$100K deployed across all 68 stocks with persistent positions, confidence-weighted allocation, and 0.1% transaction costs. Results compared against passive SPY.
The Ensemble

Six models.
One decision.

No single model has an edge in all market regimes. The ensemble combines classical statistics, gradient boosting, and deep learning — each votes, confidence-weighted.

// Classical
Linear Regression
Baseline return predictor. Captures linear factor exposures: momentum, reversion, volume trends.
Interpretable
// Classical
Logistic Regression
Binary directional classifier. Fast, regularised, provides calibrated probability estimates.
Probability-calibrated
// Boosting
Gradient Boosted Trees
Captures non-linear feature interactions. Robust to outliers. Strong performer in trending markets.
Non-linear
// Boosting
LightGBM
Leaf-wise tree growth with histogram binning. Faster than XGBoost with comparable accuracy.
High-speed
// Deep Learning
LSTM Network
Long Short-Term Memory — learns sequential patterns across price history. Captures regime memory.
Temporal patterns
// Regime Detection
Regime Classifier
Detects bull/bear/sideways regimes and adjusts signal weights dynamically. Provides the ensemble's macro filter.
Adaptive
Evidence

The numbers.
Unedited.

Alpha generated above passive S&P 500 return
Signal portfolio total return (Jan 2022 – Apr 2025)
Sharpe ratio vs for passive SPY
Max drawdown vs for SPY — less risk taken

These results come from a walk-forward backtest — 16 quarterly windows where models were trained strictly on past data before each test period. This is how practitioners in quantitative finance validate strategies; traditional backtests that train on the full dataset are not credible.

The ensemble outperformed SPY across a period that included the 2022 bear market, the 2023 tech recovery, and 2024–25 AI-driven growth. It performed best as drawdown protection — reducing losses in falling markets while capturing upside in rising ones.

BUY signal accuracy sits at %, with an average return of % per signal. Not every call is right — but the edge compounds over thousands of decisions.

⚠ Not financial advice. This is a research backtest. Past backtested performance does not guarantee future live trading results. Transaction costs, slippage, and market impact in live trading would affect returns. Always consult a qualified financial advisor before making investment decisions.
Interactive Dashboard

Explore the full data
for yourself.

Stock-by-stock drill-down. Walk-forward windows. Live signal track record. Paper portfolio builder. All of it, right here.

SCROLL TO DASHBOARD

Alpha Signal vs S&P 500

Can a 6-model ML ensemble, tested with zero lookahead bias, beat the market?
Walk-forward backtest on S&P 500 stocks — built entirely with Claude Code.

Walk-Forward Backtest No Lookahead Bias 6-Model Ensemble S&P 500 Stocks

Equity Curve: $100K Invested Jan 2022

Persistent Positions

Portfolio Allocation Over Time

Top 15 Holdings

Stock Drill-Down

Interactive
DateSignalPriceBuy ProbDay ReturnCorrect

Signal Performance — All S&P 500 Stocks

StockSignalsBUYSELL/SHORT BUY AccSELL AccBUY Avg Ret Trades$ TradedP&L

Walk-Forward Windows

16 Quarterly Windows
WindowTrain EndTest StartTest EndSignalsBUY AccSELL Acc

Loading live track record...

Build Your Paper Portfolio

Pick S&P 500 stocks, set your capital, and track how Buy & Hold compares to following Alpha Signal's recommendations — starting today.