ptest_VaRES: Westfall-young procedure for VaR-ES forecasts

Description Usage Arguments Details Value Author(s)

View source: R/murphy_procs_Jan22.R

Description

Westfall-young procedure for VaR-ES forecasts

Usage

1
2
3
4
5
6
7
ptest_VaRES(TSfc, alpha = 0.025, np = 500, grid_thin = 1,
  block_length = 0.7343665 * (nrow(TSfc)^(1/3)), HAC_lags = 1,
  score_type = "2", grid_bound = NA, sampling_method = "bootstrap",
  small_output = FALSE)

ptest_VaRES_full_2_boot(TSfc, alpha = 0.025, np = 500, block_length = 10 *
  (nrow(TSfc)/2525)^(1/3))

Arguments

TSfc

Matrix containing forecasts and realizations. First two columns contain VaR/ES forecasts from method A; cols 3-4 contain VaR/ES forecasts from method B; col 5 contains realizations.

alpha

Scalar, level of VaR/ES to be predicted

np

Nr of iterations (for bootstrap or permutation)

grid_thin

Thinning of grid (1 means no thinning, i.e. all forecasts in sample used as grid points)

block_length

Mean block length for bootstrap or permutation

HAC_lags

Nr of lags for HAC estimator

score_type

Either "12" (both scores) or "2" (second score only)

grid_bound

Upper bound for jumps (only needed if grid_thin > 1)

sampling_method

Either "bootstrap" or "permutation"

small_output

Dummy, set to TRUE to reduce list of outputs (e.g. for use in simulations)

Details

Tests the hypothesis that the first method weakly dominates the second method. ptest_VaRES employs a finite grid approximation, whereas ptest_VaRES_full_2_boot uses analytical calculations. See Section 3.2 in the paper for details.

Value

pval_WY is the p-value of the full Westfall-Young procedure; pval_OS is the p-value of the simplified one-step procedure (which is equivalent to Hansen's test)

Author(s)

Alexander Jordan, Fabian Krueger, Johanna Ziegel


FK83/forecastES3 documentation built on May 23, 2019, 7:17 a.m.