Saturday 15 August 2026

Quant interview

The diversification floor of an equicorrelated book

medium · Covariance matrices and portfolio variance

Let n≥2 assets each have variance σ2>0, with every distinct pair having correlation exactly ρ. Write Σ for the covariance matrix and 1 for the all-ones vector.

  1. Give the eigenvalues of Σ with their multiplicities, and the exact range of ρ for which Σ is a valid covariance matrix.
  2. Compute the variance of the equally weighted portfolio and its limit as n→∞.
  3. Show that equal weights minimize variance among fully invested portfolios (1⊤w=1), and state the minimum.
Solution

1. Spectrum

Σ=σ2[(1−ρ)I+ρ11⊤]

Since 11⊤ has eigenvalue n on 1 and 0 on the orthogonal complement 1⟂, the eigenvalues of Σ are

σ2(1+(n−1)ρ) once, on 1,σ2(1−ρ) with multiplicity n−1, on 1⟂.

Both must be nonnegative, so

−1n−1≤ρ≤1.

The lower limit is the interesting one: n assets cannot all be strongly negatively correlated with one another. At ρ=−1/(n−1) the vector 1 is in the kernel, meaning the equally weighted portfolio is exactly riskless.

2. The equally weighted portfolio

With w=1/n, the quadratic form picks out the 1 eigenvalue:

Var=1⊤Σ1n2=σ2(1+(n−1)ρ)n=σ2(ρ+1−ρn)

limn→∞Var=σ2ρ

Only the idiosyncratic part σ2(1−ρ) diversifies away, at rate 1/n. The common part σ2ρ does not shrink no matter how many names you add.

3. Equal weights are optimal

For fully invested portfolios the minimizer of w⊤Σw subject to 1⊤w=1 is

w⋆=Σ−111⊤Σ−11,

from the Lagrangian w⊤Σw−2λ(1⊤w−1), whose stationarity condition is Σw=λ1. Here 1 is an eigenvector of Σ, so

Σ−11=1σ2(1+(n−1)ρ)⟹w⋆=1n,

provided 1+(n−1)ρ>0 so that Σ is invertible and positive definite, which also makes the stationary point a genuine minimum. The minimum variance is therefore the quantity computed in part 2:

min1⊤w=1w⊤Σw=σ2(1+(n−1)ρ)n.

Note. The practical reading is that the floor on portfolio risk is set by correlation, not by breadth: with ρ=0.3 and σ=20%, no number of equally risky names gets annualized volatility below 20%0.3≈11%. The tempting error is to treat 1/n as the governing rate; it governs only the (1−ρ) slice.

Statistics in machine learning

Why EM never goes downhill, and why that is not convergence

medium · EM, the ELBO, and what monotonicity does not buy

Let x be observed, z latent, and pθ(x,z) a joint model. For a distribution q over z define

ℱ(q,θ)=𝔼q[logpθ(x,z)]−𝔼q[logq(z)].

  1. Prove that logpθ(x)=ℱ(q,θ)+KL(q‖pθ(z∣x)), and deduce that ℱ is a lower bound on the log-likelihood which is tight exactly when q=pθ(·∣x).
  2. The EM iteration is: E-step q(t)=pθ(t)(·∣x), then M-step θ(t+1)=\argmaxθℱ(q(t),θ). Prove that logpθ(t+1)(x)≥logpθ(t)(x).
  3. Does that monotonicity imply convergence to a global maximum of the likelihood? State exactly what it does give.
Solution

1. The decomposition

logpθ(x) does not depend on z, so it equals its own expectation under any q. Insert the definition of conditional probability and split the logarithm:

logpθ(x)=𝔼q[logpθ(x,z)pθ(z∣x)]=𝔼q[logpθ(x,z)q(z)]+𝔼q[logq(z)pθ(z∣x)]

The first term is ℱ(q,θ) and the second is KL(q‖pθ(·∣x)), which proves the identity. Since a Kullback-Leibler divergence is nonnegative and vanishes only when its arguments agree almost everywhere, ℱ(q,θ)≤logpθ(x) with equality exactly at q=pθ(·∣x). Note the identity is exact for every q: the bound's slack is not merely bounded by the KL term, it is the KL term.

2. Monotonicity in three steps

logpθ(t+1)(x) ≥ ℱ(q(t),θ(t+1)) ≥ ℱ(q(t),θ(t)) = logpθ(t)(x)

The first inequality is part 1 applied at θ(t+1). The second is the M-step, which maximizes over θ and so cannot do worse than the incumbent. The final step is an equality, and it is the one that carries the argument: the E-step chose q(t) to be the posterior at θ(t), so the bound is tight there.

Without that tightness you would only be comparing a bound to a bound, which proves nothing about the likelihood itself. This is the step a rushed proof skips.

3. What monotonicity actually gives

It does not give a global maximum. What follows is only that the sequence logpθ(t)(x) is nondecreasing, hence convergent whenever the likelihood is bounded above.

Three gaps separate that from what one wants. The likelihood value can converge while the parameters do not; the limit point, if the parameters do converge, is in general only a stationary point, so a local maximum or even a saddle is possible; and establishing convergence of θ(t) at all requires regularity conditions on the model rather than following from the iteration (this is the content of Wu's 1983 analysis, which corrected the original claim in Dempster, Laird and Rubin).

For a Gaussian mixture the likelihood is not concave, is invariant under relabeling the components — so every maximum comes with k! copies — and is unbounded above as a component variance goes to zero with its mean pinned to a data point. Monotone ascent in that landscape guarantees you stop going down, nothing more, which is why EM is run from several random starts and the best run kept.


Two new problems every morning at 8am · every day so far