Archimedan Copulas
Purpose
Plot the density, level curves of the Archimedan Copula
Gumbel Copula
> library(copula) > n <- 5000 > param.cop <- 10 > dim.cop <- 2 > cop.gumbel <- archmCopula(family = "gumbel", param = param.cop, dim = dim.cop) > mvd.gumbel <- mvdc(copula = cop.gumbel, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 2), list(mean = 0, sd = 2))) > x1 <- rcopula(cop.gumbel, n) > param.cop <- 2 > dim.cop <- 2 > cop.gumbel <- archmCopula(family = "gumbel", param = param.cop, dim = dim.cop) > mvd.gumbel <- mvdc(copula = cop.gumbel, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 2), list(mean = 0, sd = 2))) > x2 <- rcopula(cop.gumbel, n) > par(mfrow = c(1, 2)) > plot(x1[, 1], x1[, 2], col = "blue", xlab = "", ylab = "", pch = 16, main = expression(paste("Gumbel ", + alpha, " = 10"))) > plot(x2[, 1], x2[, 2], col = "blue", xlab = "", ylab = "", pch = 16, main = expression(paste("Gumbel ", + alpha, " = 2"))) |
Gumbel Level Plots
> par(mfrow = c(1, 1)) > contour(mvd.gumbel, dmvdc, xlim = c(-6, 6), ylim = c(-6, 6), main = expression(paste("Gumbel ", + alpha, " = 2"))) |
Gumbel Density Plots
> par(mfrow = c(1, 1)) > probs <- dmvdc(mvd.gumbel, x2) > scatterplot3d(x2[, 1], x2[, 2], probs, angle = 220, color = "blue", pch = 16, + main = expression(paste("Gumbel ", alpha, " = 2"))) |
Clayton Copula
> library(copula) > n <- 5000 > param.cop <- 10 > dim.cop <- 2 > cop.clayton <- archmCopula(family = "clayton", param = param.cop, dim = dim.cop) > mvd.clayton <- mvdc(copula = cop.clayton, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 2), list(mean = 0, sd = 2))) > x1 <- rcopula(cop.clayton, n) > param.cop <- 2 > dim.cop <- 2 > cop.clayton <- archmCopula(family = "clayton", param = param.cop, dim = dim.cop) > mvd.clayton <- mvdc(copula = cop.clayton, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 2), list(mean = 0, sd = 2))) > x2 <- rcopula(cop.clayton, n) > par(mfrow = c(1, 2)) > plot(x1[, 1], x1[, 2], col = "blue", xlab = "", ylab = "", pch = 16, main = expression(paste("Clayton ", + alpha, " = 10"))) > plot(x2[, 1], x2[, 2], col = "blue", xlab = "", ylab = "", pch = 16, main = expression(paste("Clayton ", + alpha, " = 2"))) |
Clayton Level Plots
> par(mfrow = c(1, 1)) > contour(mvd.clayton, dmvdc, xlim = c(-6, 6), ylim = c(-6, 6), main = expression(paste("Clayton ", + alpha, " = 2"))) |
Clayton Density Plots
> par(mfrow = c(1, 1)) > probs <- dmvdc(mvd.clayton, x2) > scatterplot3d(x2[, 1], x2[, 2], probs, angle = 110, color = "blue", pch = 16, + main = expression(paste("Clayton ", alpha, " = 2"))) |
Frank Copula
> library(copula) > n <- 5000 > param.cop <- 10 > dim.cop <- 2 > cop.frank <- archmCopula(family = "frank", param = param.cop, dim = dim.cop) > mvd.frank <- mvdc(copula = cop.frank, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 2), list(mean = 0, sd = 2))) > x1 <- rcopula(cop.frank, n) > param.cop <- 2 > dim.cop <- 2 > cop.frank <- archmCopula(family = "frank", param = param.cop, dim = dim.cop) > mvd.frank <- mvdc(copula = cop.frank, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 2), list(mean = 0, sd = 2))) > x2 <- rcopula(cop.frank, n) > par(mfrow = c(1, 2)) > plot(x1[, 1], x1[, 2], col = "blue", xlab = "", ylab = "", pch = 16, main = expression(paste("Frank ", + alpha, " = 10"))) > plot(x2[, 1], x2[, 2], col = "blue", xlab = "", ylab = "", pch = 16, main = expression(paste("Frank ", + alpha, " = 2"))) |
Frank Level Plots
> par(mfrow = c(1, 1)) > contour(mvd.frank, dmvdc, xlim = c(-6, 6), ylim = c(-6, 6), main = expression(paste("Clayton ", + alpha, " = 2"))) |
Clayton Density Plots
> par(mfrow = c(1, 1)) > probs <- dmvdc(mvd.frank, x2) > scatterplot3d(x2[, 1], x2[, 2], probs, angle = 110, color = "blue", pch = 16, + main = expression(paste("Clayton ", alpha, " = 2"))) |
Takeaway
- Gaussian - Symmetric and no tail dependence
- tCopula - Symmetric and tail dependence
- Gumbel - Asymmetric Upper tail dependence
- Clayton - Asymmetric Lower tail dependence
- Frank - Symmetric and weak tail dependence