function [Skew,SD_Skew]=SkewnessAndSD(XX)

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

    Skew = skewness(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)))); 
    rho_hat(tau,1)= gamma_hat(tau)/sum((XX(1:end,1)-ones(TT,1)*mean(XX(1:end,1))).^2);
    end   
    SD_Skew = ((6/TT)*2*sum(1+rho_hat.^3))^.5;
    end