Maximum Likelihood & GMM

Maximum likelihood picks the parameters under which the observed data were most probable, and is the most precise method available when the model of the data is complete and correct. The generalized method of moments asks only that certain averages implied by theory be zero, and tests whether they are. Finance uses both, and the choice between them is a choice between efficiency and robustness.

Abstract

Maximum likelihood, set out by Fisher (1922), chooses the parameters under which the data were most probable and is the most precise method when the model of the data is complete and correct. When a GARCH model is fitted with a normal likelihood to fat-tailed returns, Bollerslev and Wooldridge (1992) showed that the estimates remain consistent if the conditional mean and variance are right, but standard errors and likelihood-ratio tests must be corrected. Hansen’s (1982) generalized method of moments needs only the averages that theory says are zero, such as the pricing errors of the consumption Euler equation, and tests the leftover restrictions with the J statistic. Its robustness costs efficiency, and in samples of realistic length its tests and estimates can be unreliable, most of all when parameters are weakly identified.

In July 1982 Econometrica published Lars Peter Hansen’s “Large Sample Properties of Generalized Method of Moments Estimators.” Its opening sentence announced a study of “estimators that make sample analogues of population orthogonality conditions close to zero.” In the next issue Hansen and Kenneth Singleton applied the method to the condition that a consumer choosing how much to save must satisfy, and stated what made it attractive: the parameters of agents’ objectives could be estimated “without explicitly solving for the stochastic equilibrium.”

Maximum likelihood, the method R. A. Fisher had set out sixty years earlier, requires a complete probability model of the data. Hansen and Singleton used only the restrictions the theory imposed, a set of averages that should be zero if it were right, and a statistic that said whether they were. In 2013 Hansen shared the Nobel Memorial Prize in Economic Sciences with Eugene Fama and Robert Shiller, “for their empirical analysis of asset prices.”

An economic model is a family of probability statements indexed by parameters: a risk aversion, a discount factor, the persistence of volatility. Estimation chooses the member of the family that best agrees with the data, and every estimator is a definition of “best agrees.” The two definitions that dominate empirical finance differ in how much of the model they ask the data to confirm.

Two ways to choose parameters

Fisher’s “On the Mathematical Foundations of Theoretical Statistics,” published in the Philosophical Transactions of the Royal Society in 1922, began from the premise that “the object of statistical methods is the reduction of data,” the replacement of a large body of observations by a few quantities that keep as much of their relevant information as possible. He divided the work into problems of specification, the choice of the form of the population; of estimation; and of distribution, the sampling behavior of what is estimated. He proposed criteria for judging an estimator. It should be consistent, recovering the parameter when calculated from the whole population. It should be efficient, meaning that in large samples it tends to a normal distribution “with the least possible standard deviation.” And it might be sufficient, leaving no information about the parameter in the sample that it fails to use. The method of maximum likelihood, he argued, met them.

His foil was Karl Pearson’s method of moments, which Pearson had used in 1894 to fit a mixture of two normal curves to biological measurements. The method sets as many sample moments equal to their theoretical counterparts as there are parameters and solves. Fisher showed that it could waste information badly. For a curve of the Cauchy form the sample mean is useless as an estimate of location, and he concluded that the method was efficient only for curves close to the normal. The criticism matters for financial data, whose distributions are fat-tailed. It was also the right criticism of the wrong target. Sixty years later the method of moments returned in generalized form because, unlike maximum likelihood, it does not need the shape of the distribution at all.

Maximum likelihood

For a sample of returns \(r_1, \dots, r_T\), a model specifies the density of each observation given the past. The log-likelihood is the sum of the logarithms of those densities evaluated at the data, and the maximum-likelihood estimator \(\hat\theta\) is the parameter value that makes it largest.

\[\ell(\theta) = \sum_{t=1}^{T} \ln f(r_t \mid r_{t-1}, r_{t-2}, \dots;\, \theta), \qquad \sqrt{T}\,\big(\hat\theta - \theta_0\big) \;\xrightarrow{d}\; N\!\big(0,\; \mathcal{I}(\theta_0)^{-1}\big)\]

