Beyond the recipe
The foundation lesson on likelihood covered the recipe: write , solve , get a standard error from . This lesson explains why that recipe works, what to do with several parameters and functions of them, how the three classical tests differ, and what survives when the model is wrong. That last point is the one interviewers push on: real returns are never exactly normal, so "the MLE standard error" is only right if you know which one to use.
The score and the information matrix
For a parameter vector and i.i.d. data, the score is the gradient of the log-likelihood,
Two facts hold at the true when the model is correct (and the support does not depend on , so differentiation and integration can be swapped):
- The score has mean zero: .
- The information equality: the variance of the score equals minus the expected Hessian,
is the Fisher information matrix per observation. For the normal model with ,
The off-diagonal zero says and are orthogonal: not knowing one costs nothing when estimating the other. When the off-diagonal is non-zero, the standard error of one parameter is the square root of the corresponding diagonal entry of , which is larger than : uncertainty about the nuisance parameters leaks in.
Why the MLE is asymptotically normal
Expand the score equation around :
The score is a sum of i.i.d. mean-zero terms, so by the CLT with . By the law of large numbers . Therefore
Under a correct model the information equality gives , and the variance collapses to the familiar . Keep the general form in mind: it is the sandwich formula below.
The delta method
Parameters of interest are often functions of the fitted ones: a Sharpe ratio, a half-life, a volatility from a variance. If and is smooth, a first-order Taylor expansion gives
In one dimension, . It fails when at the truth (use a second-order expansion) and is poor when is very curved over the width of the sampling distribution.
Worked example
the standard error of a Sharpe ratio
A strategy has 60 monthly returns with sample mean 1% and sample standard deviation 4%. Treating returns as i.i.d. normal, find the standard error of the monthly Sharpe ratio and a 95% interval for the annualised Sharpe ratio.
Show solutionHide solution
The MLEs and are asymptotically independent (the information matrix is diagonal) with and . The delta method with gives .
Now has gradient , so
With and : . The term barely matters at realistic Sharpe ratios, so is the mental shortcut.
Annualising multiplies both by (assuming no autocorrelation): with , so the 95% interval is . Five years of a Sharpe-0.87 track record does not exclude zero. A simulation of 200,000 such samples gives a standard deviation of for the monthly estimate, close to the asymptotic ; fat tails or autocorrelation would widen it further.
Three tests from one likelihood
To test (or restrictions in general), let be the unrestricted MLE and the restricted one. With total information :
| Test | Statistic | Fits needed | Geometry |
|---|---|---|---|
| Likelihood ratio | both | vertical drop in | |
| Wald | unrestricted only | horizontal distance, scaled by curvature at | |
| Score (Lagrange multiplier) | restricted only | slope of at the null |
All three are asymptotically under and agree to first order, because all three approximate by a quadratic. In finite samples they differ, and the differences have practical consequences:
- Wald is not invariant to reparametrisation. Testing and testing give different Wald statistics, while the LR statistic is identical. Wald is also the worst behaved near a boundary.
- The score test only needs the null model. That is why many specification tests (Breusch–Pagan for heteroskedasticity, the LM test for ARCH effects, tests for omitted variables) are score tests: fit the simple model once and check whether the log-likelihood would slope upward if you relaxed it.
- LR is usually the most reliable in small samples and gives intervals (the set of not rejected) that respect the shape of the likelihood. With nuisance parameters, maximise them out to get the profile likelihood and apply the same cut-off.
Worked example
one null, three statistics
Over 50 days you see 130 order-book events of a given type, modelled as Poisson with daily rate . Test with the Wald, score and LR tests, and compare Wald intervals on the and scales.
Show solutionHide solution
and .
Wald: , p-value .
Score: and , so the statistic is , p-value .
LR:
p-value . All three reject at 5% (cut-off ), but they range from to . Wald uses the curvature at , where the Poisson variance is larger and the likelihood flatter, so it is the smallest here.
Reparametrise: with , , so Wald becomes . Same data, same hypothesis, a different answer. The 95% Wald interval is on the scale and on the log scale. The log-scale version is asymmetric, never goes negative and is closer to the LR interval, which is why rates, variances and odds are usually handled on the log scale.
When the model is wrong: the sandwich
If the data come from some that is not in the model family, the MLE still converges, to the pseudo-true value that minimises the Kullback–Leibler divergence from to . This is quasi-maximum likelihood (QMLE). Sometimes is exactly what you want: a normal QMLE still estimates the mean and variance consistently whatever the true distribution. But the information equality fails (), so is the wrong variance. The asymptotic argument above still gives the sandwich
where is observation 's score at . White (heteroskedasticity-robust) standard errors in OLS are exactly this; Newey–West adds autocovariances of the scores to for time series.
The variance of a variance. Fit a normal to returns with kurtosis . The per-observation score for is , so while . The sandwich is
The normal answer is the special case . For daily equity returns with kurtosis around 6, the true standard error of a variance estimate is times the textbook one. The same thing happens with overdispersed counts: a Poisson QMLE of the mean is fine, but its sandwich variance is the sample variance over , not .
Numerical MLE
Most likelihoods (GARCH, Student-t, mixtures, logistic regression) have no closed-form maximiser. The standard tool is Newton–Raphson, , or Fisher scoring, which replaces by and is more stable far from the optimum. Practical rules:
- Reparametrise constraints away: optimise , the logit of a probability, or of GARCH coefficients, so the optimiser cannot step outside the parameter space.
- Start well: use method-of-moments or robust estimates as starting values, and try several starts. Newton converges fast near a maximum and can diverge far from it, where the log-likelihood is convex.
- Get standard errors from the Hessian at the optimum (observed information), and the sandwich if you doubt the model. A Hessian that is nearly singular means some parameter is barely identified.
- Check the boundary and the gradient: a converged optimiser reports a point, not a guarantee. Confirm the gradient is near zero and the Hessian negative definite.
The Cauchy location model shows all of this in ten lines. Its likelihood can be multimodal and its mean does not exist, so the sample mean is useless and the MLE needs iteration.
import math
x = [-1.2, 0.3, 0.8, 1.1, 1.9, 2.4, 9.7, -0.4, 1.5, 0.6]
def score(m): # d/dm of sum log f, f = 1 / (pi (1 + (x - m)^2))
return sum(2 * (v - m) / (1 + (v - m) ** 2) for v in x)
def hessian(m):
return sum(2 * ((v - m) ** 2 - 1) / (1 + (v - m) ** 2) ** 2 for v in x)
m = sorted(x)[len(x) // 2] # start at a robust guess (upper median)
for it in range(20):
step = score(m) / hessian(m)
m -= step
if abs(step) < 1e-10:
break
obs_info = -hessian(m)
print(f"MLE {m:.4f} after {it + 1} steps")
print(f"SE observed {1 / math.sqrt(obs_info):.3f}, expected {math.sqrt(2 / len(x)):.3f}")
print(f"mean {sum(x) / len(x):.2f}")
# MLE 0.9068 after 4 steps
# SE observed 0.410, expected 0.447
# mean 1.67
The outlier at 9.7 drags the mean to 1.67 but barely moves the MLE (0.91). The Fisher information of the Cauchy location is per observation, so the expected-information SE is ; the observed-information SE () reflects this particular sample. Started at 5 or at 9.7 instead, the same Newton loop runs off to infinity, because the log-likelihood is convex out there: a concrete reason to start from a robust estimate.
Knowledge check
You estimate the variance of 200 i.i.d. normal returns by maximum likelihood. Using the delta method, what is the approximate standard error of ?
Knowledge check
Returns have kurtosis (excess kurtosis 6), but you fit a normal by maximum likelihood. By what factor does the model-based standard error of understate the sandwich standard error?
Knowledge check
You want to test whether a fitted constant-variance model would improve by adding a GARCH term, but fitting the GARCH model is slow and unstable. Which classical test needs only the constant-variance fit?
Key takeaways
- The score has mean zero and variance at the truth; the information equality is what makes the asymptotic variance.
- In general ; under misspecification use this sandwich (White, Newey–West), not .
- The delta method: . A Sharpe ratio estimate has SE .
- LR, Wald and score tests are asymptotically equivalent; Wald depends on parametrisation, the score test needs only the null fit, LR is usually the most reliable.
- Fit numerically on an unconstrained scale, from a robust start, and read standard errors off the Hessian at the optimum.
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).