in the book "Numerical Methods and Optimization in Finance" I red the following: "Combining the Gaussian copula with Gaussian marginal gives a fancy way of expressing multivariate normals. However, the Gaussian copula can also be combined with other marginals, and Gaussian marginals can be linked via any copula”.
I would like to combine the Gaussian copula with Gaussian marginals, to obtain multivariate normals for my 7 asset classes. In addition, I would like to combine t-marginals with t-copula, to obtain a multivariate t-distribution. Does anyone know how to do this in MatLab?? I kinda struggle with this for quite some time!
This is how I approached the problem for the t marginals & t copula:
%% Define univariate process by t-distribution
for i = 1:nAssets
marginal{i} = fitdist(returns(:,i),'tlocationscale');
end
%% Copula calibration
for i = 1:nAssets
U(:,i) = marginal{i}.cdf(returns(:,i)); % transform margin to uniform
end
[rhoT, DoF] = copulafit('t', U, 'Method', 'ApproximateML');
%% Reverse transformation on each index
U = copularnd('t', rhoT, DoF, NumObs * NumSim);
for j = 1:nAssets
ExpReturns(:,:,j) = reshape(marginal{j}.icdf(U(:,j), DoF), NumObs, NumSim);
end
Does my approach make sense?? Any help is very much appreciated, especially on the MatLab code!!!
Best regards
copulafit
, I simulate returns viacopularnd
and then reverse the transformation in the last step, since I don't want uniform margins. First, I'm not sure whether thetlocationScale
fits a t-distribution. Second, I'm not sure whether I get a multivariate t-distribution with my approach. Lastly, I'm quite unsure whether the entire approach makes sense ... $\endgroup$ – Peter Miller Sep 17 '14 at 14:46