For class, I am tasked to generate synthetic stock data using the copula R package. The step-by-step process is picking 2 stocks (i.e., Amazon & Apple), fit their marginal distributions (I am using skewed student's T for both), then fit a Copula (I am using Frank copula). Then I can generate Synthetic data from the fitted frank copula.

syn_data <- rCopula(copula = frankCopula(param = fr_params), n = length(x.aapl))
colnames(syn_data) <- c("AAPL", "AMZN")

syn_x.aapl <- qsstd(syn_data[,1], mean = theta.aapl[1], sd = theta.aapl[2], nu = theta.aapl[3], xi = theta.aapl[4])
syn_x.amzn <- qsstd(syn_data[,2], mean = theta.amzn[1], sd = theta.amzn[2], nu = theta.amzn[3], xi = theta.amzn[4])

The scatter plot shows the real and synthetic data. enter image description here

My questions are, what does the copula tell us? Is the shape interpretable? And why do we use it to fit data instead of the joint distribution curve?


1 Answer 1


I think the immediate goal of the problem is three-fold 1) to exhibit how a copula might arise when facing a data simulation task, 2) to get you using copula-based tools, and 3) to lead you to ask the question you just asked.

Just as CDFs are equivalent to PDFs for univariate distributions, copulas are equivalent to PDFs for multivariate data. Copulas provide an alternative mode of specifying a joint distribution. And rather like the univariate case, it means that you can use a uniform (0,1) random number generator (in your case twice) to sample from $\tt{(Y_{AMZN}, Y_{AAPL})}$ under the assumption that they are distributed by a Frank copula. First you obtain, $\tt{U_{AMZN} \sim uniform(0,1)}$ and $\tt{U_{AAPL} \sim uniform(0,1)}$. The copula maps these numbers to $\tt{(Y_{AMZN}, Y_{AAPL})}$ using the bivariate Frank copula formula give here where $\theta \in \mathbb{R}$ \ $0$ is a single parameter that "governs the strength of the dependence."

In an earlier comment (now deleted) I assumed naively and incorrectly that Amazon and Apple would would follow a joint multivariate normal distribution, which would be easy enough to simulate without copulas. But it seems you are expected to use the Frank copula, which is bivariate and symmetric but not normal. The Frank copula has a banded structure as described here. The banded structure may be important for reasons specific to domain-space logic.

But why are copulas are sometimes preferable to PDFs? In short, it is just easier to manipulate/modify/engineer a function which must asymptotically approach 1 than it is to manipulate, etc. a function whose integral has to remain 1.

  • $\begingroup$ Thanks, Peter. For background I selected Skewed Student T (univariate) and Frank Copula based on AICs. Could you explain the shape of copulas in general, why are they so dense at the extremes? To my understanding, they are shaped like a box when tau is 0, and become sting-ray shaped as rank correlation moves from 0. $\endgroup$ Commented Sep 29, 2022 at 1:55
  • $\begingroup$ Also, Do we prefer to generate data from copulas over joint distribution, because a copula's domain is (0,1) and joint distribution is (-inf,inf)? $\endgroup$ Commented Sep 29, 2022 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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