function [DM, PDM,RMSE]= DMTests(hmax,ErrBench,ErrModel,loss,wind) 
   
% RETURNS DIEBOLD MARIANO TESTS (STATS AND PROBS) FOR ALL HORIZONS
    DM=NaN(1,hmax);PDM=NaN(1,hmax);

    for h_dm=1:hmax
        % COMPUTE Test Statistics and 
        clear dm pdm
        [DM(1,h_dm),PDM(1,h_dm)] = dbmar(ErrBench(:,h_dm),ErrModel(:,h_dm),h_dm,h_dm,loss,wind);
    end

    RMSE = rmse(ErrModel)./rmse(ErrBench);    