Quant Research Guide
Statistics & Probability (Core)
The language of quant research. Every claim about a signal — 'this factor predicts returns' — is a statistical statement. You must be able to derive estimators from scratch, run hypothesis tests correctly, and understand why the quant industry requires a t-stat ≥ 3 rather than the standard 1.96.
Core Theory
- 1Maximum Likelihood Estimation (MLE): find θ that maximizes the likelihood L(θ) = ∏ f(xᵢ; θ). In practice, maximize log-likelihood ℓ(θ) = Σ log f(xᵢ; θ) and solve ∂ℓ/∂θ = 0. For Gaussian: μ̂ = X̄, σ̂² = (1/n)Σ(xᵢ - X̄)² (biased but MLE-consistent).
- 2Cramer-Rao Lower Bound: no unbiased estimator can have variance less than 1/I(θ), where I(θ) = -E[∂²ℓ/∂θ²] is the Fisher information. MLE achieves this bound asymptotically — it is the best possible consistent estimator for large n.
- 3Central Limit Theorem: if X₁,...,Xₙ are iid with mean μ and variance σ², then √n(X̄ - μ) → N(0, σ²) in distribution. This is why signal t-statistics are approximately normal even when individual returns are non-normal.
- 4Hypothesis testing framework: (1) state H₀ and H₁, (2) choose test statistic and its null distribution, (3) compute p-value = P(|T| ≥ |t_obs| | H₀), (4) reject if p < α. A p-value is NOT the probability H₀ is true — it is the probability of seeing data this extreme if H₀ were true.
- 5Type I error (α): reject H₀ when true — false positive. Type II error (β): fail to reject when false — false negative. Power = 1 - β. Lower α forces higher β for fixed sample size; only larger n can improve both simultaneously.
- 6Multiple testing problem: testing n independent hypotheses at α = 0.05 each produces n×0.05 expected false discoveries. Testing 200 signals → ~10 spurious discoveries. The quant standard t ≥ 3 (α ≈ 0.003) limits false positives to ~0.6 per 200 tests.
- 7Benjamini-Hochberg (BH) FDR procedure: sort p-values p(1) ≤ … ≤ p(m). Reject all hypotheses 1…k where k = max{i : p(i) ≤ i/m × q*}. Controls the expected false discovery rate at level q*. Less conservative than Bonferroni, better power.
- 8Bayesian updating: posterior ∝ likelihood × prior. Conjugate pairs give closed forms: Beta-Binomial (p updates on coin flips), Normal-Normal (μ updates on Gaussian data). Posterior credible intervals carry the natural probability interpretation that frequentist CIs do not.
Key Formulas
| 1 | import numpy as np |
| 2 | from scipy import stats |
| 3 | |
| 4 | np.random.seed(42) |
| 5 | |
| 6 | # --- Simulate 200 signal tests: only 10 are truly predictive --- |
| 7 | n_tests = 200 |
| 8 | n_true = 10 # truly predictive signals |
| 9 | n_obs = 60 # monthly observations per signal (5 years) |
| 10 | true_ic = 0.08 # true IC for real signals |
| 11 | |
| 12 | p_values = np.zeros(n_tests) |
| 13 | |
| 14 | # Null signals: pure noise |
| 15 | for i in range(n_tests - n_true): |
| 16 | x = np.random.randn(n_obs) |
| 17 | y = np.random.randn(n_obs) |
| 18 | _, p_values[i] = stats.spearmanr(x, y) |
| 19 | |
| 20 | # Non-null signals: true IC = 0.08 |
| 21 | for i in range(n_true): |
| 22 | x = np.random.randn(n_obs) |
| 23 | y = true_ic * x + np.sqrt(1 - true_ic**2) * np.random.randn(n_obs) |
| 24 | _, p_values[n_tests - n_true + i] = stats.spearmanr(x, y) |
| 25 | |
| 26 | alpha = 0.05 |
| 27 | naive = (p_values < alpha).sum() |
| 28 | exp_fp = (n_tests - n_true) * alpha |
| 29 | print(f"Naive p<0.05 : {naive:3d} rejections | ~{exp_fp:.0f} expected false positives") |
| 30 | |
| 31 | bonf = (p_values < alpha / n_tests).sum() |
| 32 | print(f"Bonferroni : {bonf:3d} rejections | threshold = {alpha/n_tests:.5f}") |
| 33 | |
| 34 | def bh_correct(p_vals, q=0.10): |
| 35 | m = len(p_vals) |
| 36 | order = np.argsort(p_vals) |
| 37 | sorted_p = p_vals[order] |
| 38 | bh_thresh = (np.arange(1, m+1) / m) * q |
| 39 | below = sorted_p <= bh_thresh |
| 40 | if not below.any(): |
| 41 | return np.zeros(m, dtype=bool) |
| 42 | k = np.where(below)[0].max() |
| 43 | mask = np.zeros(m, dtype=bool) |
| 44 | mask[order[:k+1]] = True |
| 45 | return mask |
| 46 | |
| 47 | bh = bh_correct(p_values, q=0.10) |
| 48 | print(f"BH FDR q=10% : {bh.sum():3d} rejections") |
| 49 | |
| 50 | quant_thresh = 0.0027 |
| 51 | quant = (p_values < quant_thresh).sum() |
| 52 | exp_fp2 = (n_tests - n_true) * quant_thresh |
| 53 | print(f"t>=3 p<0.0027 : {quant:3d} rejections | ~{exp_fp2:.2f} expected false positives") |
Shows why the quant industry uses t ≥ 3 instead of the academic t ≥ 2. With 200 tests at p < 0.05, you expect ~9.5 false positives — potentially outnumbering real signals. The BH correction and the stricter t ≥ 3 threshold dramatically reduce false discoveries while retaining power on the 10 real signals.
Worked Interview Problems
3 problemsProblem
You observe n iid waiting times X₁,…,Xₙ ~ Exponential(λ). Derive the MLE for λ.
Solution
Write the likelihood: L(λ) = ∏ λ·exp(-λxᵢ) = λⁿ · exp(-λ Σxᵢ).
Log-likelihood: ℓ(λ) = n·ln(λ) - λ·Σxᵢ.
First-order condition: dℓ/dλ = n/λ - Σxᵢ = 0.
Solve: λ̂ = n / Σxᵢ = 1/X̄. Verify: d²ℓ/dλ² = -n/λ² < 0. ✓ Maximum confirmed.
Interpretation: if average waiting time is 3 minutes, λ̂ = 1/3 arrivals per minute.
Answer
. The MLE for the rate parameter is the reciprocal of the sample mean.
Common Mistakes
Misinterpreting the p-value: p = 0.03 does NOT mean 3% probability the null is true. It means: given H₀ is true, 3% chance of observing data this extreme.
Using t ≥ 2 as the significance bar for quant signals. With 100 signals tested, this produces ~5 false positives by chance alone. The correct quant standard is t ≥ 3 (Harvey, Liu & Zhu 2016).
Treating correlated tests as independent when applying corrections. If 20 signals are all momentum variants, effective independent tests may be 5-8. BH is more appropriate than Bonferroni in this case.
Confusing the 95% CI with a probability statement. A CI does NOT mean 95% probability the parameter is inside it — only Bayesian credible intervals carry the direct probability interpretation.
Using biased MLE variance (÷n) in t-tests. For hypothesis testing use the unbiased sample variance (÷(n-1)), especially important for small samples (n < 30).
Ignoring autocorrelation in the IC time series. Monthly ICs from slow-moving signals are correlated, understating the standard error. Use Newey-West HAC standard errors.