\(f\)
the model’s conditional density of a return
\(\theta_0\)
the true parameter values
\(s_t\)
the score: the derivative of \(\ln f\) with respect to \(\theta\) for observation \(t\)
\(\mathcal{I}(\theta_0)\)
the Fisher information per observation, \(\mathbb{E}[s_t s_t^{\top}]\), which equals minus the expected second derivative of \(\ln f\) when the model is correct

The information measures the curvature of the log-likelihood at its peak. A sharply curved likelihood says that small changes in the parameter make the data much less probable, so the data pin the parameter down; a flat one says they do not. Its inverse is the smallest variance any well-behaved estimator can attain, and maximum likelihood attains it in large samples, which is the precise sense of Fisher’s efficiency. The central limit theorem supplies the normality.

The simplest financial case shows how unevenly information is spread across a model’s parameters. Suppose daily returns are independent and normal with mean \(\mu\) and standard deviation \(\sigma\). The maximum-likelihood estimates are the sample mean and the sample standard deviation with divisor \(T\), and the information matrix gives their standard errors as \(\sigma/\sqrt{T}\) and \(\sigma/\sqrt{2T}\). Take ten years of trading days and a daily standard deviation of 1.2%.

  1. Annualized volatility \[1.2\% \times \sqrt{252} = 19.05\%\]
  2. Standard error of the volatility estimate \[\frac{19.05\%}{\sqrt{2 \times 2{,}520}} = 0.27 \text{ points}\]
  3. Standard error of the annual mean \[\frac{1.2\%}{\sqrt{2{,}520}} \times 252 = \frac{19.05\%}{\sqrt{10}} = 6.0 \text{ points}\]

The same 2,520 observations measure volatility to about a quarter of a point and the expected return to about six points. The mean is a level, and only the passage of calendar time reveals it, while the variance is revealed by every day’s squared return. The same asymmetry is why beta is estimated quickly and alpha slowly, and why models of risk can be fitted with far more confidence than models of expected return.

When the density is wrong

The GARCH model is almost always estimated by maximizing a normal log-likelihood, the sum in which each day’s squared surprise is weighed against that day’s forecast variance. Daily returns are not conditionally normal: the standardized residuals of fitted models are fat-tailed. The estimates are then the maximizers of a likelihood that is known to be false, and the question is what, if anything, they estimate.

Tim Bollerslev and Jeffrey Wooldridge (1992) gave the answer for the class of models that specify a conditional mean and a conditional variance together. “Because the score of the normal log-likelihood has the martingale difference property when the first two conditional moments are correctly specified,” they wrote, “the QMLE is generally consistent and has a limiting normal distribution.” The normal likelihood is then a quasi-likelihood. It is not the density of the data, but its first-order conditions are moment conditions that hold at the true parameters, and that is enough for consistency. What fails is the identity between the two forms of the information matrix, the outer product of the scores and the curvature, on which the usual standard errors rest. The valid covariance matrix combines the two, and is called the sandwich for its shape:

\[\operatorname{Var}\big(\hat\theta\big) \approx \frac{1}{T}\,A^{-1} B\, A^{-1}, \qquad A = -\mathbb{E}\!\left[\frac{\partial^2 \ln f_t}{\partial\theta\,\partial\theta^{\top}}\right], \qquad B = \mathbb{E}\big[s_t s_t^{\top}\big]\]

\(A\)
the expected curvature of the quasi-log-likelihood per observation
\(B\)
the variance of the score per observation

When the model is fully correct, \(A = B\) and the sandwich collapses to the inverse information. For the variance parameters of a GARCH model whose standardized shocks \(z_t\) are independent with kurtosis \(\kappa\), a short calculation gives \(B = \tfrac{\kappa - 1}{2}A\), so the correct variance is \((\kappa-1)/2\) times the one the normal likelihood reports. At the normal value \(\kappa = 3\) the factor is one. Residual kurtosis of 6 makes it 2.5, and the reported standard errors are too small by a factor of about 1.6. Bollerslev and Wooldridge provided formulas for standard errors valid under non-normality and robust Lagrange multiplier tests computable from auxiliary regressions, both requiring only first derivatives of the mean and variance functions, and found in their Monte Carlo study that the asymptotic results carried over to finite samples.

