lundi 29 mars 2021

Random numbers simulating stock market returns

Let me say right from the beginning that I know just a little bit about statistics, but not enough to figure out this problem.

I'm trying to create a list of n random floating point numbers to simulate annual stock market returns. The numbers should range from -30.0 to +30.0 with an average of 7.0. The numbers should be distributed mostly around the average, but they should be well distributed. Basically, it should be a flattened bell curve, so there should be a good chance of having some negative numbers as well as some numbers closer to the upper limit.

I know numpy has functions to create random numbers that are distributed in different ways, but not sure how to specify these parameters.




Aucun commentaire:

Enregistrer un commentaire