Skip to content
All library documents

Methods and R Tools for Time-Varying Vine Copulas

Article Quant Q&A · Author: Ram Ahluwalia

Summary

The document surveys approaches to estimating time-varying dependence with copulas in R. It points to vine copulas with evolving parameters as one research direction and mentions the CDVine package and related materials for statistical inference. It also suggests viewing dynamic copula estimation through state-space models, where marginal distributions and dependence parameters may evolve together.

The responses describe several possible implementation routes: use existing vine-copula research code, adapt state-space model packages, or estimate time-varying bivariate fat-tailed copulas by numerical maximum likelihood with optimization libraries. One contributor reports that numerical likelihood optimization was slow even on a modest dataset and expresses interest in iterative state-space alternatives. These are pointers and practitioner observations, not a comparative benchmark or a guarantee that the referenced software supports every dynamic specification; package status and available models may change over time.

Key ideas

  • Time-varying vine copulas are presented as a research approach to dynamic dependence modeling.
  • State-space models may provide a framework for evolving copula parameters and marginal distributions.
  • The responses point to R tools for vine copulas, state-space estimation, and numerical optimization.
  • One contributor reports slow numerical maximum-likelihood estimation for time-varying bivariate copulas.

Tags

Full text
# Tools in R for estimating time-varying copulas?


# Tools in R for estimating time-varying copulas?












Are there libraries in R for estimating time-varying joint distributions via copulas?

Hedibert Lopes has an excellent paper on the topic here. I know there is an existing packaged called copula but it fits a static copula.

## Answer by vonjd (score 6, accepted)

https://quant.stackexchange.com/a/7022

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.)

## Answer by egbutter (score 2)

https://quant.stackexchange.com/a/4640

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: `sspir`, `dlm`, `MARSS`, `rbugs`, `pyssm`, `pymcmc`, etc.

## Answer by Jase (score 2)

https://quant.stackexchange.com/a/8678

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 `Rsolnp`, `nloptr`, `alabama` or `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).

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.