Quant Memo
Advanced

Semi-Markov Processes

A generalization of Markov chains that keeps the 'next state depends only on current state' rule but drops the requirement that time spent in each state be exponential — letting holding times follow any distribution, at the cost of losing the memoryless shortcut.

Prerequisites: Markov Chains

You model a market as switching between "quiet" and "volatile" regimes using a continuous-time Markov chain, which assumes time spent in each regime is exponentially distributed — memoryless, meaning a regime that's lasted three hours is no more or less likely to end in the next minute than one that just started. But real volatility regimes don't behave that way: a volatile regime that's run an hour often has real momentum to keep going, while quiet regimes rarely end abruptly in their first ten minutes. The exponential assumption is mathematically convenient but empirically wrong here. A semi-Markov process keeps the useful part of the Markov structure — the next regime depends only on the current one, not the whole history — while letting the time spent in each regime follow any distribution, not just exponential.

An analogy: a relay race with variable-length legs

A relay race has a fixed sequence structure — who runs next depends only on who's currently running, following a known handoff order (that part is "Markov"). But unlike an idealized model where every leg takes an identical, memoryless amount of time, real relay legs vary — a hilly leg takes systematically longer than a flat one, and once a runner is 80% through a long hilly leg, their leg is nearly over, not "equally likely to end at any moment" as memorylessness implies. A semi-Markov process is exactly this: fixed transition logic between states, but each state's holding time is drawn from whatever distribution actually fits, carrying real information about "how much longer" once you know how long you've already been there.

The structure, one piece at a time

A semi-Markov process is defined by two pieces. First, a transition matrix P=(pij)P = (p_{ij}), giving the probability that, upon leaving state ii, the process moves next to state jj — exactly like an ordinary discrete-time Markov chain. Second, a set of holding-time distributions Fij(t)F_{ij}(t), one for each possible transition, specifying how long the process stays in state ii before making that particular jump to jj (in the simplest version, holding time depends only on the current state ii, not the destination). In plain English: at each visit to a state, the process first decides "how long do I stay" (drawn from that state's own, possibly non-exponential distribution) and only afterward decides "where do I go next" (using the same simple transition-probability logic a Markov chain would use). This decouples how long from how memoryless, which an ordinary continuous-time Markov chain cannot do, because it's forced to use the exponential distribution — the only continuous distribution that is both memoryless and consistent with the Markov property holding at every instant, not just at transition times.

Worked example 1: two-regime market with realistic holding times

Suppose "quiet" regimes last, on average, 5 days, but with low variance — most run close to 5 days, tightly peaked (unlike an exponential, which would allow many very short quiet periods). "Volatile" regimes last on average 2 days but with high variance — some end in half a day, others drag on a week. The transition matrix is simple: from quiet, always go to volatile (p=1p=1); from volatile, always go to quiet (p=1p=1) — the holding times, not the transition probabilities, do the interesting modeling work. The long-run fraction of time in each regime is πquiet=5/(5+2)0.714\pi_{\text{quiet}} = 5/(5+2) \approx 0.714 and πvolatile0.286\pi_{\text{volatile}} \approx 0.286 — the same formula an exponential chain would give, since that calculation only needs the means, not the full holding-time shape.

Worked example 2: where the distribution shape actually matters

Where semi-Markov modeling earns its keep is not the long-run fractions (worked example 1) but short-horizon forecasts: given the market has been in a volatile regime for exactly 4 days already, what's the probability it ends in the next day? Under an (incorrect) exponential assumption with the same 2-day mean (λ=0.5\lambda = 0.5/day), memorylessness says the answer is the same regardless of the 4 days already elapsed: 1e0.5×10.3931 - e^{-0.5 \times 1} \approx 0.393. But if the true holding-time distribution is, say, tightly peaked around 2 days (low variance, most volatile regimes end between 1.5 and 2.5 days), then having already survived 4 days is a strong signal the regime is unusually persistent this time, and the correct semi-Markov-based forecast — using the conditional hazard rate of the actual holding-time distribution at t=4t=4 — could put the probability of ending in the next day much higher, since 4 days already exceeds the typical range, making an imminent end far more likely than the memoryless model suggests.

Function explorer
-2260.1
x = 1.00f(x) = 2.718

Drag the rate parameter above — this is the incorrect memoryless assumption an ordinary continuous-time Markov chain would force onto every state's holding time, regardless of whether the real process actually looks like this.

holding time (days) exponential (long tail) semi-Markov: peaked near 2 days
The exponential holding-time distribution is memoryless with a long tail; a realistic, tightly peaked holding-time distribution instead concentrates most mass near the typical duration, so time already elapsed becomes genuinely informative.

What this means in practice

Semi-Markov processes fit wherever regime or state durations show real "typical duration" structure that plain exponential models flatten away: volatility regime models, credit-rating transitions where time-in-rating matters, equipment reliability models where holding times reflect genuine wear. The tradeoff: semi-Markov models lose the elegant matrix-exponential machinery of continuous-time Markov chains and generally require simulation rather than closed-form transition probabilities.

A semi-Markov process keeps a Markov chain's simple "next state depends only on current state" transition logic but replaces the exponential holding-time assumption with any distribution, letting time-already-spent-in-a-state carry real predictive information that a memoryless continuous-time Markov chain structurally cannot capture.

The classic mistake is defaulting to a continuous-time Markov chain (exponential holding times) purely for mathematical convenience, when the real-world process being modeled — regime durations, time-to-failure, time-in-credit-rating — clearly has typical durations that memorylessness would deny. Check the empirical holding-time distribution against an exponential fit before assuming memorylessness; if survival-so-far visibly changes the near-term hazard, a semi-Markov model is the more honest choice even though it costs closed-form tractability.

Related concepts

Practice in interviews

Further reading

  • Ross, Introduction to Probability Models, ch. 9
  • Cinlar, Introduction to Stochastic Processes, ch. 10
ShareTwitterLinkedIn