function ADCCfore=ADCCforecast(data)
[parameters, ll,Qt, Ht]=dcc(data,[],1,1,1,1,1,1,2,[],[],[],[]);
[t k]=size(data);
forecast1=parameters(1)+parameters(2)*data(t,1)^2+parameters(3)*(sign(data(t,1))+1)*0.5*data(t,1)^2+parameters(4)*Ht(1,1,t);
forecast2=parameters(5)+parameters(6)*data(t,2)^2+parameters(7)*(sign(data(t,2))+1)*0.5*data(t,2)^2+parameters(8)*Ht(2,2,t);
R=corr_ivech(parameters(9));
N=ivech([parameters(10);parameters(11);parameters(12)]);
a=parameters(13);
g=parameters(14);
b=parameters(15);
for i=1:t
Htt1(i)=Ht(1,1,i);
Htt2(i)=Ht(2,2,i);
end
Htt=[Htt1' Htt2'];

stdresid=data./sqrt(Htt);
for i=1:t
    v(t,:)=stdresid(i,:).*(stdresid(i,:)<0);
end
forecastQ=R*(1-a-b)-g*N+a*(stdresid(t,:))'*(stdresid(t,:))+g*v(t,:)'*v(t,:)+b*Qt(:,:,t);
forecastR=forecastQ./(sqrt(diag(forecastQ))*sqrt(diag(forecastQ))');
forecast12=forecastR(1,2)*sqrt(forecast1)*sqrt(forecast2);
ADCCfore=[forecast1 forecast12; forecast12 forecast2];

