RiskAMP: Latest News

Free MTRand Add-in

May 27, 2008

To generate random values for use in a simulation, we use a version of the Mersenne Twister algorithm. This random number generator (technically a pseudo-random number generator, or PRNG) is particularly well-suited to running Monte Carlo simulations as it has a very long period, and it’s far superior to the random number function built into Excel.

Having a good random number generator can be useful outside of running simulations, however, so we’re happy to provide a simple plug-in that adds this function to Excel. The MTRand add-in adds a single function, MTRand(), which generates a random value.

MTRand Add-in Page

We’re providing the MTRand add-in free of charge, and the source code is available for use or modification. You’re welcome to use the add-in and source code for any purpose, subject to the license terms noted on the page.