Are there libraries in R for estimating time-varying joint distributions via copulas?
I think an extremely interesting strand of research on this topic is represented by extensions of vine copulas with time-varying parameters.
For vine copulas in general have a look at this site from the Technische Universität München:
Vine Copula Models
One of their research projects, which is the most relevant in this context, is:
Time varying vine copula models
It is well worth keeping an eye on since they implement their research models in R, concerning the current status of the implementation please have a look at this presentation here:
CDVine: An R-package for statistical inference of C- and D-vines
You'll find the respective package CDVine on CRAN: Here
The vignette can be found in the Journal of Statistical Software.
(I will update this post when the new code for the time-varying parameters becomes available.)
Once we start building time-varying copulas like Lopes suggests in that paper, I think we are better off venturing into the world of state space models. When viewed in a bayesian context, the similarities between the approaches are striking to me. The advantage of the copula, as I understand it, is that it is a quick and dirty way to understand the structure of your marginal distributions by simplifying the dependence structure over time.
I did not find anything in the Lopes paper to suggest what algo he uses to estimate the params of his time-varying copulas and marginals, but I expect that this is done using something like a forward/backward algorithm (used in ssm estimation) since he mentions that the marginals and copulas are estimated in the same "step". There are great open source ssm packages that you could extend in R and python, if this approach interests you:
I have written R code for some time-varying bivariate fat-tailed copula functions (ripped off Patton's Matlab code) and played around with various optimizers.
You can then use
DEoptim packages to find an optimisation solution. Here is some R code where I play around with different optimisation algorithms. Note that the
data2.csv is just a 2 column of doubles with no rownames and no Header.
Unfortunately numerical MLE is very slow even with 1000 datapoints ... I would be VERY interested in seeing an iterative state space solution, if tractable. However, I somehow doubt one has been developed since this only came around in 2006 and is mostly popular among international economics researchers who are focused on applied questions with low frequency data (hence numerical MLE is fine for them).