Skip to content

Orthogonalised Gnanadesikan–Kettenring estimator

How OGK turns pairwise robust covariances into a multivariate scatter estimate by rotating the data and remeasuring spread, with an exact one-pass MAD example.

The orthogonalised Gnanadesikan–Kettenring (OGK) estimator builds a robust multivariate scatter matrix by standardising each variable, finding directions from pairwise robust covariances, estimating spread again along those directions, and transforming back. For a quant comparing vectors of asset returns or market features, this offers a way to reduce the influence of extreme observations on the estimated shape of the data cloud. A scatter estimate becomes a calibrated estimate of the covariance matrix only with appropriate scale conventions and modelling assumptions.
Maronna and Zamar’s 2002 paper introduced this construction to make robust multivariate estimation computationally practical in higher dimensions. The central move is to use a pairwise estimate for orientation, then remeasure spread in the rotated data.

Why pairwise robustness is not enough

The ordinary identity

Cov⁡(A,B)=Var⁡(A+B)−Var⁡(A−B)4\operatorname{Cov}(A,B) =\frac{\operatorname{Var}(A+B)-\operatorname{Var}(A-B)}{4}

suggests replacing standard deviations by a robust univariate scale ss:

g(A,B)=s(A+B)2−s(A−B)24.g(A,B)=\frac{s(A+B)^2-s(A-B)^2}{4}.
This is the Gnanadesikan–Kettenring pairwise construction, implemented as covGK. Robust pairwise entries do not automatically assemble into a positive semidefinite matrix. In more than two dimensions, individually plausible entries can be mutually incompatible. OGK therefore adds a multivariate reconstruction; stopping at the pairwise matrix misses its defining step.

For an n×pn\times p data matrix XX, with observations in rows, a single pass is

D=diag⁡(s1,…,sp),sj=s(Xj)>0,Y=XD−1,Ujj=1,Ujk=g(Yj,Yk)(j≠k),U=EΛE⊤,E⊤E=I,Z=YE,dj=s(Zj)2,S^OGK=DEdiag⁡(d1,…,dp)E⊤D.\begin{aligned} D&=\operatorname{diag}(s_1,\ldots,s_p), & s_j&=s(X_j)>0,\\ Y&=XD^{-1}, & U_{jj}&=1,\quad U_{jk}=g(Y_j,Y_k)\quad(j\ne k),\\ U&=E\Lambda E^\top, & E^\top E&=I,\\ Z&=YE, & d_j&=s(Z_j)^2,\\ \widehat S_{\mathrm{OGK}}&=DE\operatorname{diag}(d_1,\ldots,d_p)E^\top D. \end{aligned}
Here Xj,Yj,ZjX_j,Y_j,Z_j denote columns. The eigenvalue decomposition supplies orthonormal columns of EE. Crucially, the final matrix uses djd_j, not the eigenvalues in Λ\Lambda. The robustbase implementation shows these standardisation, rotation and reconstruction steps directly.

Diagonalising UU does not guarantee that the observed columns of ZZ have zero ordinary sample covariance, much less that they are independent. It provides the working directions in which OGK constructs a diagonal robust scatter estimate.

Six rows, with the scale convention exposed

Take these fictional, unitless feature pairs:

ObservationFeature 1Feature 2
A−2−1
B−11
C0−2
D12
E20
F1015
Use one pass, no reweighting, and the unscaled median absolute deviation at every scale calculation:
s(v)=median⁡i∣vi−median⁡kvk∣.s(v)=\operatorname{median}_i\left|v_i-\operatorname{median}_k v_k\right|.

For an even number of values, each median is the arithmetic average of the two middle ordered values. There is no Gaussian consistency factor or finite-sample correction. All six rows, including F, enter every calculation; F is not removed.

Both column medians are 0.50.5 and both marginal MADs are 1.51.5, so D=1.5ID=1.5I. After forming Y=X/1.5Y=X/1.5,

s(Y1+Y2)=53,s(Y1−Y2)=43.s(Y_1+Y_2)=\frac53,\qquad s(Y_1-Y_2)=\frac43.

Thus U12=((5/3)2−(4/3)2)/4=1/4U_{12}=((5/3)^2-(4/3)^2)/4=1/4, giving

