white_reality_check: White's Reality Check (WRC)

View source: R/statistical_tests.R

white_reality_checkR Documentation

White's Reality Check (WRC)

Description

Implements White's (2000) Reality Check (WRC) for comparing forecast accuracy of multiple competing forecasts against a benchmark forecast based on mean loss differences. The test controls the family-wise error rate across all forecast comparisons simultaneously, avoiding data-snooping bias.

Hypotheses:

  • H0: \max_{k} E[g(u_{0,t}) - g(u_{k,t})] \leq 0 – no competing forecast produces a strictly lower expected loss than the benchmark forecast.

  • H1: At least one competing forecast has strictly lower expected loss than the benchmark forecast.

Usage

white_reality_check(
  loss_differences,
  n_simulations = 999,
  block_length = 5,
  alpha = 0.05
)

Arguments

loss_differences

A numeric matrix (P x K) of loss differences (benchmark loss minus forecast loss), where P is the number of forecast periods and K is the number of competing forecasts. A positive entry means the competing forecast outperforms the benchmark forecast in that period.

n_simulations

integer. The number of MBB bootstrap replications. Default 999; see Davidson & MacKinnon (2000).

block_length

integer. The block length for the Moving Block Bootstrap (MBB). A commonly used rule of thumb is T^{1/3} (Politis & Romano, 1994). For P = 165, this gives approximately 5–6.

alpha

numeric. The significance level (default 0.05).

Details

The test statistic is \hat{S}_P = \max_k \overline{d}_k, where \overline{d}_k is the sample mean of the loss differential series for forecast k (White, 2000, eq. 2). Bootstrap p-values are obtained via the MBB of Kunsch (1989) by recentring each bootstrap statistic at the sample mean, following the procedure in Corradi & Swanson (2011). This is an unstudentized test; for a studentized version with improved power against irrelevant forecasts, see superior_predictive_ability_test.

Value

An object of class "htest". The printed output shows the test statistic (maximum mean loss differential), the bootstrap p-value, and the test name. A small p-value (below alpha) leads to rejection of H0, indicating that at least one competing forecast is significantly more accurate than the benchmark forecast.

References

White, H. (2000). A reality check for data snooping. Econometrica, 68(5), 1097–1126. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/1468-0262.00152")}

Kunsch, H. R. (1989). The jackknife and the bootstrap for general stationary observations. The Annals of Statistics, 17(3), 1217–1241. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/aos/1176347265")}

Davidson, R., & MacKinnon, J. G. (2000). Bootstrap tests: How many bootstraps? Econometric Reviews, 19(1), 55–68. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/07474930008800459")}

Corradi, V., & Swanson, N. R. (2011). The White Reality Check and some of its recent extensions. In Festschrift in honor of Halbert L. White.

Examples

data(metals)
# metals: 165 x 15; columns 1-14 are competing forecasts, column 15 is the benchmark
# A small offset (+0.5) is added to the lagged benchmark to avoid degenerate zero
# loss differences when forecasts equal the realized value exactly (illustration only).
P <- nrow(metals)
K_total <- ncol(metals)
K <- K_total - 1 # 14 competing forecasts
realized       <- c(metals[-1, K_total], metals[P, K_total]) + 0.5
benchmark_loss <- (metals[, K_total] - realized)^2
model_loss     <- (metals[, 1:K] - realized)^2
loss_diff      <- benchmark_loss - model_loss
res <- white_reality_check(loss_diff, block_length = 5, n_simulations = 50)
print(res)

RCtest documentation built on June 2, 2026, 9:07 a.m.