[tech-spec] Random Number Generation

  • From: Andrew Moe <moebot@xxxxxxxxxxx>
  • To: tech-spec@xxxxxxxxxxxxx
  • Date: Fri, 3 Dec 2004 11:36:33 -0800 (PST)

I'm doing several studies on random trading in the markets and wish to make
sure I'm getting a true proxy for randomness.  Currently using perl's built in
rand function like this:

$number = int(rand(100));

Gives a random number between 1 and 100.

Using this function over a large number of simulations, a random trader's
average trade converges to the vig/trade or to 0 with no vig - as one would
expect, so it seems I'm getting good randomness.  However I realize the
limitations of the rand function and am wondering if anyone here has a better
method. Or is this type of rand function sufficient for an analysis of random

Andrew Moe

Other related posts: