I fitted a gaussian mixture to my financial data. The data can be found
here: http://uploadeasy.net/upload/32xzq.rar

I look at the density with

plot(density(dat),col="red",lwd=2)


this has a skew of

library(e1071)
skewness(dat)

-0.1284311

Now, I fit a gaussian mixture according to:

f(l)=πϕ(l;μ1,σ21)+(1−π)ϕ(l;μ2,σ22)


with:
datnormalmixturegaussian<-normalmixEM(dat,lambda=c(0.3828,(1-0.3828)),k=2,fast=TRUE)

save the values with:
pi<-datnormalmixturegaussian$lambda[1]
mu1<-datnormalmixturegaussian$mu[1]
mu2<-datnormalmixturegaussian$mu[2]
sigma1<-datnormalmixturegaussian$sigma[1]
sigma2<-datnormalmixturegaussian$sigma[2]

the values are:
pi = 0.383
mu1= -0.00089
mu2= 0.00038
sigma1= 0.0123
sigma2= 0.02815

Plot the single densities and the mixture:

plot.new()
xval<-seq(-0.06,0.06,length=1000)
mixturedensity<-pi*dnorm(xval,mu1,sigma1)+(1-pi)*dnorm(xval,mu2,sigma2)
plot(xval,mixturedensity,type="l",lwd=2,col="black",cex.axis=1.2,cex.lab=1.2,main="Single
univariate normal densities and mixture
density",xlab="Loss",ylab="Density",ylim=c(0,36))
curve(dnorm(x,mu1,sigma1),add=TRUE,lty=2,col="darkgreen")
curve(dnorm(x,mu2,sigma2),add=TRUE,lty=2,col="blue")

legend("topright",
 legend=c("Mixture density\n","normal distribution\n of stable market
regime\n","normal distribution\n of crash market regime\n"),
 bty = "n",lwd=2, cex=1, col=c("black","blue","darkgreen"), lty=c(1,2,2))

One can see, that both single distributions have a mean of almost zero,
wherease one has a high volatility
and the other a low volatility. The normal distribution 1, the green one
with the high peak has the parameters
mu1= -0.00089 and sigma1=0.0123 and occurs (this is pi from output of
normalmixEM) with a probability of 0.383.

The normal distribution 2 with the smaller peak and the higher volatility
has the parameters
mu2=0.00038 and sigma2=0.02815 and a probability of 1-0.383.

I imagine the generating of the mixture density as follows:
We have a distribution which is quite probable (1-0.383) and has
mu2=0.00038. If the mixture density
is done, we "add" a second distribution which is a bit shifted to the left
(this one occurs with a probability of
0.383 and has a negative mean). Since the distribution we add lies a bit
more to the left I would expect, that the
mixture density has a negative skew, since the left tail of the resulting
mixture will be heavier?

I control this with:

skewness(mixturedensity)

which gives a positive skew of 0.7065.

Now my question is: Why? I would expect a negative skew, since I thought
the mixture density will have a a fatter left tail, since we add to the
probable distribution with positive mean a second distribution which is a
bit shifted to the left?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to