Replications of Ernest P. Chan (2013), Algorithmic Trading: Winning Strategies and Their Rationale. Wiley, using Python with pyatl.
- Time series analytics (chapter 2)
- Augmented Dickey-Fuller Test
- Hurst Exponent and Variance Ratio Test
- Half-life of Mean Reversion
- Cointegration and Johansen Test for Cointegration (
johansen-linear: the eigenvector and the lookback are estimated on the whole file, so its figure looks ahead)
- Mean Reversion Strategies (chapter 3)
- Linear mean-reverting (
linear,linear-log,ratio) - Bollinger Bands (
bollinger) - Kalman Filter (
kalman)
- Linear mean-reverting (
- Mean Reversion of Stocks and ETFs (chapter 4)
- Buy-on-Gap Model (
bog) - Cross-Sectional Linear Long-Short (
linear-longshort/longshort) - Arbitrage between an ETF and Component Stocks
- Buy-on-Gap Model (
- Interday Momentum Strategies (chapter 6)
- Time series momentum (
tsmom) - Cross-sectional momentum (
xsmom)
- Time series momentum (
- Intraday Momentum Strategies (chapter 7)
- Opening Gap Strategy (
gap) - Post-Earnings Announcement Drift (
pead)
- Opening Gap Strategy (
- Mean Reversion of Currencies and Futures (chapter 5)
- Trading Currency Cross-Rates
- Trading Futures Calendar Spread
- Volatility futures versus Equity index futures
It needs Python 3.12 or newer, uv, and an installed algotradelib; see its install guide.
uv sync builds pyatl from source against that library, so it also needs a C++17 compiler and CMake.
uv syncIf algotradelib is installed under a prefix CMake does not search, set CMAKE_PREFIX_PATH to that prefix for uv sync.
uv run atl-strategy -s <strategy_name> -d <data_path> ...This project was developed with the assistance of generative AI tools.
This project is released under the MIT license; see LICENSE. The software is provided as is, without warranty of any kind, and the authors are not liable for any loss, including trading losses, arising from its use. Nothing in this repository is investment advice.