Open Family Office Datasets Tickers Strategies Portfolios Research Posts About Changelog

Algorithmic Trading

Source

Citation. Ernest P. Chan. Algorithmic Trading: Winning Strategies and Their Rationale. Wiley Trading, John Wiley & Sons, Hoboken, NJ, 2013. ISBN 978-1-118-46014-6. A book of eight chapters, with MATLAB code: backtesting, mean reversion in three chapters, momentum between days and within a day, and risk management. It follows Chan's Quantitative Trading (quantitative-trading.md, #177).

Status. Planned. The book's split of a future's return into spot and roll needs every listed contract on each day, not only a continuous series. #464 states how a future's series is built, and this review adds that need to it. The book's other methods are already in the repo in a stricter form, or wait for a strategy that uses them.

Read. Read on 2026-11-28 from a PDF of the book that the maintainer supplied, with a text layer. Two subagents read:

They skimmed the MATLAB listings. I checked the quotes and numbers below against the text. Not read: chapter 4 (mean reversion of stocks and ETFs), the preface and the bibliography.

Summary

Claim. A strategy should have a reason, an inefficiency that the trader understands, before it has a backtest. Simple models with few parameters then exploit it.

Method. Statistical tests for mean reversion and momentum, then a backtest of a simple linear or Bollinger-band rule on ETFs, currencies and futures. Most samples run from one to eight years, between 2004 and 2012.

Findings, as the book reports them.

Strategy Data Result Where
Kalman-filter pair EWA and EWC "APR of 26.2 percent and a Sharpe ratio of 2.4" Ex. 3.3
Bollinger bands on a pair GLD and USO APR 17.8%, Sharpe 0.96 Ex. 3.2
Johansen portfolio EWA, EWC and IGE APR 12.6%, Sharpe 1.4 Ex. 2.8
Calendar spread CL, 12 months apart, 2008–2012 "unlevered APR of 8.3 percent and a Sharpe ratio of 1.3" Ex. 5.4
Time-series momentum TU, 2004–2012 APR 1.7% on notional, Sharpe 1, drawdown 2.5% Ex. 6.1
Cross-sectional momentum S&P 500, 2007 APR 37%, Sharpe 4.1, then −30% in 2008–2009 Ch. 6
Opening gap FSTX, 2004–2012 APR 13%, Sharpe 1.4 Ex. 7.1

Tests. ADF, the Hurst exponent, the variance ratio and the half-life for mean reversion. The cointegrated ADF and Johansen tests for pairs. For a backtest's significance, three nulls: a Gaussian t-statistic, returns simulated with the same four moments, and random entry dates.

Futures. A future's return is a spot return plus a roll return. The roll return comes from regressing the prices of the nearest five contracts on their time to maturity each day. In a calendar spread, the signal "does not depend at all on the spot price, only on the roll return!"

Where the claims go beyond the evidence

No result has costs. "In presenting the backtests of any strategy in this book, we do not include transaction costs." The next sentence admits look-ahead too: "We sometimes even commit a more egregious error". The cited studies of news and fund flows are "before transaction costs".

Parameters are chosen with hindsight, and no trial is counted. "With the benefit of hindsight, we pick" the Kalman filter's two parameters. The FX pair uses the training window that "gives better results in hindsight". The opening-gap rule is the future that "proved to work best" of several. Chapter 6 reports a grid of 49 look-back and holding periods with no correction. The author admits that "there is a risk of data-snooping bias in these results".

The hedge ratios use the whole sample. Chapter 2's pairs take their hedge ratio and half-life from all the data, then backtest on the same data. Chan flags this look-ahead once in general, and for one example, but not for the Johansen portfolios.

A test result is misread. The Johansen test on three ETFs is said to show "three cointegrating relations with 95 percent certainty". The book's own table doesn't support that. The eigen statistic for no relation is 16.897, below its 95% critical value of 21.131. A variance-ratio p-value of 0.37 is read as "a 37 percent chance that it is a random walk". The book's own chapter 1 warns against that reading.

Short samples, and no power. The tests for mean reversion are said to be more significant than a backtest, because they use every bar. Their power on a few years of data is not discussed, and the Hurst exponent has no standard error.

Credit. The method chapters are frank. Tweaking after an out-of-sample test means "we have just turned the out-of-sample data into in-sample data". He warns that "Most traders would be happy to find that live trading generates a Sharpe ratio better than half of its backtest value". And "Stationarity and cointegration are ideals that few real price series can achieve." Chan reports the failures: the crack spread, the corn momentum, and momentum's years after a crisis. Of mean reversion: "I have never backtested any mean-reverting strategy whose APR or Sharpe ratio is increased by imposing a stop loss".

Use in this repo

The repo already enforces what the book advises. Each item is advice in the book and a check in the repo:

His three nulls for a backtest are weaker than StepM, because none allows for the search.

The tests for mean reversion are trials too. The harness doesn't run ADF, Hurst or the half-life, and no strategy needs them yet. A strategy that tests many pairs and keeps the cointegrated ones has made a search. Each pair tested must go in the ledger, as Aronson warns (evidence-based-technical-analysis.md). The hedge ratio must be estimated only from data before each date, by a rolling window or Chan's Kalman filter. Hassler's review adds that a half-life from a year of data is rough (stochastic-processes-calculus.md).

The roll return needs the curve. Chan's estimate regresses the nearest contracts' prices on their time to maturity each day. So it needs:

The registry's units.Contract has the expiry months and the roll "in words". #464 would state how the continuous series is built. The roll return needs the contracts behind it too, and this review adds that to #464. The roll yield is also in goldman-roll.md and carry.md.

Kelly and stops agree with the repo's reviews. Half-Kelly as an upper bound matches kelly-criterion.md and kelly-parameter-uncertainty.md. An overestimated mean "will eventually lead to ruin". Chan's simulated drawdown at full Kelly is almost total, and a seventh of Kelly is needed to hold it near half. That supports the ruin share of #445 and the leverage report (stress.leverage). His evidence on stops is his own experience, with no numbers. A strategy with a stop states it, and the backtest charges it like any rule.

Momentum decays and crashes, by the book's account. "The duration over which momentum remains in force" shortens as traders learn it. Earnings momentum once lasted days, and now lasts until the close. Momentum strategies "tend to perform miserably for several years after a financial crisis". Each is a reason that a backtest before 2008 needs the stress windows of #448.