runtime for t-copulafit

조회 수: 2 (최근 30일)
Peter Mills
Peter Mills 2017년 10월 11일
댓글: Brendan Hamm 2017년 10월 24일
Please see the attached code and change the value “numberofvariates” that is currently 11 to see the effect on the runtime. This value is the number of conditional variables and hence the number of columns in the matrix uw. With this value of 11 the code take about 5 minutes to run (for a multivariate t-Copula with 11 degrees of freedom). With this of 12 the code take 7 minutes to run. For the case where numberofvariates the run time is 3.5 minutes. Given the increase in runtime, I can see why 30 variates takes a very long time to run. Please can you help me with improve the runtime?
numberofvariates=11;
tic; [rhohatT,nuhatT,nuciT] = copulafit('t',[uw(:,1:numberofvariates) v]);
etime = toc;

채택된 답변

Brendan Hamm
Brendan Hamm 2017년 10월 11일
Your best option is to change the method for negative log-likelihood calculations. This is only recommended for large samples.
[rhohatT,nuhatT,nuciT] = copulafit('t',[uw(:,1:numberofvariates) v],'Method','ApproximateML');
  댓글 수: 2
Peter Mills
Peter Mills 2017년 10월 20일
Hi Brendan Could you give a quantification of what you mean by larger samples in this case? - greater than 100, 200, 300 more? When I compare the results I get with the above two methods I get the same values for rhohatT but different values for nuhatT what is the reason for this?
For example with;
numberofvariates=11;
for;
[rhohatT0,nuhatT0,nuciT0] = copulafit('t',[uw(:,1:numberofvariates) v]);
I get nuhatT0 =
21.2928
nuciT0 =
9.4937 33.0919
but for
[rhohatT,nuhatT,nuciT] = copulafit('t',[uw(:,1:numberofvariates) v],'Method','ApproximateML');
I get: nuhatT =
12.8752
nuciT =
NaN NaN
rhohatT seems to be approximately the same in both cases.
So my question is will this difference in values for nuhatT effect my results using copulapdf for t-copula?;
CopPDFuT = copulapdf('t',[repmat(utm1(t,1:dim-1),T,1), vdt2],rhohatT,nuhatT);
If it does effect my results what can I do about this?
Brendan Hamm
Brendan Hamm 2017년 10월 24일
For more information on the algorithm being used, please see the source:
[1] Bouyé, E., V. Durrleman, A. Nikeghbali, G. Riboulet, and T. Roncalli. “Copulas for Finance: A Reading Guide and Some Applications.” Working Paper. Groupe de Recherche Opérationnelle, Crédit Lyonnais, Paris, 2000.
I am unaware of an exact value for "large"
The resulting copula from the Approximate method will have fatter tails as the nu parameter decreases.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Probability Distributions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by