Directional_NW: Weighted and Unweighted Directional Forecast Test with...

Description Usage Arguments Value Author(s) References Examples

Description

This function implements formal statistical tests to check whether the directional forecasts are able to improve upon driftless random walk forecasts. Two test options include weighted and unweighted directional forecasts, and the test statistic is calculated with the Newey-West HAC estimator to control for serial correlation.

Usage

1
Directional_DW(forecasts, p=1, weighted=TRUE)

Arguments

forecasts

an object of class "Maeforecast" or "MaeBagging". Can be returned by functions maeforecast, Bagging, and Metrics.

p

the largest lag used in the forecasting model. Default is 1.

weighted

logical. If TRUE, weighted directional forecast test will be applied; otherwise the test will be applied upon unweighted directional forecasts. Default is TRUE.

Value

test.statistic

the test statistic.

pvalue

the p value.

Author(s)

Zehua Wu

References

Kim, Young Ju, Zhipeng Liao, and Aaron Tornell. 2014. “Speculators Positions and Exchange Rate Forecasts: Beating Random Walk Models.” Unpublished Manuscript UCLA.

Examples

1
2
3
AR.For<-maeforecast(mydata, w_size=72, window="recursive",
        model="ar")
Directional_NW(AR.FOR, p=1, weighted=T)

ZehuaWu/gtm documentation built on June 4, 2019, 1:52 p.m.