Build a regime-detection trading system from scratch. Starting with price returns and ending with a live Python dashboard, each lesson adds one layer of the complete architecture.
Foundations
Lesson 01
Why we model returns, not prices. Percentage change, log returns, and why financial data looks the way it does.
Finance · MathLesson 02
Markets cycle between distinct states — trending bull, crashing bear, and choppy sideways. How to see and measure them.
Finance · IntuitionLesson 03
Each regime has a characteristic return distribution. The Gaussian (normal) distribution and its parameters μ and σ.
Probability · MathThe Model
Lesson 04
Hidden Markov Models: hidden states, observable emissions, transition matrices. The three core components of an HMM.
AI · ProbabilityLesson 05
How the HMM decodes the most likely state sequence from observations. Viterbi algorithm and Baum-Welch EM training.
AI · AlgorithmsLesson 06
Transforming raw OHLCV market data into the three features the HMM trains on: returns, range, and volume change.
Data · EngineeringThe Strategy
Lesson 07
Eight technical confirmations — RSI, MACD, ADX, and more. The 7/8 entry gate, hysteresis, and the 48-hour cooldown.
Trading · StrategyLesson 08
Complete Python application: data loader, backtesting engine, and Streamlit dashboard. Architecture, code, and running instructions.
Python · Streamlit · Full Build