Quoto

Courses / Advanced probability models

Hidden Markov models

9 cards2 min readStatistics

Card 1 of 9
  1. Idea: A state nobody publishes

    A hidden state changes by a Markov rule. You see only observations that depend on it.

    • Hidden: a deep or a thin market
    • Seen: each day's spread
    • Model: start, transition table, emission table
  2. Formula: Filtering

    The chance of each hidden state given everything seen so far, updated every day.

  3. Idea: Predict, then correct

    Each day push the belief through the transitions, then weight it by the new data.

    • Predict: the transition table, before any data
    • Correct: Bayes with the emission table
    • Today's output is tomorrow's input, no history stored
  4. Example: A wide spread prints

    Deep stays deep , thin stays thin . Wide spreads: of deep days, of thin. Belief in deep , today prints wide. New belief?

    1. Predict:
    2. Weight: ,
    3. Correct:
  5. Common mistake: Skipping the predict step

    Bayes on last night's belief gives instead of .

    Instead The state can move overnight. Always predict first, then correct.

  6. Formula: The long-run share

    Share of a state: the other state's exit rate b over the sum of both exit rates.

  7. Quick check: Share of deep days

    Deep leaves with chance a day, thin with . What is the long-run share of deep days?

    Show the answer

    Answer:

    Balance , so .

  8. Idea: Filter, smooth, decode

    Keep the questions apart: only the filter can be traded.

    • Filtering: data up to today
    • Smoothing: also later data, so a backtest on it looks ahead
    • Decoding: the single most likely hidden path
  9. Idea: Say it out loud

    Name the layers, then say "predict, then correct" and write the lines.

    • The Markov rule is a claim about the hidden state
    • Recursion: steps, not paths
    • Tables fitted on calm data understate how fast liquidity vanishes