I've always had only a vague idea how copulas work, so it was really refreshing and enlightening to read "Everything you always wanted to know about copula modeling but were afraid to ask" in the Journal of Hydrologic Engineering. Here is a non-gated version. Here is how I understand the concept:
Say you have a data set consisting of 500 observations of the returns of two assets (500x2). A scatterplot with marginal densities looks as follows:
Asset 1 has a mean of 0 and a standard deviation of 1% and Asset 2 has a mean of 0 and a standard deviation of 2%. The marginal distributions appear normal but the data are clearly not bivariate normal. There seems to be tail-dependence, i.e. we see co-movements in extreme situations. Now since we know that the t copula is capable of modeling exactly such behaviour, we tell our statistical software to find for our individually normally distributed data the parameters (ρ, ν) for the t copula which produces a joint cumulative distribution function closest to our empirical one:
.

With our parameter estimates for the t copula (ρe=0.5, νe=2.5) we can know simulate as much data (with hopefully the same statistical properties as our small sample) as we wish. Here is the plot of 10,000 random variates:
As you can imagine, in most cases it's easier to run a simulation then to come up with the analytic solution.
Unfortunatley, the t copula produces ugly "wings", i.e. dependence in the upper-left and lower-right quadrant. This is something you actually don't observe in financial data and gives you reason to believe that my small sample of returns was actually generated using a t copula. A counter plot will help you see how ugly those wings really are. Looks like a pad:

So if you can recommend certain copulas for modelling tail-dependence, please let me know!
R: A Language and Environment for Statistical Computing, R Development Core Team, R Foundation for Statistical Computing, Vienna, Austria
related items:
Enjoy the Joy with Copulas: With a Package Copula, J. of Statistical Software
The t Copula and Related Copulas, ETH

Say you have a data set consisting of 500 observations of the returns of two assets (500x2). A scatterplot with marginal densities looks as follows:
Asset 1 has a mean of 0 and a standard deviation of 1% and Asset 2 has a mean of 0 and a standard deviation of 2%. The marginal distributions appear normal but the data are clearly not bivariate normal. There seems to be tail-dependence, i.e. we see co-movements in extreme situations. Now since we know that the t copula is capable of modeling exactly such behaviour, we tell our statistical software to find for our individually normally distributed data the parameters (ρ, ν) for the t copula which produces a joint cumulative distribution function closest to our empirical one:.

With our parameter estimates for the t copula (ρe=0.5, νe=2.5) we can know simulate as much data (with hopefully the same statistical properties as our small sample) as we wish. Here is the plot of 10,000 random variates:
As you can imagine, in most cases it's easier to run a simulation then to come up with the analytic solution.Unfortunatley, the t copula produces ugly "wings", i.e. dependence in the upper-left and lower-right quadrant. This is something you actually don't observe in financial data and gives you reason to believe that my small sample of returns was actually generated using a t copula. A counter plot will help you see how ugly those wings really are. Looks like a pad:

So if you can recommend certain copulas for modelling tail-dependence, please let me know!
R: A Language and Environment for Statistical Computing, R Development Core Team, R Foundation for Statistical Computing, Vienna, Austria
related items:
Enjoy the Joy with Copulas: With a Package Copula, J. of Statistical Software
The t Copula and Related Copulas, ETH

Mahalanobis - am 2009-01-07 08:14 - Rubrik: finance
Mahalanobis meinte am 7. Feb, 21:15:
Replication
R code for first graph:library(copula)
myCop.t <- tCopula(param=0.5, dim=2, dispstr = "ex")
myMvd <- mvdc(copula = myCop.t, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, sd =1), list(mean = 0, sd=2)))
return <- rmvdc(myMvd,500)
x <- return[,1]
y <- return[,2]
xhist <- hist(x, breaks=30, plot=FALSE)
yhist <- hist(y, breaks=30, plot=FALSE)
top <- max(c(xhist$counts, yhist$counts))
xrange <- c(-4,4)
yrange <- c(-6,6)
nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE), c(3,1), c(1,3), TRUE)
par(mar=c(3,3,1,1))
plot(x, y, xlim=xrange, ylim=yrange, xlab="", ylab="")
par(mar=c(0,3,1,1))
barplot(xhist$counts, axes=FALSE, ylim=c(0, top), space=0)
par(mar=c(3,0,1,1))
barplot(yhist$counts, axes=FALSE, xlim=c(0, top), space=0, horiz=TRUE)
ohama (guest) antwortete am 13. Jun, 18:04:
Could you also add the code for the third graph? I have not used contour plots so far, therefore it would be really helpful...
Teresa Lo (guest) meinte am 24. Feb, 03:24:
Recipe for Disaster: The Formula That Killed Wall Street
Here's an excerpt from Felix Salmon's article in Wired:
For five years, Li's formula, known as a Gaussian copula function, looked like an unambiguously positive breakthrough, a piece of financial technology that allowed hugely complex risks to be modeled with more ease and accuracy than ever before. With his brilliant spark of mathematical legerdemain, Li made it possible for traders to sell vast quantities of new securities, expanding financial markets to unimaginable levels.They finally have the fall guy.
Mahalanobis antwortete am 24. Feb, 10:56:
It's
a nice remake of the 2005 WSJ article How a Formula Ignited a Market that Burned Some Big Investors but hardly investigative journalism. Eric referred to it back then on this blog. And saying that the Gaussian copula function is "Li's formula" is like saying that somebody who first applied the Haar wavelet to analyse financial data was the one who came up with the formula. Maybe I should work on my comparisons.
james (guest) meinte am 9. Nov, 22:25:
I think there is definitely so much that you can get from this great read. I was able to get so much from what it offered like you did. Glad to see so much coming from it. Great writing on this article. windows and doors improvement