About this question

HMM Regime Detection from Scratch

Hard · statistical_analysis · Quant Researcher interview question · hmm, dynamic_programming, statistics, regime_switching

Hidden Markov Models (HMMs) are powerful statistical tools used in quantitative finance to identify latent market regimes, such as periods of low versus high volatility. By modeling returns as emissions from hidden states, analysts can dynamically adjust risk models and trading strategies based on the most likely current regime. Task Implement the Viterbi Training (also known as Segmental K-Means) algorithm for a 2-state Gaussian Hidden Markov Model to classify a sequence of financial returns.