| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

RandomNumbers

This version was saved 18 years, 2 months ago View current version     Page history
Saved by PBworks
on January 24, 2006 at 11:45:05 am
 

Random Number Generation

 

Summary of topic

 

This page discusses random number generation, which could be useful to actuaries in monte-carlo simulation, stoctastic modelling etc.

 

Those working on the topic

 

Declan Lavelle - declanlavelle@hld.ie

 

Getting Started

 

For many actuarial applications involving monte-carlo simulation the Excel random number generator may not be suitable due to the relatively low period of the Excel random number generator, and problems of low order serial correlation in the numbers generated. For a brief discussion of these issues see Appendix E of this this paper by Carrett and Wong from the Australian Institute of Actuaries.

 

In their paper Carrett and Wong suggest the use of the Parks Miller Algorithm with Bayes Durham shuffle in preference to the Excel random number generator. This algorithm has been suggested as a “Minimal Standard” for pseudo-random number generators, and is described in detail in chapter 7 of “Numerical Recipes in C : The Art of Scientific Computing”.

 

An Excel Implementation of Parks Miller Bayes Durham Algorithm

 

This spreadsheet contains a VBA implementation of the algorithm. You will need to download the workbook to get it to work, as it needs to write the random number file to your PC. The macro allows the user to generate a csv file of random numbers. Each row corresponds to a “simulation” and each simulation can contain a user-defined number of random numbers. Leave the seed value blank to have a randomly chosen seed. Alternatively, to regenerate a file based on a known seed, key in the required seed value.

 

I would welcome any reviews, corrections, efficiency improvements of the VBA code. Feel free to use to use, modify or correct this spreadsheet as you wish. There are no guarantees as to its accuracy!


 

Comments

 

Add your comments here

Comments (0)

You don't have permission to comment on this page.