gw_giacomini_white – Giacomini-White (2006) conditional equal-predictive-ability test.#
Back to equal_predictive_test axis | Back to L6 | Browse all options
Operational op under axis
equal_predictive_test, sub-layerL6_A_equal_predictive, layerl6. Standalone callable:mf.functions.gw_test.
Function signature#
mf.functions.gw_test(
loss_a: np.ndarray,
loss_b: np.ndarray,
) -> GWTestResult
Parameters#
name |
type |
default |
constraint |
description |
|---|---|---|---|---|
|
|
— |
— |
Per-period losses for model A (e.g. squared errors). |
|
|
— |
— |
Per-period losses for model B. |
Returns#
GWTestResult — frozen dataclass with fit results.
Attribute |
Type |
Description |
|---|---|---|
|
|
GW test statistic |
|
|
Two-sided p-value |
|
|
Reject H0 at 5% |
|
|
Observations used |
|
|
HLN correction applied |
Behavior#
Generalises DM to test conditional predictive ability given a vector of predictors. Robust to non-stationary performance differentials and works with rolling / expanding-window forecasts.
When to use
Conditional / regime-dependent forecast comparisons.
In recipe context#
Set params.equal_predictive_test = "gw_giacomini_white" in the relevant layer to activate this op within a recipe:
# Layer L6 recipe fragment
params:
equal_predictive_test: gw_giacomini_white
References#
macroforecast design Part 3, L6: ‘tests must report (statistic, p-value, kernel, lag) and respect HAC dependence-correction.’
Giacomini & White (2006) ‘Tests of Conditional Predictive Ability’, Econometrica 74(6): 1545-1578.