Copula Parameters
Calibrate a bivariate copula between ticker_a and ticker_b on the pseudo-observations (ranks) of their returns: the Clayton, Gumbel and Frank parameters by maximum likelihood, the gaussian correlation from the normal scores, and the Student-T correlation from Kendall’s tau with the degrees of freedom by maximum likelihood (Demarta & McNeil, 2005).
When ticker_a/ticker_b are not given, every unique pair among the Toolkit’s tickers is calibrated instead.
A copula separates the dependence structure between two assets from their individual (marginal) return distributions (Sklar’s theorem), letting the two be modeled independently. Five families are supported, each capturing a different shape of dependence:
- “gaussian”: zero tail dependence – crashes and rallies are no more likely to happen together than the correlation alone implies. Included mainly as a baseline, since real asset returns typically show more joint tail risk than this.
- “student-t”: symmetric, nonzero tail dependence in both tails.
- “clayton”: nonzero lower tail dependence only – assets crash together more than they rally together. The most common choice for equity return pairs.
- “gumbel”: nonzero upper tail dependence only – assets rally together more than they crash together.
- “frank”: zero tail dependence in both tails, but (unlike gaussian) can represent negative dependence and is symmetric around independence.
See get_best_fitting_copula to compare all five by AIC on the same pair of assets, and see get_copula_simulation to draw joint scenarios from the fitted copula.
The formula is as follows:
\[u_{i} = \operatorname{Rank}(A_{i}) / (n + 1),\;\; v_{i} = \operatorname{Rank}(B_{i}) / (n + 1)\] \[\text{Gaussian Rho} = \operatorname{Correlation}(\Phi ^{-1} (u),\; \Phi ^{-1} (v))\] \[\text{Student-T Rho} = \operatorname{sin}(\pi \cdot \text{Kendall's Tau} / 2)\] \[\Theta (\text{and the Student-T Degrees of Freedom}) = \text{argmax}\; \text{Σ} \;\text{ln}\; c (u_{i},\; v_{i})\] \[\text{AIC} = 2 \cdot k - 2 \cdot \text{Log-Likelihood}\]Where A and B are the values of the two assets on their n common dates, c is the copula density and k the number of fitted parameters (2 for the Student-T, 1 otherwise). The search bounds are [2.05, 60] for the Degrees of Freedom and, for Theta, [0.0001, 100] (Clayton), [1, 50] (Gumbel) and [-50, 50] (Frank). The implied tail dependence is 2^(-1 / Theta) in the lower tail for Clayton, 2 - 2^(1 / Theta) in the upper tail for Gumbel, 2 * t_(v+1)(-√((v + 1) * (1 - Rho) / (1 + Rho))) in both tails for the Student-T and 0 otherwise.
For more information about the method, see:
- Sklar, A. (1959). Publications de l’Institut de Statistique de l’Universite de Paris, 8, 229-231.
- McNeil, A.J., Frey, R., & Embrechts, P. (2015). “Quantitative Risk Management: Concepts, Techniques and Tools.” Princeton University Press.
- Demarta, S., & McNeil, A.J. (2005). “The T Copula and Related Copulas.” International Statistical Review, 73(1), 111-129.
Also known as: copula calibration, copula fit, dependence modeling.
Copula Parameters in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_copula_parameters as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["GCUSD", "SIUSD"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.risk.get_copula_parameters("GCUSD", "SIUSD", copula="student-t")
Or, after setting up the Finance Toolkit MCP, ask:
What correlation, degrees of freedom and tail dependence does a Student-t copula fitted to the returns of gold and silver from 2021 to 2025 imply?
Which returns:
| Value | |
|---|---|
| Rho | 0.7498 |
| Degrees of Freedom | 8.1362 |
| Lower Tail Dependence | 0.2821 |
| Upper Tail Dependence | 0.2821 |
| Log-Likelihood | 532.413 |
| AIC | -1060.83 |
| Observations | 1300 |
Parameters
get_copula_parameters accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
ticker_a | str | The first asset. Defaults to None, meaning every unique pair of tickers in the Toolkit instance is calibrated (requires ticker_b to also be None). | "AAPL" |
ticker_b | str | The second asset. Defaults to None, see ticker_a. | "MSFT" |
copula | str | The copula family to fit, one of “gaussian”, “student-t”, “clayton”, “gumbel” or “frank”. Defaults to “gaussian”. | "clayton" |
period | str | The data frequency (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”, since a dependence estimate needs far more observations than a lower frequency provides – at “yearly” a decade of history is only ten observations. | "weekly" |
column | str | The historical data column to use. Defaults to “Return”. | "Return" |
rounding | int | None | The number of decimals to round the results to. Defaults to None. | 2 |