Figure: Fitting GARCH by quasi-maximum likelihood. One simulated sample of daily returns from a GARCH(1,1) model with persistence 0.98. The left panel maps the normal log-likelihood over \(\alpha\) and \(\beta\); the shaded region is the 95% likelihood-ratio confidence region. The right panel shows the likelihood-ratio statistic for each value of persistence, as computed and rescaled for the kurtosis of the residuals. Switch the shocks to Student t and compare the two curves.

With normal shocks the two curves in the right panel coincide, because the likelihood is the true one. With Student-t shocks the estimates remain near the truth, which is consistency at work, but the unscaled curve is too steep and the interval read from it too narrow. The likelihood is still the right objective to maximize. It is the wrong measure of what the maximum reveals.

The likelihood ratio test

A hypothesis about the parameters restricts the model, and the restricted model can be fitted too. If the restriction is true, imposing it should cost little likelihood. Samuel Wilks (1938) showed that twice the log of the ratio of the two maximized likelihoods has, in large samples, a chi-squared distribution with as many degrees of freedom as there are restrictions.

\[LR = 2\left[\ell\big(\hat\theta\big) - \ell\big(\tilde\theta\big)\right] \;\xrightarrow{d}\; \chi^2_{r}\]

\(\hat\theta\)
the unrestricted maximum-likelihood estimate
\(\tilde\theta\)
the estimate with the \(r\) restrictions imposed

The GJR-GARCH model adds a coefficient \(\gamma\) that raises variance after negative surprises, and the test of \(\gamma = 0\) asks whether the asymmetry of equity volatility is present in a sample. With illustrative values of the two maximized log-likelihoods, and a residual kurtosis of 6:

  1. Unrestricted and restricted log-likelihoods \[\ell(\hat\theta) = 15{,}412.6, \qquad \ell(\tilde\theta) = 15{,}401.3\]
  2. Likelihood ratio, one restriction \[LR = 2\,(15{,}412.6 - 15{,}401.3) = 22.6 \;>\; 3.84, \quad p \approx 0.000002\]
  3. Rescaled for kurtosis 6 \[\frac{22.6}{(6-1)/2} = 9.04, \quad p = 0.003\]

Here the restriction is rejected either way, but the evidence is weaker by three orders of magnitude in its p-value once the quasi-likelihood is accounted for, and a statistic near the critical value would change verdict. Two conditions of Wilks’s theorem are easy to violate in finance. The likelihood must be the true one, failing which the statistic is a scaled chi-squared at best, and the restricted value must lie in the interior of the parameter space. A test of \(\alpha = 0\) in a GARCH model, which asks whether volatility clusters at all, puts the null on the boundary, because \(\alpha\) cannot be negative, and the usual chi-squared critical values do not apply. The likelihood ratio, Wald and Lagrange multiplier tests are asymptotically equivalent under correct specification; under quasi-likelihood the robust forms are the ones to compute, as the lesson on hypothesis testing argues more generally of tests whose assumptions fail quietly.

Moments in place of a density

Many financial models do not deliver a likelihood at all. An asset-pricing model says that prices equal expected discounted payoffs, which restricts certain averages but leaves the joint distribution of consumption, returns and everything else unspecified. Writing down a likelihood would require inventing the missing parts, and errors in them would contaminate the estimates of the parts the theory does determine.

The generalized method of moments starts from the restrictions. Let \(f(x_t, \theta)\) be a vector of \(r\) functions of the data and the parameters whose expectation is zero at the true parameters. With as many moments as parameters, the estimator sets their sample averages to zero, which is Pearson’s method. With more moments than parameters, the system cannot in general be solved exactly, and Hansen’s estimator makes the averages as small as possible in a weighted quadratic distance.

\[g_T(\theta) = \frac{1}{T}\sum_{t=1}^{T} f(x_t, \theta), \qquad \hat\theta = \arg\min_{\theta}\; g_T(\theta)^{\top}\, W\, g_T(\theta)\]

\[W = \hat S^{-1}, \qquad \operatorname{Var}\big(\hat\theta\big) \approx \frac{1}{T}\big(D^{\top} S^{-1} D\big)^{-1}, \qquad J = T\, g_T\big(\hat\theta\big)^{\top} \hat S^{-1} g_T\big(\hat\theta\big) \;\xrightarrow{d}\; \chi^2_{r-q}\]

