To go back to the original post, if you are interested in random generation of plausible-looking stock price data, do have a look at mathematician Benoit Mandelbrot's fascinating book, "The (Mis)behaviour of Markets".
If the name sounds familiar to you, it's probably because he's better known as the father of fractal geometry; the famous Mandelbrot Set is named after him. However, he also did a great deal of work at IBM on stock analysis, likely before most of us were born.
In the book I cited he claims that simply generating random up/down movements isn't enough: that better results can be had by generating sequences which are "fractal in price, fractal in time". Sadly he doesn't provide any algorithms or code, but I guess that is, as they say, left as an exercise for the reader.
Posted by Martin Janzen