PedroBSB / mlRFinance

Machine Learning functions for Finance
11 stars 21 forks source link

SPA-Test: Wrong computation of relative performance #24

Open Marius239 opened 4 years ago

Marius239 commented 4 years ago

The computation of the performance relative to the benchmarks is not correct in the tests for superior predictive ability. The formula you state in the theoretic overview is Loss_Benchmark - Loss_Alternatives. However, in your function hansen.spa the first line is:

d.mat <- apply(Dmat, 2, function(x) x - bVec).

So, you reversed it. This leads to wrong conclusions regarding p-values.