\(f(x_t,\theta)\)
the \(r\) moment conditions for observation \(t\), with \(\mathbb{E}[f(x_t,\theta_0)] = 0\)
\(W\)
the weighting matrix, which decides how much each moment counts
\(S\)
the long-run covariance matrix of the moment conditions, \(\sum_j \mathbb{E}[f_t f_{t-j}^{\top}]\)
\(D\)
the derivative of the moment conditions with respect to the \(q\) parameters
\(J\)
Hansen’s statistic for the test of the \(r - q\) overidentifying restrictions

Hansen (1982) established consistency and asymptotic normality under the assumption that the data are stationary and ergodic, without any assumption about their distribution. He showed that the choice of \(W\) proportional to \(S^{-1}\) gives the smallest asymptotic variance in the class, which weights moments that are measured precisely more heavily than noisy ones. In practice \(S\) must itself be estimated, usually from a first-step estimate obtained with a simpler weighting matrix, and when the moment conditions are serially correlated, by an autocorrelation-consistent estimator such as Newey and West’s (1987), the same correction that appears in the lesson on reading a regression. Least squares, instrumental variables and maximum likelihood are all special cases, since each sets the sample average of a set of first-order conditions to zero; Hansen noted that quasi-maximum likelihood estimators fit the framework in exactly this way.

The \(J\) statistic is the method’s test of the model. With \(q\) parameters, \(q\) linear combinations of the moments can always be set to zero; the remaining \(r - q\) are genuine restrictions, and \(J\) measures how far from zero they remain. Hansen described it as an extension of a specification test proposed by J. D. Sargan, and its chi-squared distribution holds only when the efficient weighting matrix is used. Applied to the variance of the GARCH model, the method of moments already appeared in the first figure: setting \(\omega\) so that the model’s long-run variance equals the sample variance, a practice called variance targeting, is a single moment condition solved exactly.

The Euler equation as moment conditions

The stochastic discount factor lesson derives the consumer’s first-order condition for saving, which with power utility says that \(\beta (C_{t+1}/C_t)^{-\gamma} R_{i,t+1} - 1\) has an expectation of zero given anything known at date \(t\). Multiplying the pricing error by any such variable \(z_t\) and averaging gives an unconditional moment condition, and \(N\) returns crossed with \(K\) instruments give \(NK\) of them for two parameters.

\[f(x_{t+1}, \theta) = \Big(\beta \Big(\frac{C_{t+1}}{C_t}\Big)^{-\gamma} R_{i,t+1} - 1\Big)\, z_t, \qquad \theta = (\beta, \gamma), \qquad i = 1,\dots,N\]

\(\beta\)
the subjective discount factor
\(\gamma\)
relative risk aversion
\(z_t\)
an instrument known at date \(t\): a constant, lagged consumption growth, a lagged return

The model needs no assumption about how consumption or returns are distributed, or about how the economy produces them; the moments hold in any equilibrium in which the consumer optimizes. Because the pricing errors are unforecastable under the model, the moment conditions are serially uncorrelated and \(S\) needs no lag correction. Their estimates and the test results that followed, and why the model succeeded with one return and failed with several, are reported in the lesson on the consumption CAPM. A worked count shows what the test involves.

  1. Moments and parameters \[N = 2 \text{ returns} \times K = 3 \text{ instruments} = 6 \text{ moments}, \quad q = 2\]
  2. Degrees of freedom and 5\% critical value \[r - q = 4, \qquad \chi^2_{4,\,0.95} = 9.49\]
  3. A sample value of J = 7.8 \[p = e^{-7.8/2}\,(1 + 7.8/2) = 0.099\]

At \(J = 7.8\) the restrictions are not rejected at the 5% level. That is weaker praise than it sounds. A model can pass because it is right, or because the sample is too short, the instruments too weak or the moments too few for the test to detect what is wrong, and the J-test does not say which.

Figure: Estimating risk aversion from the Euler equation. A simulated quarterly economy in which a consumer with \(\gamma = 5\) prices a stock and a bill. The left panel shows, for one sample, the two-step GMM objective and the continuous-updating statistic at each value of \(\gamma\), with the set of values the data do not reject shaded. The right panel shows the two-step estimates across 200 samples. Make consumption growth unpredictable, then vary its volatility.

