Can a Hidden Markov Model Find Trading Regimes?
A Hidden Markov Model assumes the market is always in one of a few states you cannot see directly. I fitted one to order-flow data to look for states that lasted long enough to trade. Given one input it called direction correctly 50% of the time, the base rate. Given several inputs, the states it found were separated by how much the price was moving and not by which way it was moving, and the small directional signal in the raw input did not survive. This post covers what the model does, how to run inference without using future data, and what the added complexity cost.