I have a dataset of 9 variables and I want to fit a t-copula to them in order to construct a multivariate and after that resample from it. I am using Matlab.

rng default  % For reproducibility
[Rho, nu] = copulafit('t',[A B C D E F G H L],'Method', 'ML'); 
r = copularnd('t',Rho,nu,1000); % I resample 1000 sample from it

once resample I use the icdf to obtain the time series of the sample data

a = ksdensity(data(:,1),r(:,1),'function','icdf');
l = ksdensity(data(:,9),r(:,9),'function','icdf');

after this command i get a warning on the convergence such as:

Warning: Inverse CDF calculation did not converge for p = 0.001161. 

this happens for 3 out of 9 variables. Assuming a is working fine and l gives me the warning, for a the max and min values are aligned with those of the original raw data data(:,1), while for l they are about 1e+7. Which is non-sense. Therefore I have checked the original data, for data(:,1) and data(:,9) and look like this

enter image description here

enter image description here

the second looks very very heteroskedastic compared to the first so I assume a t-copula is not suitable for that. My questions then are:

is the copula a tool only for stationary time series? in case of high heteroskedasticity, is there a way to model it for example with a conditional copula?

I would prefer if you could refer to python or Matlab.


I don't know if this will help solve your convergence issue, but a standard way of incorporating conditional heteroskedasticity in copula models is to build a copula-GARCH model. Each time series is first modelled with GARCH, and then the standardized innovations from the GARCH models of all the series are jointly modelled with a copula.

  • $\begingroup$ ok thanks. In this way the innovations will be iid and a copula can fit well in such conditions, is that right? $\endgroup$
    – Luigi87
    Jun 15 '21 at 8:26
  • $\begingroup$ @Luigi87, yes, if the GARCH models for all series adequately capture their conditional heteroskedasticity, this will be the case. $\endgroup$ Jun 15 '21 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.