The figure isolates where the information about \(\gamma\) comes from. When expected consumption growth varies, the riskless rate must move with it by an amount governed by \(\gamma\), and the bill’s moment conditions identify the parameter sharply. When consumption growth is unpredictable, the only information is in the covariance between returns and consumption, which is small when consumption is smooth. The objective is then nearly flat, the conventional Wald interval around the estimate is far too narrow, and the estimates across samples pile up well below the truth while the J-test seldom rejects. The economy in the figure obeys the model exactly. Nothing in it is misspecified, and it is still hard to estimate.

Efficiency against robustness

The two methods sit at opposite ends of a trade-off. Maximum likelihood uses everything the model says, so when the model is complete and correct no consistent estimator is more precise; when any part of the model is wrong, including parts of no economic interest, the estimates of the interesting parts can be inconsistent. GMM uses only the moment conditions the theory implies, so it remains consistent whatever the rest of the distribution looks like, and pays in precision for the information it discards. Hansen and Singleton fitted the consumption model both ways, by GMM in 1982 and by maximum likelihood under joint lognormality in 1983. Quasi-maximum likelihood is a middle position. It keeps the likelihood’s objective for its convenience and its efficiency when the density happens to be right, and keeps GMM’s inference for the case in which it is not.

A second trade-off lies inside GMM, in the weighting matrix. The efficient choice \(S^{-1}\) depends on the model being estimated, because the variability of each model’s pricing errors is different. Hansen and Ravi Jagannathan (1997) argued that this makes \(J\) a poor basis for comparing models. Since \(\hat S\) grows with the volatility of a model’s pricing errors, a model whose proposed discount factor is more variable is harder to reject at a fixed significance level, and the test can favor a noisier model over a more accurate one. They measured specification error instead with a weighting matrix fixed across models, the inverse of the second-moment matrix of returns, which does not reward variability of the discount factor. The resulting Hansen–Jagannathan distance gives up efficiency for comparability: it is the largest pricing error the model makes on any portfolio of the test assets whose payoff has a second moment of one, a quantity with an economic meaning that a \(J\) statistic lacks.

What small samples do

Every property claimed above holds as the sample grows without limit, and financial samples are short in the dimension that matters. Quarterly consumption data since the Second World War supply a few hundred observations. The July 1996 issue of the Journal of Business & Economic Statistics carried a group of Monte Carlo studies of how GMM behaves when the asymptotic theory is asked to work in samples of realistic length.

Lars Peter Hansen, John Heaton and Amir Yaron compared three versions of the estimator on asset-pricing models: the two-step estimator, one in which the weighting matrix is iterated to convergence, and one in which, in their words, the weighting matrix “is changed with each choice of the parameters,” the continuous-updating estimator. They gave particular attention to inference based on how much the criterion function deteriorates when restrictions are imposed. Craig Burnside and Martin Eichenbaum studied the small-sample properties of GMM-based Wald tests.

Torben Andersen and Bent Sørensen estimated a stochastic volatility model of returns, a close relative of GARCH, by GMM with between 3 and 24 moments in samples of 500 to 10,000 observations, with 1,000 simulations for each combination. They documented “a tradeoff between the number of moments, or information, included in estimation and the quality, or precision, of the objective function used for estimation.” More moments carry more information, but each enlarges the weighting matrix that must be estimated, and a poorly estimated weighting matrix was behind many of the problems they observed. The J-test was badly behaved at both ends.

The J-test in Andersen and Sørensen’s (1996) simulations of a stochastic volatility model, in which the model is true
DesignWhat the test did
500 observations, 24 momentsp-value above 80% seven times out of ten, among samples in which the estimates converged
10,000 observations, 9 momentsRejected at the 5% level about one quarter of the time
Too many moments, in general“Biased strongly in favor of accepting the model”
Too few moments, in generalA tendency to overreject

James Stock and Jonathan Wright (2000) traced a deeper problem to identification. When the moment conditions vary only slightly with a parameter, as the Euler equation does with \(\gamma\) when consumption is smooth, the normal approximation fails however large the sample, and their weak-identification asymptotics “explains the breakdown of conventional GMM procedures” documented in earlier Monte Carlo studies. They proposed confidence sets that remain valid under weak identification, built from the continuous-updating objective evaluated at each hypothesized parameter value, the S-sets shaded in the figure above, and noted that such sets cannot be formed from the two-step objective. Applied to the consumption CAPM, they found considerable evidence of weak identification, and the substantive conclusions differed from those reached by conventional methods.

