← All Projects

Quantitative Finance · Python

Trading Strategy
Explorer

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.

Python Streamlit scikit-learn Plotly yfinance Backtesting
Full Analysis ↗

ML

Signal Generation

vs

Benchmark Comparison

Live

Data via yfinance

PnL

Curve Analysis

01 / Problem

Most retail backtesting tools don't surface real alpha

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.

02 / Approach

ML signal generation with honest benchmark comparison

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.

03 / Result

An interactive, honest strategy evaluation tool

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.

Key Features
  • ML classification-based signal generation
  • Strict train/test split to prevent data snooping
  • Sharpe ratio, drawdown, and win rate metrics
  • Transaction cost modelling
  • Interactive Streamlit UI for any ticker/window