Continuous-Time Markov Chains
The memoryless-jump model for systems that change state at random moments rather than on a fixed clock — the machinery behind queueing, order book state, and credit rating migration.
Prerequisites: Markov Chains, The Poisson Process
A discrete-time Markov chain (see Markov Chains) moves from state to state on a fixed clock — once per tick. But an order book doesn't update on a metronome: an order arrives, or a trade prints, or a cancellation happens, at random, unpredictable moments, and the "state" (best bid, best ask, queue depth) only changes when one of those events fires. A continuous-time Markov chain (CTMC) is the natural model for systems like this: the state stays put for a random amount of time, then jumps.
An analogy: a light that flickers at random moments
Think of a light bulb that's either ON or OFF. It doesn't switch at fixed intervals — it switches at random moments, and how long it stays in each state before switching is itself random (though on average, ON periods might last longer than OFF periods, or vice versa). Crucially, the bulb has no memory: knowing it's been ON for the last five minutes tells you nothing extra about when it will next switch off, beyond knowing it's currently ON. That "no memory of how long you've already waited" property is the defining feature of the exponential holding times that drive a CTMC.
The mathematics, one symbol at a time
A CTMC is defined by two things: a discrete set of states, and a rate matrix (also called the generator), where (for ) is the instantaneous rate of jumping from state to state , and the diagonal entries satisfy , so each row sums to zero. In words: tells you how "eager" the process is to move from to per unit time, and the diagonal is just minus the total eagerness to leave at all. The chain works in two steps: while in state , it waits an exponentially distributed time with rate (mean holding time ), then jumps to state with probability . The probability of being in each state at time , given the vector at time 0, evolves as
read as: the state distribution at time is obtained by applying the matrix exponential of — the continuous-time analogue of raising a transition matrix to a power in the discrete case.
Worked example 1: a two-state order book indicator
Model the best-quote side as either BUY-pressure or SELL-pressure. Suppose the rate of switching from BUY to SELL is per second, and from SELL to BUY is per second. The mean time spent in BUY before switching is seconds; the mean time in SELL is seconds. Since the chain leaves SELL faster, it spends proportionally less long-run time there — the long-run fraction of time in BUY works out to , versus in SELL, simply because BUY periods last twice as long on average.
Worked example 2: expected number of jumps in a window
If a system is in a state with total exit rate per minute, the number of jumps out of that state in any given minute (while it stays there) behaves like a Poisson process with rate 3 (see The Poisson Process). The probability of at least one jump in the next 20 seconds ( of a minute) is — over a third of the time, the state survives that 20-second window unchanged.
What this means in practice
CTMCs are the backbone of queueing models (order arrival and service as jumps), credit-rating migration models (a bond hops between rating states at random times), and simplified limit-order-book models where the state is queue depth or spread. The generator matrix is usually estimated directly from timestamped event data — count transitions and divide by total time spent in each state — which is exactly what example 1 does in miniature.
A continuous-time Markov chain holds in each state for a random exponential time (rate given by the generator matrix ), then jumps to a new state with probabilities proportional to the off-diagonal rates — no fixed clock, and no memory of how long it has already waited.
A common mix-up is applying discrete-time Markov chain intuition — "probability of transitioning per step" — directly to a CTMC's rates, which are not probabilities and can exceed 1 (a rate of 4 per second is perfectly valid). Rates only become probabilities after conditioning on "a jump happens now," via , or after integrating over a time window via the exponential distribution. Confusing a rate with a probability leads to nonsensical numbers greater than one.
Related concepts
Practice in interviews
Further reading
- Norris, Markov Chains, ch. 2
- Ross, Introduction to Probability Models, ch. 6