What the evidence does not settle

The first open question is how to weight. The efficient matrix is optimal in large samples and can perform poorly in small ones; fixed matrices such as Hansen and Jagannathan’s are better behaved and economically interpretable but are not efficient; the continuous-updating estimator removes the dependence on a first step at the cost of an objective that is harder to minimize. No choice dominates across the designs that have been studied.

The second is how many moments to use. The number of moments Andersen and Sørensen recommended grew with the sample size, and the instruments that make a test powerful are the ones that make its weighting matrix hard to estimate. A J-test that fails to reject a model with many instruments may reflect a weighting matrix estimated with so much noise that nothing can be rejected.

The third concerns what has actually been estimated. A large literature reports values of risk aversion and the elasticity of intertemporal substitution obtained from Euler equations, and Stock and Wright’s results imply that some of those numbers carry far less information than their conventional standard errors suggest. Whether the consumption-based parameters are weakly identified because consumption is genuinely smooth, because measured consumption is a poor proxy for the consumption in the theory, or because the model is wrong is a question that estimation alone cannot answer.

The fourth applies to likelihood methods. Quasi-maximum likelihood protects the consistency of a GARCH model’s parameters against the wrong density of shocks but not against a wrong variance equation, and the robustness that Bollerslev and Wooldridge established depends on the first two conditional moments being correctly specified. Which variance equation is correct is itself an empirical question, decided in part by likelihood-ratio tests whose validity rests on the same assumptions.

Sources

  1. Pearson, K. (1894). Contributions to the Mathematical Theory of Evolution. Philosophical Transactions of the Royal Society of London A 185, 71–110.
  2. Fisher, R. A. (1922). On the Mathematical Foundations of Theoretical Statistics. Philosophical Transactions of the Royal Society of London A 222, 309–368.
  3. Wilks, S. S. (1938). The Large-Sample Distribution of the Likelihood Ratio for Testing Composite Hypotheses. Annals of Mathematical Statistics 9(1), 60–62.
  4. Hansen, L. P. (1982). Large Sample Properties of Generalized Method of Moments Estimators. Econometrica 50(4), 1029–1054.
  5. Hansen, L. P., and K. J. Singleton (1982). Generalized Instrumental Variables Estimation of Nonlinear Rational Expectations Models. Econometrica 50(5), 1269–1286.
  6. Hansen, L. P., and K. J. Singleton (1983). Stochastic Consumption, Risk Aversion, and the Temporal Behavior of Asset Returns. Journal of Political Economy 91(2), 249–265.
  7. Newey, W. K., and K. D. West (1987). A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix. Econometrica 55(3), 703–708.
  8. Bollerslev, T., and J. M. Wooldridge (1992). Quasi-Maximum Likelihood Estimation and Inference in Dynamic Models with Time-Varying Covariances. Econometric Reviews 11(2), 143–172.
  9. Hansen, L. P., J. Heaton, and A. Yaron (1996). Finite-Sample Properties of Some Alternative GMM Estimators. Journal of Business & Economic Statistics 14(3), 262–280.
  10. Burnside, C., and M. Eichenbaum (1996). Small-Sample Properties of GMM-Based Wald Tests. Journal of Business & Economic Statistics 14(3), 294–308.
  11. Andersen, T. G., and B. E. Sørensen (1996). GMM Estimation of a Stochastic Volatility Model: A Monte Carlo Study. Journal of Business & Economic Statistics 14(3), 328–352.
  12. Hansen, L. P., and R. Jagannathan (1997). Assessing Specification Errors in Stochastic Discount Factor Models. Journal of Finance 52(2), 557–590.
  13. Stock, J. H., and J. H. Wright (2000). GMM with Weak Identification. Econometrica 68(5), 1055–1096.
  14. Royal Swedish Academy of Sciences (2013). The Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel 2013. Prize announcement: Eugene F. Fama, Lars Peter Hansen and Robert J. Shiller, “for their empirical analysis of asset prices”.