[R] fitting mixture of normals distribution to asset return data

Christian Hennig chrish at stats.ucl.ac.uk
Wed Nov 25 18:57:18 CET 2009


Dear John,

I don't know what the "exp" stuff in your line below is about, but 
mclustBIC in package mclust does fit normal mixtures.
Try for a start
library(mclust)
mmm <- mclustBIC(data,G=2)
mmms <- summary(mmm)
mmms

If you want to learn more, read the documentation.

Christian

On Wed, 25 Nov 2009, John Seppänen wrote:

> Hi,
>
> I have a 15 years of monthly return data (180 observations) from instruments
> that have non-normal return distributions. Thus, I would like to fit a
> mixture of normal distribution to each of the series. So, that I would be
> able to simulate from the marginal distributions like this:
>
> asset.1<-exp(c(rnorm(500,-0.07,0.02),rnorm(9500,0.05,0.05)))-1
>
> My problem is that I have tried to use Google and go through some packages
> (eg mixtools & mclust) but haven't been able to find a function to fit the
> mixture of normals. I would like to have two different states of world and
> then get the probabilities and the mean and sigma in those states (as in the
> example above).
>
> I am newbie in this subject so if someone could point me a R function for
> this, I'd really appreciate it...
>
> br,
> John
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>

*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche


More information about the R-help mailing list