Gerber Information Quality Covariance (b)

Statistics.cor — Method
Statistics.cor(
    ce::GerberIQCovariance,
    X::MatNum;
    dims::Int = 1,
    kwargs...
) -> MatNum

Compute 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

  1. Orient X to observations × assets with dims_oriented.
  2. Compute the per-asset standard deviations with the estimator's ve.
  3. Raise every standard deviation to at least eps(eltype(sd)), so a constant asset cannot divide by zero.
  4. Centre the returns with the estimator's me through demean_returns.
  5. Return the matrix that gerber_IQ builds 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

  • dims is either 1 or 2.

Returns

  • rho::MatNum: The Gerber IQ correlation matrix. Its diagonal is one for every asset.
Note

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

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).
source
Statistics.cov — Method
Statistics.cov(
    ce::GerberIQCovariance,
    X::MatNum;
    dims::Int = 1,
    kwargs...
) -> MatNum

Compute 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

  1. Run the five steps of cor(ce::GerberIQCovariance, X::MatNum; dims::Int = 1, kwargs...), giving the correlation matrix and the standard deviations.
  2. 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

  • dims is either 1 or 2.

Returns

  • sigma::MatNum: The Gerber IQ covariance matrix. Its diagonal is the variance of each asset, because cor2cov! scales a unit correlation diagonal by $\boldsymbol{\sigma}^2$.

Related

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).
source

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).