U=(11/41/41).U=\begin{pmatrix}1&1/4\\1/4&1\end{pmatrix}.

Choose eigenvectors in this order:

e−=12(−11),e+=12(11),E=(e−,e+).e_- = \frac{1}{\sqrt2}\begin{pmatrix}-1\\1\end{pmatrix}, \qquad e_+ = \frac{1}{\sqrt2}\begin{pmatrix}1\\1\end{pmatrix}, \qquad E=(e_-,e_+).

Their eigenvalues in UU are 3/43/4 and 5/45/4. Recomputing MAD on the two columns of Z=YEZ=YE instead gives

d−=89,d+=2518.d_- = \frac89,\qquad d_+ = \frac{25}{18}.

Transforming these new squared spreads back gives

S^OGK=(1.5)2E(8/90025/18)E⊤=(41/169/169/1641/16)=(2.56250.56250.56252.5625).\begin{aligned} \widehat S_{\mathrm{OGK}} &=(1.5)^2 E \begin{pmatrix}8/9&0\\0&25/18\end{pmatrix}E^\top\\ &=\begin{pmatrix}41/16&9/16\\9/16&41/16\end{pmatrix} =\begin{pmatrix}2.5625&0.5625\\0.5625&2.5625\end{pmatrix}. \end{aligned}

Its eigenvalues are 22 and 3.1253.125. Reversing eigenvector order or changing their signs leaves this reconstruction unchanged when the rotated scales follow the same convention.

Fictional six-row raw-MAD OGK example. Both marginal MADs are 1.5. Initial U has diagonal 1 and off-diagonal 0.25, with eigenvalues 0.75 and 1.25. Squared MADs after rotation are 8/9 and 25/18. The reconstructed scatter has diagonal 2.5625, off-diagonal 0.5625 and eigenvalues 2 and 3.125.
Fictional six-row raw-MAD OGK example. Both marginal MADs are 1.5. Initial U has diagonal 1 and off-diagonal 0.25, with eigenvalues 0.75 and 1.25. Squared MADs after rotation are 8/9 and 25/18. The reconstructed scatter has diagonal 2.5625, off-diagonal 0.5625 and eigenvalues 2 and 3.125.
Original arithmetic illustration: OGK reuses the pairwise matrix’s directions but replaces its eigenvalues with robust spreads measured on the rotated data. All six rows enter every scale calculation.

These are raw-MAD scatter numbers. Their square roots are not calibrated standard-deviation estimates, and the matrix is not a promised default software result.

What reconstruction guarantees—and what it leaves open

Write A=DEA=DE. For any vector ww,

w⊤S^OGKw=∑j=1pdj((A⊤w)j)2≥0.w^\top\widehat S_{\mathrm{OGK}}w =\sum_{j=1}^p d_j\bigl((A^\top w)_j\bigr)^2\ge0.
This proves positive semidefiniteness because each djd_j is a squared scale. If the marginal scales and all rotated scales are positive, AA is invertible and the result is positive definite. A zero rotated scale can leave the result singular; a zero marginal scale prevents the initial division. Ties and degenerate data therefore require explicit handling before using an inverse for Mahalanobis distance.
OGK is generally not exactly affine equivariant: mixing the original features by an arbitrary invertible matrix can change the fitted scatter beyond the corresponding coordinate transformation. This is distinct from merely expressing one completed matrix in a new basis. In the declared example, replacing each pair by (x1+x2,x2)(x_1+x_2,x_2) and refitting gives first diagonal entry approximately 8.0069448.006944; transforming the original fitted scatter gives 6.256.25. The two procedures disagree. This is an independently computed counterexample for this one-pass raw-MAD construction.
Iterations, the univariate scale choice and reweighting are further choices. The official covOGK reference documents an iteration argument with default two, a separate reweighting function, and distinct unreweighted cov and reweighted wcov outputs. Report those choices when comparing implementations. Robustness to unusual rows also does not decide whether a genuine market stress belongs in the risk question being asked.
For the linear algebra, Eigenvalues and Covariance Matrices develops orthogonal directions and their variance interpretation. The full lesson requires membership; a public preview is available.

Sources

Last updated
  • robust statistics
  • covariance estimation
  • multivariate statistics
  • orthogonalisation
  • median absolute deviation
← Back to the glossaryBack to top ↑