All titlesAlgo & Quant

Detecting Regime Change in Computational Finance

Jun Chen, Edward P K Tsang · 2021 · 165 pages

This is Jun Chen's PhD research with Edward Tsang, published as a book: a method for spotting regime change using Directional Change sampling instead of fixed time intervals. The trading algorithms it builds on top of that method lose money against the simple benchmark it is supposed to beat.

The one idea

Most market analysis samples price at fixed time intervals: daily bars, hourly bars. The authors argue this misses information, because a market can move sharply between two arbitrary clock ticks and time series analysis will not notice until the next bar closes. Directional Change (DC) samples price differently: it only records a new data point when price has moved by a chosen percentage threshold from the last extreme (a peak or trough). Between those confirmed points, the market is just drifting inside a threshold-sized band. The book calls the confirmed move a DC Event and the drift after it an Overshoot Event.

From that DC-sampled price series, the book builds three indicators: TMV (Total Price Movement, the size of a trend normalized by the threshold), T (how long the trend took), and R (TMV divided by T, a speed-of-move measure). It then feeds those indicators into a Hidden Markov Model to sort market history into two hidden states it labels Regime 1 (calmer) and Regime 2 (volatile), and a Naive Bayes classifier to guess, in real time and without hindsight, which regime the market is currently in.

The final piece asks whether any of this is worth trading on. Two simple algorithms, JC1 and JC2, are built to close positions when the tracker signals a regime change, on the theory that this limits drawdown. They are tested against a plain contrarian control algorithm, CT1, that ignores the regime signal entirely.

What it actually teaches

The book's pipeline runs in five stages, from raw price to a live trading signal.

  1. PICK A THRESHOLD

    Choose a percentage threshold theta. A Directional Change Event fires when price moves that percentage against the current trend from the last extreme point; everything between DC Events is an Overshoot Event. In the Chapter 6 trading tests, the authors used trading thresholds of 0.03, 0.006 and 0.009, and a separate regime-tracking threshold of 0.003.

  2. COMPUTE TMV, T, AND R

    For each completed DC-plus-Overshoot trend, calculate TMV (percent price move, normalized by theta), T (calendar time the trend took), and R = TMV / T (speed of the move). These three numbers, not the raw price, are what everything downstream is built from.

  3. CLASSIFY HISTORY WITH A HIDDEN MARKOV MODEL

    Feed the TMV/T/R sequence into a two-state HMM (fit with the Baum-Welch/EM algorithm via the R package depmixS4) to label each historical period as Regime 1 (low volatility) or Regime 2 (high volatility). This step only works with hindsight; it cannot tell you what regime you are in right now.

  4. TRACK THE LIVE REGIME WITH NAIVE BAYES

    Using the historical Regime 1 / Regime 2 statistics as training data, a Gaussian Naive Bayes classifier scores the current, still-forming TMV and T reading against both regimes. Two decision rules turn that score into a call: B-Simple just picks whichever regime has the higher probability, while B-Strict only calls Regime 2 (abnormal) when its probability clears 0.8, to cut false alarms.

  5. TRADE THE SIGNAL

    Algorithms JC1 and JC2 open a contrarian position (short in an uptrend, long in a downtrend) whenever absolute TMV reaches 2, and close it either at the next DC Confirmation point or the moment the tracker flags a regime change. JC1 also switches to trend-following instead of contrarian trades during an abnormal regime; JC2 simply stops trading until the market returns to normal. Both are compared against CT1, a plain contrarian algorithm that ignores regime tracking and closes only at the next DC Confirmation.

What it looks like Monday morning

A reader building their own regime-detection signal walks away with a concrete, cheap-to-implement alternative to fixed-interval sampling: instead of bucketing price into bars, define a percent threshold and only log data at confirmed swing points, then track TMV and T off that series. That is a reasonable input feature for a volatility or regime filter sitting upstream of a real strategy.

What a reader should not do is take JC1, JC2, or the regime-close rule as something to run live. The book's own numbers show the regime-aware algorithms finishing behind the simple contrarian benchmark in nearly every test the authors ran themselves. The honest takeaway is: the tracking signal reduced drawdown, but the trading logic built on top of it was not good enough to also make more money, and the authors say so directly.

Final wealth after the 2010-2012 test period, trading threshold 0.03 (100% = breakeven)
IndexJC1 (regime-aware)CT1 (control, no regime signal)JC2 (regime-aware)
DJIA113%131%121%
FTSE 100106%128%109%
S&P 50083%134%102%

CT1, the algorithm that ignores the book's regime-tracking signal entirely, beat both regime-aware algorithms on final wealth in every index tested at this threshold.

They are both inferior to the control algorithm CT1 in profitability.Chen and Tsang, Detecting Regime Change in Computational Finance

Where it fails

  • The trading algorithms lose to the naive benchmark. At the largest trading threshold (0.03), CT1 (the control algorithm that ignores regime tracking) finished at 131% final wealth on DJIA versus 113% for JC1 and 121% for JC2; the pattern repeats on FTSE 100 and S&P 500 and across the other two thresholds tested (0.006 and 0.009), with only one exception the authors flag themselves (FTSE 100 at threshold 0.006). The book's central sales pitch, regime tracking improves trading, only holds for drawdown, not for returns.
  • It is a PhD thesis published as a book, not a trading manual. The authors call JC1 and JC2 'very naive trading strategies' and 'primitive' in their own conclusions, built only to prove the tracking signal has some value, not to be traded. Anyone buying this expecting a deployable system will find the actual trading chapter (Chapter 6) is 15 pages of a 165-page book, and its explicit purpose is proof of concept, not production.
  • The out-of-sample test window is three years, ending in 2012. The HMM and Naive Bayes models were trained on 2007-2009 data (which includes the 2008 financial crisis) and tracked forward only through December 2012. There is no test on any period after 2012, no discussion of transaction costs or slippage, and the entire live-tracking evaluation rests on catching two Regime 2 spells: the 2010 European debt scare and the August-December 2011 debt-ceiling crisis.
  • The DC threshold used for trading was not optimized, only tried at three fixed values. The authors themselves list 'multiple thresholds could also be applied' as future research in the closing chapter, meaning the version of the method tested in Chapter 6 is explicitly not the version they would recommend refining before using it. A reader treating 0.03/0.006/0.009 as settled parameters is trusting numbers the authors call preliminary.
  • Money management is deliberately unrealistic. Every algorithm goes all-in on a single index with every trade (buy or short M divided by price, no fractional sizing, no diversification, no risk limits), which the authors state outright is 'not the main research topic in this book.' None of the final wealth or drawdown numbers reflect anything close to how capital would actually be deployed.

Who it is for

Buy it if

You are a quant researcher or grad student who wants a clean, well-explained introduction to Directional Change sampling, or you want a worked example of combining an HMM with a Naive Bayes classifier for market state detection. It is a legitimate academic starting point for building your own regime filter.

Skip it if

You want a trading system, backtest confidence, or anything close to production-ready rules. The book's own trading algorithms lose money relative to a benchmark that ignores the entire method it exists to demonstrate, and the authors say so in their own conclusions.

Buy on Amazon

As an Amazon Associate I earn from qualifying purchases. It costs you nothing extra, and it does not change what gets recommended or what the verdict says.

Back to all titles