|
marginal distributions estimated in Matlab
use function filtReturnsGARCH.m
[residuals, UnResiduals,GARCHspec,likelihoods]=filtReturnsGARCH(returns,distr,model,method)
%Estimates standardize residuals and transforms them to uniform
%OUTPUTS:
%residuals: Matrix TxN with the standardized residuals
%UnResiduals: Matrix TxN with uniform marginals (input for copula)
method 'CML': use empiricalCDF() % transform margin to uniform
UnResiduals(:,i) =empiricalCDF(residuals(:,i));
method 'IFM': if you knows the distribution of the residuals
distr,'Gaussian' UnResiduals(:,i) =normcdf(residuals(:,i));
distr,'T' UnResiduals(:,i) =tcdf(residuals(:,i),...);
distr,'SkewT' UnResiduals(:,i) =skewtdis_cdf(residuals(:,i),.....);
|