Random numbers with a bias

  • Thread starter Thread starter mbn18
  • Start date Start date
M

mbn18

Hi,
for a stock simulation I need random numbers with a defined bias, i.e
not a normal distribution.

Let's say my stock trading system has a win probability of 60%.

The bias-random generator should give me 100 numbers between minus 2
and 150, representing the gains and losses in percent. The probabilit
of the gains should be e.g. 60%.

Any idea how to accomplish this.
Thanks in advance.

Michae
 
for a stock simulation I need random numbers with a defined bias, i.e.
not a normal distribution.

Let's say my stock trading system has a win probability of 60%.

The bias-random generator should give me 100 numbers between minus 25
and 150, representing the gains and losses in percent. The probability
of the gains should be e.g. 60%.

Any idea how to accomplish this.

Buying a book on statistical simulation would be one idea.

You're misusing the term 'bias'. What you're after is positive skewness. One
possibility would be a Lognormal distribution shifted so it's 40th percentile
corresponds to 0. The needed formula would look something like

=LOGINV(RAND(),mu,sigma)-LOGINV(0.4,mu,sigma)

though it'd make a lot of sense to enter LOGINV(0.4,mu,sigma) into a separate
cell, name it LND40PCT and use that reference in the formula above.

The lognormal distribution could give positive values much greater than 150%
since it's unbounded above. You could, alternatively, use censored lognormal
deviates or use deviates from a Beta distribution with finite support, using
BETAINV with appropriate parameters.

I'm not going any further. Either this is for a course, for your own investment
analysis, or for such an analysis for the benefit of others. In all three cases,
you're better off learning how to do this on your own than being handed a
possible error-ridden packaged solution that you'd have no clue how to check for
reasonableness/correctness.
 
Back
Top