1

I would like to create a tool for generating a stochastic time-series distribution, for which I can provide the parameters (for a normal distribution) the mean, standard deviation, skewness and kurtosis. There is a similar question here using R, but I am not able to interpret this and put it in MATLAB.

Is there something that someone knows can do this already? (I haven't been able to find anything)

If not, what would be some good advice for starting something of my own? Any known useful functions? I would also like to be able to build upon it afterwards, for example: adding outliers, clusters of volatility, adjusting heteroscedasticity.

I realise me saying 'stochastic' and then in the same sentence 'given parameters' may seem odd, but it isn't - I want each time point to be random, but the parameters to describe, say 10,000 time points.

Community
  • 1
  • 1
n1k31t4
  • 2,745
  • 2
  • 24
  • 38
  • Check out [ARMA](http://en.wikipedia.org/wiki/Autoregressive–moving-average_model) models. By the way, if you have normal residuals then there is no skewness or kurtosis. – pjs May 19 '14 at 16:35
  • 1
    I think that this answer from @csgillespie here: http://stackoverflow.com/a/4810316/2079591 is the one you are looking for. I do not think the accepted answer is "right"; you can do what is described there using in MATLAB though: directions are presented in the link [Generating Data Using the Johnson System](https://www.mathworks.com/help/stats/generating-data-using-flexible-families-of-distributions.html#br5k833-5). – usεr11852 May 19 '14 at 18:30

1 Answers1

1

If you're looking for the equivalent of the solution in R, Matlab's Statistics Toolbox has limited support for the Johnson and Pearson distribution systems. In particular, the johnsrnd function produces random variates for the Johnson system. The Pearson system and pearsrnd, however, takes moments directly.

A big caveat. Using moments to describe or fit or produce random variates – often referred to as moment matching – is not robust and poorly regarded by statisticians. They're not guaranteed to uniquely define a distribution unless you have the entire moment generating function.

Community
  • 1
  • 1
horchler
  • 18,384
  • 4
  • 37
  • 73