Gerber Information Quality Covariance (b)
Statistics.cor — Method
Statistics.cor(
ce::GerberIQCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber IQ correlation matrix.
This method computes the Gerber IQ correlation matrix for the input data matrix X. The mean and standard deviation vectors are computed using the estimator's expected returns and variance estimators. The Gerber IQ correlation is then computed via gerber_IQ.
The standard deviations serve two purposes at once. They scale the thresholds through gerber_iq_scaling, and in cov they rescale the correlation into a covariance.
Algorithm
- Orient
Xtoobservations × assetswithdims_oriented. - Compute the per-asset standard deviations with the estimator's
ve. - Raise every standard deviation to at least
eps(eltype(sd)), so a constant asset cannot divide by zero. - Centre the returns with the estimator's
methroughdemean_returns. - Return the matrix that
gerber_IQbuilds from the centred returns and those standard deviations.
Arguments
ce: Gerber IQ covariance estimator.X: Data matrix (observations × assets).dims: Dimension along which to perform the computation.kwargs...: Additional keyword arguments passed to the mean and standard deviation estimators.
Validation
dimsis either1or2.
Returns
rho::MatNum: The Gerber IQ correlation matrix. Its diagonal is one for every asset.
An asset that never leaves its own noise zone gets a zero row, because no observation votes for any pair it belongs to. Its diagonal entry is one, which comovement_unit_diagonal! writes, so the matrix stays a formal correlation matrix and the asset reads as uncorrelated with every other one. That is what the sample says about it. Lower c when a short window meets a quiet asset, and the asset votes again.
Related
GerberIQCovarianceGerberIQCovarianceAlgorithmdemean_returnsgerber_IQcov(ce::GerberIQCovariance, X::MatNum; dims::Int = 1, kwargs...)
References
- [15] S. Gerber, W. Smyth, H. Markowitz, Y. Miao, P. Ernst and P. Sargen. Squeezing financial noise: A novel approach to covariance matrix estimation. Available at SSRN 4986939 (2025).
Statistics.cov — Method
Statistics.cov(
ce::GerberIQCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber IQ covariance matrix.
This method computes the Gerber IQ covariance matrix for the input data matrix X. The mean and standard deviation vectors are computed using the estimator's expected returns and variance estimators. The Gerber IQ correlation is then computed via gerber_IQ.
Mathematical definition
\[\begin{align} \hat{\mathbf{\Sigma}} &= \boldsymbol{\rho} \odot \left(\boldsymbol{\sigma} \boldsymbol{\sigma}^{\intercal}\right)\,. \end{align}\]
Where:
- $\hat{\mathbf{\Sigma}}$: Estimated covariance matrix.
- $\boldsymbol{\rho}$: Gerber IQ correlation matrix.
- $\boldsymbol{\sigma}$: Vector of asset standard deviations.
- $\odot$: Element-wise multiplication.
The covariance is the correlation of cor rescaled by the same standard deviations that scaled its thresholds, so its diagonal is exactly $\boldsymbol{\sigma}^2$.
Algorithm
- Run the five steps of
cor(ce::GerberIQCovariance, X::MatNum; dims::Int = 1, kwargs...), giving the correlation matrix and the standard deviations. - Rescale that matrix in place with
StatsBase.cor2cov!and those standard deviations, and return it.
Arguments
ce: Gerber IQ covariance estimator.X: Data matrix (observations × assets).dims: Dimension along which to perform the computation.kwargs...: Additional keyword arguments passed to the mean and standard deviation estimators.
Validation
dimsis either1or2.
Returns
sigma::MatNum: The Gerber IQ covariance matrix. Its diagonal is the variance of each asset, becausecor2cov!scales a unit correlation diagonal by $\boldsymbol{\sigma}^2$.
Related
GerberIQCovarianceGerberIQCovarianceAlgorithmdemean_returnsgerber_IQcor(ce::GerberIQCovariance, X::MatNum; dims::Int = 1, kwargs...)
References
- [15] S. Gerber, W. Smyth, H. Markowitz, Y. Miao, P. Ernst and P. Sargen. Squeezing financial noise: A novel approach to covariance matrix estimation. Available at SSRN 4986939 (2025).
References
- [15]
- S. Gerber, W. Smyth, H. Markowitz, Y. Miao, P. Ernst and P. Sargen. Squeezing financial noise: A novel approach to covariance matrix estimation. Available at SSRN 4986939 (2025).