RE: Problem with random seed
Posted by Luigi Ballabio-2 on May 15, 2003; 1:45am
URL: http://quantlib.414.s1.nabble.com/Problem-with-random-seed-tp10243p10245.html
At 12:21 AM 5/15/03 +0200, Jens Thiel wrote:
>Some quick ideas here:
>
>- use high-resolution performance counters (QueryPerformanceCounter)
>- use GUIDs (eg. CoCreateGuid) to get some 128 unique bits
>- use a master RNG to deliver seeds (use a different alg. here)
>- get a seed only once, and reseed with (++seed)
Another quick one:
- Use a global RNG, instead of creating one each time you call MonteCarloPath.
Write another function to reinitialize it with a given seed if one wants to
do so.
This would also make your simulations more akin to what's usually
done---i.e., create a RNG, and make paths by using successive draws from
that one RNG. I don't think there's many people around reinitializing the
generator for each path.
Bye,
Luigi