Diebold-Mariano-Test icon indicating copy to clipboard operation
Diebold-Mariano-Test copied to clipboard

ZeroDivisionError: 0.0 cannot be raised to a negative power

Open ahbon123 opened this issue 2 years ago • 1 comments

Sorry,

It raises the following error while I running DM test:

 DM_stat=V_d**(-0.5)*mean_d
ZeroDivisionError: 0.0 cannot be raised to a negative power

Could you help to handling this? Thanks.

ahbon123 avatar Nov 29 '21 07:11 ahbon123

It means that your variance estimate, V_d, is zero. According to the paper, in rare cases this can happen (negative or zero variance estimate). In this case you should simply immediately reject the null hypothesis.

ZeliTheZealot avatar Sep 14 '22 22:09 ZeliTheZealot