function realization=generate_realization(eta,index,H,C,horizont)
realization=0;
beta=H(index);
for o=1:horizont
    best_control=-(eta*beta/(1+beta^2)+interpol(beta,H,C));
    %best_control=-(eta*beta/(1+beta^2)+C(index)*abs(rand));
    s=randn;
    pom=sqrt(1+best_control^2);
    eta=abs(eta+beta*best_control+pom*s);
    beta=abs(pom*beta+best_control*s);
    realization=realization+eta^2;
end
end