Successful Algorithmic Trading
by Michael Halls-Moore
Quick Summary
A comprehensive guide to building an algorithmic trading business using Python, covering strategy identification, backtesting methodology, data management, time series analysis, machine learning techniques, and automated execution systems for retail quantitative traders.
Detailed Summary
Written by Michael Halls-Moore, founder of QuantStart, this book provides a structured, hands-on roadmap for retail traders seeking to build quantitative trading systems using Python. The text is organized into logical sections that progress from foundational concepts through data infrastructure, statistical modeling, strategy development, risk management, and live deployment.
The opening sections establish algorithmic trading fundamentals, including its advantages (disciplined execution, removal of emotional bias, ability to backtest) and disadvantages (technology risk, overfitting, complexity). Halls-Moore makes the case that retail traders can still compete with institutional participants by exploiting niches in less-liquid instruments and shorter holding periods where large funds cannot operate efficiently.
The backtesting section is particularly rigorous, addressing critical biases including optimization bias (curve-fitting to historical data), look-ahead bias (using future information in past decisions), survivorship bias (only testing currently listed securities), and cognitive bias (selectively remembering favorable results). Exchange-specific issues such as order types, price consolidation, forex ECN mechanics, and shorting constraints are examined. Transaction costs including commission, slippage, and market impact are analyzed with emphasis on how they erode backtested performance in live trading.
The data platform chapters provide detailed instructions for building a securities master database using MySQL and Python, including schema design for end-of-day equities data, ORM implementation with SQLAlchemy, and data retrieval procedures. Data sources ranging from free providers (Yahoo Finance, Quandl) to commercial feeds (DTN IQFeed, QuantQuote) are evaluated for quality, breadth, and cost. Data cleaning procedures address survivorship bias, corporate actions, and continuous futures contract construction.
The statistical modeling sections cover time series analysis including tests for mean reversion (Augmented Dickey-Fuller), stationarity (Hurst Exponent), and cointegration (CADF test). Machine learning techniques including regression, classification, and time series models (ARIMA, GARCH) are introduced as tools for strategy development. The text emphasizes the scientific method of hypothesis generation, testing, and validation rather than data mining.
Strategy implementation covers event-driven backtesting architecture, programming language selection considerations (Python vs. C++ tradeoffs), and automated execution through Interactive Brokers using the IbPy library. Infrastructure decisions regarding home desktop versus VPS versus colocation are discussed. The book includes complete Python code examples throughout, making it immediately actionable for technically inclined readers.