Quant interview toolkit · stratified sampling

Which trades deserve the next hundred measurements?

Liquid trades make up 80% of a desk’s flow. The rest trade in thin markets where slippage varies much more from ticket to ticket. You can reconstruct execution costs for one hundred trades. How many of those measurements should go to the thin markets if you want the most precise estimate of mean slippage per trade?

Fix the quantity you want to report

Let WhW_h be stratum hh‘s share of all trades and μh\mu_h its mean slippage in basis points. The target is μ=∑hWhμh\mu=\sum_h W_h\mu_h. Select nhn_h trades uniformly within each stratum, independently across strata. Estimate the target with μ^=∑hWhXˉh\hat\mu=\sum_h W_h\bar X_h. You can change how many observations come from each group while holding these reporting weights fixed.

Suppose the liquid and thin-market sample means come out at 1 and 6 basis points respectively. The estimate is 0.8(1)+0.2(6)=20.8(1)+0.2(6)=2 basis points. If you sampled equal numbers in both groups and pooled them, you would report 3.5. That number describes a desk with a different mix of trades.

How much does another measurement buy?

In a large ledger where the sampling fractions are negligible, the variance is approximately

V=∑hWh2Sh2nh,V=\sum_h \frac{W_h^2 S_h^2}{n_h},

where ShS_h measures the within-group standard deviation. Adding one observation reduces its group’s contribution by Wh2Sh2/[nh(nh+1)]W_h^2S_h^2/[n_h(n_h+1)]. A group gets priority when it is populous, variable or still sparsely sampled. A large mean slippage has no direct role in this expression.

For continuous allocations totaling nn, Cauchy–Schwarz gives

(∑hWhSh)2=(∑hWhShnhnh)2≤Vn.\left(\sum_h W_h S_h\right)^2 =\left(\sum_h \frac{W_h S_h}{\sqrt{n_h}}\sqrt{n_h}\right)^2 \le Vn.

Equality requires nhn_h proportional to WhShW_h S_h. This is Neyman allocation. With sampling without replacement the exact variance subtracts ∑hWh2Sh2/Nh\sum_h W_h^2 S_h^2/N_h from VV when Sh2S_h^2 uses the finite-population divisor Nh−1N_h-1. The subtracted term is constant across feasible allocations. A small group can still run out of tickets. Finite population correction

Work the numbers before rounding

Take standard deviations of 2 basis points in liquid trades and 12 in thin markets, based on earlier measurements. The products WhShW_hS_h are 1.6 and 2.4. Their ratio gives 40 liquid and 60 thin-market trades.

Audit planLiquidThinVariance (bp²)Standard error (bp)
Match trade counts80200.32000.566
Equal counts50500.16640.408
Neyman allocation40600.16000.400

The first move away from proportional sampling buys most of the improvement here. The final adjustment from 50/50 to 40/60 saves only 0.008 basis points of standard error. If the pilot standard deviations are noisy, reporting the neighboring allocations makes that sensitivity visible.

80
20Thin-market tickets
0.0320Liquid contribution (bp²)
0.2880Thin-market contribution (bp²)
0.566Overall standard error (bp)

At 40 liquid tickets, the two variance contributions are still unequal. Try moving one ticket in either direction. The optimum balances the marginal value of an extra observation in each group.

What if thin-market tickets cost more to reconstruct?

Let each observation in group hh cost chc_h and fix the budget ∑hchnh=B\sum_h c_h n_h=B. The marginal variance reduction per unit cost is approximately Wh2Sh2/(chnh2)W_h^2S_h^2/(c_h n_h^2). Equating it across groups gives nh∝WhSh/chn_h\propto W_h S_h/\sqrt{c_h}. If a thin-market ticket takes four times as long, its allocation factor falls from 2.4 to 1.2. The count ratio becomes 1.6:1.2=4:31.6:1.2=4:3. With a budget of 160 liquid-ticket equivalents, 40 liquid and 30 thin tickets use the entire budget. Statistics Canada, Survey Methods and Practices, chapter 8

Practice

ObjectiveWould 40 liquid and 60 thin-market trades also minimize uncertainty about the difference between their mean slippages?
Show answer

For the difference, each sample mean has coefficient of magnitude one. Its variance is approximately SL2/nL+ST2/nTS_L^2/n_L+S_T^2/n_T. At equal observation cost the count ratio becomes 2:122:12, so about 14 liquid and 86 thin tickets minimize variance with a hundred measurements. Specify the quantity of interest before optimizing the design.

BoundaryA pilot finds exactly the same slippage on both of its two liquid trades. Should the liquid stratum receive zero observations?
Show answer

A sample standard deviation of zero from two trades gives little evidence that the entire stratum is constant. Without any new observations its current mean cannot be estimated from this audit alone. Reserve a minimum allocation or use a more stable pilot estimate when designing the study.