I am looking into comparing the predictive accuracy of forecasts of different models against a benchmark model. For this I have looked into the Diebold-Mariano test statistic. However, I am using the modified Harvey, Leybourne and Newbold version of this test and I do not understand the difference between the used T and h in this modification?

The original DM-statistic value is multiplied by the square root of:

[T + 1 - 2h + h(h-1)/T]/T

As far as I can see, the T and h will be equal for h-period forecast and as T being the length of the forecast errors?

Here is a reference: https://www.bankofcanada.ca/wp-content/uploads/2010/02/wp04-2.pdf


1 Answer 1


$h$ is the forecast horizon, whereas $T$ is the sample size for the loss differentials.

For example, if I have data $Y_1, ..., Y_{100}$, I could construct a sequence of 2-step-ahead forecasts like this:

  1. Fit my model on $Y_1, ..., Y_{90}$, and derive $\hat{Y}_{92}$.
  2. Fit my model on $Y_1, ..., Y_{91}$, and derive $\hat{Y}_{93}$.


  1. Fit my model on $Y_1, ..., Y_{98}$, and derive $\hat{Y}_{100}$.

I then evaluate my loss function for each of $L(Y_i, \hat{Y}_i)$, for $i=92,...,100$. I do the same for my benchmark model and obtain loss differentials $d_{92},...,d_{100}$.

In this example, we have $h=2$ and $T=9$.

  • $\begingroup$ Okey, so h is sort of the time increments of the total forecasted horizon? And, just a question, if you were to do as the example, in e.g. step 3 through 9, would you use Yhat_92 or Y_92 when estimating e.g. Yhat_94? (Sorry, for the math, I don't know how to use math mode here...) $\endgroup$ Commented May 22, 2020 at 17:05
  • $\begingroup$ $h$ is the number of steps ahead for the forecast, yes. When forecasting for $\hat{Y}_{94}$, you would base it on the actual data up to $Y_{92}$, otherwise it would not be a 2-step-ahead forecast (if you use only $Y_1,...,Y_{90}$, it is a 4-step-ahead forecast). $\endgroup$
    – Chris Haug
    Commented May 23, 2020 at 14:51
  • $\begingroup$ That makes sense, thanks for clarifying. $\endgroup$ Commented May 23, 2020 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.