Quantitative Finance · Python
An end-to-end AI-based trading strategy evaluator that compares ML-driven signals against buy-and-hold market performance across multiple assets and time horizons.
ML
Signal Generation
vs
Benchmark Comparison
Live
Data via yfinance
PnL
Curve Analysis
Popular backtesting libraries make it easy to run a strategy but hard to honestly compare it to a passive benchmark. Data-snooping bias, transaction cost neglect, and lack of statistical significance testing give traders false confidence in strategies that don't hold up out-of-sample.
Price and volume features are engineered from raw OHLCV data (via yfinance) and fed into a classification model that generates long/flat signals. The strategy is backtested on a strict train/test split — the model never sees out-of-sample data during optimisation.
A Streamlit interface lets users select any ticker and time window, compare the ML strategy to buy-and-hold via cumulative PnL curves, Sharpe ratio, max drawdown, and win rate. Transaction costs are modelled as a configurable per-trade friction, making the comparison realistic.
The tool surfaces whether an ML strategy actually generates alpha relative to passive investment — accounting for costs and using proper out-of-sample testing. The full methodology, feature engineering approach, and results are documented in the companion report.