%x=load('x.txt');
%y=load('y.txt');
%data=[x y];
tic;
data=load('data.txt');
data=data(:,1:2);
windowlength=500;
for i=1:size(data,1)-windowlength
fore(:,:,i)=bekkfore(data(i:i+windowlength-1,:));
    end
    for i=1:size(data,1)-windowlength
    hta(i)=fore(1,1,i);
    htb(i)=fore(2,2,i);
    htab(i)=fore(1,2,i);
    end
    hta=hta';
    htb=htb';
    htab=htab';
    ratio=htab./htb;
toc;