Quant interview toolkit · point processes

One stream of orders becomes two independent streams

A feed receives about 120 orders a minute. Roughly 5% are a particular aggressive type. A desk wants to know the chance of seeing none of that type in the next ten seconds. Multiplying 120 by 5% gives an average rate, but a stronger fact makes the probability immediate: independently marking a Poisson stream creates another Poisson stream.

Specify the arrival and marking model

Suppose arrivals form a homogeneous Poisson process with rate λ\lambda per unit time. In an interval of length tt, the total count NtN_t is Poisson with mean λt\lambda t. Mark each arrival A with probability pp and B with probability 1−p1-p, independently across arrivals and independently of arrival times. Let AtA_t and BtB_t be the resulting counts.

Conditional on Nt=nN_t=n, At∼Binomial⁡(n,p)A_t\sim\operatorname{Binomial}(n,p) and Bt=n−AtB_t=n-A_t. Conditional on a fixed total, they are negatively related: if more of the nn arrivals are A, fewer can be B. But after the random Poisson total is allowed to vary, the two category counts become independent. That is the surprising part of thinning.

One way to see it is to calculate their joint probability-generating function. Conditional on Nt=nN_t=n, each arrival contributes ss if marked A or uu if marked B, so

E[sAtuBt∣Nt=n]=(ps+(1−p)u)n.E[s^{A_t}u^{B_t}\mid N_t=n] =(ps+(1-p)u)^n.

Average over the Poisson total. Using E[zNt]=exp⁡[λt(z−1)]E[z^{N_t}]=\exp[\lambda t(z-1)] gives

E[sAtuBt]=exp⁡{λt[ps+(1−p)u−1]}=exp⁡[λpt(s−1)] exp⁡[λ(1−p)t(u−1)].E[s^{A_t}u^{B_t}] =\exp\{\lambda t[ps+(1-p)u-1]\} =\exp[\lambda pt(s-1)]\, \exp[\lambda(1-p)t(u-1)].

The last line factors into the generating functions of independent Poisson variables. Thus At∼Poisson⁡(λpt)A_t\sim\operatorname{Poisson}(\lambda pt) and Bt∼Poisson⁡(λ(1−p)t)B_t\sim\operatorname{Poisson}(\lambda(1-p)t), independently. The same argument works for any fixed number of mutually exclusive marks with constant independent probabilities.

Calculate the ten-second gap

At 120 arrivals per minute and p=0.05p=0.05, the A rate is six per minute. Ten seconds is one sixth of a minute, so the expected A count is one. A Poisson count with mean one is zero with probability e−1≈36.8%e^{-1}\approx36.8\%. The event is not particularly rare even though the feed is busy overall.

Quantity in ten secondsMean countChance of zero
All arrivals20e−20e^{-20}
Aggressive A1e−1≈36.8%e^{-1}\approx36.8\%
Other B19e−19e^{-19}

The table makes a denominator problem visible. “Twenty messages expected” says little about the event that matters if only one in twenty messages has the required mark. If you need at least one A with probability 95%, solve 1−e−λpt≥0.951-e^{-\lambda pt}\ge0.95: here t≥−log⁡(0.05)/6≈0.499t\ge-\log(0.05)/6\approx0.499 minutes, about 30 seconds.

A waiting-time version

Because the A arrivals themselves form a Poisson process with rate λp\lambda p, the time TAT_A until the next A arrival is exponential with survival function

P(TA>t)=P(At=0)=e−λpt.P(T_A>t)=P(A_t=0)=e^{-\lambda pt}.

Its mean is 1/(λp)1/(\lambda p). At six A arrivals per minute, that is ten seconds. The mean wait is not a guarantee: there is still about a 36.8% chance of waiting longer than one mean. For a fixed Poisson rate, the waiting time is memoryless. If you have already waited ten seconds with no A, the model still predicts an additional mean ten seconds. This can be counterintuitive when a feed looks “overdue.”

What would break the calculation?

The model assumes a constant arrival rate and independent, constant-probability marks. Real order flow can cluster around news, auction times, and price moves. The chance an arrival is aggressive may rise precisely when the total arrival intensity rises. Then the A stream can be overdispersed or state-dependent, and the simple λp\lambda p rate may hide long quiet periods mixed with bursts. A marked Hawkes model is one way to represent excitation; see Hawkes order flow for that richer setting.

The categories must also be mutually exclusive for the two-stream independence result as stated. If an event can carry both labels, the two counts share those events. And if “A” is assigned by a feature observed after the arrival, do not treat its conditional probability as known before the event without checking timestamps. Estimate rates on a relevant time window and compare the observed distribution of counts with a Poisson baseline, not just the mean.

Use count variance as a first diagnostic

For a Poisson count, variance equals the mean. Divide a trading session into comparable non-overlapping intervals and calculate the sample mean and variance of A counts. A variance far above the mean is a clue that a constant-rate Poisson model misses clustering or changing intensity. This ratio, often called the dispersion or Fano factor, is one when the ideal Poisson model holds at the chosen interval length.

There is a simple reason a changing rate creates extra variation. If the interval’s Poisson mean itself is a random variable Λ\Lambda, then the law of total variance gives Var⁡(A)=E[Λ]+Var⁡(Λ)\operatorname{Var}(A)=E[\Lambda]+\operatorname{Var}(\Lambda), while E[A]=E[Λ]E[A]=E[\Lambda]. Rate variation adds a nonnegative term. A large dispersion ratio does not identify its cause by itself: scheduled time-of-day patterns, news bursts and dependent marks can all contribute. First remove known seasonality, then ask whether remaining counts still depart from the baseline.

How long can the marked stream stay quiet?

Assumes a constant Poisson rate and independent marking. Bursts or state-dependent marks change the answer.

Practice

Rare markA Poisson feed has 30 arrivals per minute and each arrival is independently marked special with probability 0.2. What is the chance of no special arrival in the next 20 seconds?
Show answer

The special rate is 30(0.2)=630(0.2)=6 per minute. Twenty seconds is one third of a minute, giving mean count two and zero-count probability e−2≈13.5%e^{-2}\approx13.5\%.

Conditional trapGiven exactly five total arrivals, are the special and ordinary counts independent?
Show answer

No. Their sum is fixed at five, so knowing one count determines the other. The independence statement applies after averaging over the random Poisson total, under independent marking.