function [Varianza,SD_Varianza]=VarianceAndSD(XX)

TT = size(XX,1); 
k = 4*1; 

    Varianza = var(XX);

    clear gamma_hat rho_hat;
    for tau=1:k;
    gamma_hat(tau)= sum((XX(1:end-tau,1)-ones(TT-tau,1)*mean(XX(1:end-tau,1))).*(XX(1+tau:end,1)-ones(TT-tau,1)*mean(XX(1:end-tau,1))))/TT; 
    end   
    SD_Varianza = (((2/TT)*(Varianza+2*sum(gamma_hat))^2)^.5);
    end