function fore=scalarfore(data,p,q)
k=size(data,2);
[parameters, Ht]=scalar_bekk_mvgarch(data,p,q, []);
k2=k*(k+1)/2;
C=parameters(1:(k2));
A=parameters(k2+1:k2+p);
B=parameters(k2+p+1:k2+p+q);

C=ivech(C);
C=tril(C);
Htt=Ht(:,:,size(Ht,3));
epsi=data(size(data,1),:);
epsilon=epsi'*epsi;
fore=C*C'+B*Htt*B'+A*epsilon*A';