Given that I have the mean, standard deviation, skewness and autocorrelation, How do I generate 1000 years of random data based on the above parameters in python or Matlab?

I know for example I can use Scipy's skewnorm to generate data based on the mean, std and skewness alone. I can also generate data with Autoceralation by developing an AR model. Am just not sure how to combine the two or if there is a much simpler way of doing this?


First generate independent data X(1), X(2), ... with mean zero, variance 1, and the desired skewness, e.g. from gamma, Weibull, skew-normal or other distrtibution (you will have to linearly transform to fix the mean and variance).

Then you set Z(t) = r*X(t-1) +X(t), where r is your desired autocorrelation.

Then linearly transfrom Z(t) to get the desired mean and variance.

This works if you have defined skew in the standard way that is affine-invariant.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.