**Econometric Sense**, and kindly contributed to R-bloggers)

From: In defense of the Gaussian copula, The Economist

*“The Gaussian copula provided a convenient way to describe a relationship that held under particular conditions. But it was fed data that reflected a period when housing prices were not correlated to the extent that they turned out to be when the housing bubble popped.”*

Decisions about risk, leverage, and asset prices would very likely become more correlated in an environment of centrally planned interest rates than under ‘normal’ conditions.

Simulations using copulas can be implemented in R. I’m not an expert in this, but thanks to the reference Enjoy the Joy of Copulas: With a Package copula** **I have at least gained a better understanding of copulas.

A copula can be defined as a multivariate distribution with marginals that are uniform over the unit interval (0,1). Copula functions can be used to simulate a dependence structure independently from the marginal distributions.

Based on Sklar’s theorem the multivariate distribution F can be represented by copula C as follows:

_{1}…x

_{p}) = C{ F

_{1}(x

_{1}),…, F

_{p}(x

_{p})}

_{i}(x

_{i}) is a uniform marginal distribution.

*“Due to its simplicity and familiarity, the Gaussian copula is popular in the calculation of risk in collaterized debt obligations. But the Gaussian copula imposes asymptotic independence such that extreme events appear to be unrelated. This restriction might be innocuous in normal times, but during extreme events, such as the housing crisis, the Gaussian copula might be inappropriate”*

**References:**

**The Role of Copulas in the Housing Crisis.**The Review of Economics and Statistics. Accepted for publication. Posted Online December 8, 2010. David M. Zimmer. Western Kentucky University.

**Enjoy the Joy of Copulas: With a Package copula.**Journal of Statistical Software Oct 2007, vol 21 Issue 1.

# *------------------------------------------------------------------

# | PROGRAM NAME: R_COPULA_BASIC

# | DATE: 1/25/11

# | CREATED BY: Matt Bogard

# | PROJECT FILE: P:\R Code References\SIMULATION

# *----------------------------------------------------------------

# | PURPOSE: copula graphics

# |

# *------------------------------------------------------------------

# | COMMENTS:

# |

# | 1: REFERENCES: Emjoy the Joy of Copulas: With a Package copula

# | Journal of Statistical Software Oct 2007, vol 21 Issue 1

# | http://www.jstatsoft.org/v21/i04/paper

# | 2:

# | 3:

# |*------------------------------------------------------------------

# | DATA USED:

# |

# |

# |*------------------------------------------------------------------

# | CONTENTS:

# |

# | PART 1:

# | PART 2:

# | PART 3:

# *-----------------------------------------------------------------

# | UPDATES:

# |

# |

# *------------------------------------------------------------------

library("copula")

set.seed(1)

# *------------------------------------------------------------------

# |

# |scatterplots

# |

# |

# *-----------------------------------------------------------------

# normal (Gausian?) Copula

norm.cop <- normalCopula(2, dim =3)

norm.cop

x <- rcopula(norm.cop, 500)

plot(x)

title("Gaussian Copula")

# Clayton Copula

clayton.cop <- claytonCopula(2, dim = 2)

clayton.cop

y <- rcopula(clayton.cop,500)

plot(y)

title("Clayton Copula")

# Frank Copula

frank.cop <- frankCopula(2, dim = 2)

frank.cop

f <- rcopula(frank.cop,500)

plot(f)

title("Frank Copula")

# Gumbel Copula

gumbel.cop <- gumbelCopula(2, dim = 2)

gumbel.cop

g <- rcopula(gumbel.cop,500)

plot(g)

title('Gumbel Copula')

# *------------------------------------------------------------------

# |

# | contour plots

# |

# |

# *-----------------------------------------------------------------

# clayton copula contour

myMvd1 <- mvdc(copula = archmCopula(family = "clayton", param = 2),

margins = c("norm", "norm"), paramMargins = list(list(mean = 0,

sd = 1), list(mean = 0, sd = 1)))

contour(myMvd1, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3))

title("Clayton Copula")

# frank copula contour

myMvd2 <- mvdc(copula = archmCopula(family = "frank", param = 5.736),

margins = c("norm", "norm"), paramMargins = list(list(mean = 0,

sd = 1), list(mean = 0, sd = 1)))

contour(myMvd2, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3))

title("Frank Copula")

# gumbel copula

myMvd3 <- mvdc(copula = archmCopula(family = "gumbel", param = 2),

margins = c("norm", "norm"), paramMargins = list(list(mean = 0,

sd = 1), list(mean = 0, sd = 1)))

contour(myMvd3, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3))

title("Gumbel Copula")

Created by Pretty R at inside-R.org

**leave a comment**for the author, please follow the link and comment on his blog:

**Econometric Sense**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...