Hidden Markov Models

A Markov chain assumes you can see the state. Often you cannot: you see something the state produces.

Markets are the standard example. There is arguably a "regime" (calm, stressed, trending) that is never announced. What you observe is returns and volumes, which the regime generates.

The pieces

Hidden states {S1,,Sn}\{S_1,\ldots,S_n\}, unobserved.

Transition matrix Aij=P(St+1=jSt=i)A_{ij} = P(S_{t+1}=j \mid S_t=i), how the regime evolves.

Emission matrix Bik=P(Ot=kSt=i)B_{ik} = P(O_t = k \mid S_t = i), what each state tends to produce.

Initial distribution π\pi.

A two-state market model might have a calm state emitting small returns and a volatile state emitting large ones, with the transition matrix encoding that regimes persist.

The three questions

Filtering: where am I now? Given observations so far, what is the probability distribution over current states? Solved by the forward algorithm, and it is the question a live trading system asks.

The rest of this lesson is for subscribers

Unlock every lesson in Advanced Topics in Probability and Statistics, and every other premium course.

Subscribe to continue

Test your knowledge

Questions are only available to subscribers.

Keep reading Advanced Topics in Probability and Statistics

35 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them