growth_error_variance

growth_error_variance(
    estimates,
    as_of,
    source,
    *,
    minimum_observations=defaults.MINIMUM_OBSERVATIONS,
    winsorize_fraction=None,
)

Compute one source’s growth track record ahead of an entity’s history.

The variance is the mean of squared errors; it is not a centred (mean-subtracted) variance, since a source with a consistent bias should read as imprecise, not merely as scattered around its own bias.

Parameters

Name Type Description Default
estimates pd.DataFrame Long input panel. required
as_of pd.Timestamp The moment to read the panel at. required
source str The source name whose track record is being measured. required
minimum_observations int The fewest growth errors that make the variance meaningful. defaults.MINIMUM_OBSERVATIONS
winsorize_fraction float | None Share of the upper tail of error magnitudes clipped, each history on its own bounds. None clips nothing. None

Returns

Name Type Description
pd.DataFrame One row per subject present in the panel as of as_of, carrying f”{source}_growth_error_variance” and f”{source}_growth_error_count”. The variance is NaN below the minimum observation count; the count is always the true one.