Diebold-Mariano test
Posted: Tue Mar 10, 2015 5:43 am
Hi,
I am trying to perform the Diebold-Mariano (DM) test on monthly data for several different forecasters. The problem is that the forecasters publish their forecasts at different times each year. I want to calulate the DM-statistic for the forecasts made in, say, March and April and also include the situations where one forecaster publish in March and the other in April. In the following code the DM-statistic is only calculated between same months (March vs March and April vs April).
Smpl 2000 2014 If @Month=3 Or @Month=4
%z="y x z" 'A list of different forecasters
For %z1 {%z}
For %z2 {%z}
If %z1 <> %z2 Then
Equation dm_{%z1}_{%z2}_gdp.ls(n) gdp{%z1}t0_diff_quad-gdp{%z2}t0_diff_quad c
!d_{%z1}_{%z2}=dm_{%z1}_{%z2}_gdp.@Pval(1)
!d_{%z1}_{%z2}_c=dm_{%z1}_{%z2}_gdp.@coefs(1)
EndIf
Next
Next
Any ideas on how to match forecasts made at different months is gratefully acknowledged.
I am trying to perform the Diebold-Mariano (DM) test on monthly data for several different forecasters. The problem is that the forecasters publish their forecasts at different times each year. I want to calulate the DM-statistic for the forecasts made in, say, March and April and also include the situations where one forecaster publish in March and the other in April. In the following code the DM-statistic is only calculated between same months (March vs March and April vs April).
Smpl 2000 2014 If @Month=3 Or @Month=4
%z="y x z" 'A list of different forecasters
For %z1 {%z}
For %z2 {%z}
If %z1 <> %z2 Then
Equation dm_{%z1}_{%z2}_gdp.ls(n) gdp{%z1}t0_diff_quad-gdp{%z2}t0_diff_quad c
!d_{%z1}_{%z2}=dm_{%z1}_{%z2}_gdp.@Pval(1)
!d_{%z1}_{%z2}_c=dm_{%z1}_{%z2}_gdp.@coefs(1)
EndIf
Next
Next
Any ideas on how to match forecasts made at different months is gratefully acknowledged.