My question is about the required number of simulations for Monte Carlo analysis method. As far as I see the required number of simulations for any allowed percentage error $E$ (e.g., 5) is $$ n = \left\{\frac{100 \cdot z_c \cdot \text{std}(x)}{E \cdot \text{mean}(x)} \right\}^2 , $$

where $\text{std}(x)$ is the standard deviation of the resulting sampling, and $z_c$ is the confidence level coefficient (e.g., for 95% it is 1.96). So in this way it is possible to check that the resulting mean and standard deviation of $n$ simulations represent actual mean and standard deviation with 95% confidence level.

In my case I run the simualtion 7500 times, and compute moving means and standard deviations for each set of 100 sampling out of the 7500 simulations. The required number of simulation I obtain is always less than 100, but % error of mean and std compare to mean and std of entire results is not always less than 5%. In most cases the % error of mean is less than 5% but the error of std goes up to 30%.

What is the best way to determine number of required simulation without know actual mean and std (in my case subjected outcome of simulation is normally distributed)?

Thanks in advance for any help.

In order to have an idea about what may distribution of simulation results look like when iteration is run infinite number of times: Instead of using resulted mean and variance after n number of simulations, I've decided to find a fit function of resulted distribution, but here n has to fullfill allowed % error. I think on that way I can find more correct results on cumulative distrubution function that is related with e.g. 97.5%. Because when I compare the results of 400 and 7000 simulation, fit functions of distribution for both sampling looks like each other only curve of 2nd one is smoother. Also, hence model in MATLAB/Simulink is nonlinear, although generated input parameters are normal distributed, resulted histogram of simulations are not normal for that reason I used "generalized extreme value distribution", which is named as 'gev' in MATLAB. But still, I am quite not sure about this methodolgy, thanks for any command in advance

  • $\begingroup$ as far as I see when the outcomes of simulation is evaluated by any pass criteria, it is possible to find out required number of simulation for any confidence level, but in my case I want to find out mean and variance of entire result with specific confidence level with any finite number of iterations. Hence for any n samples, variance is used to define interval of mean, but indeed I need variance as well to find any value that may represents CPDF of 0.975. thanks for any comment $\endgroup$
    – maxwell
    May 3, 2014 at 12:08

1 Answer 1


I usually conduct the convergence study, and determine the number of simulations required, then use this number in subsequent simulations. I also throw a warning if the error is larger than suggested by the chosen number.

The typical way to determine the required number of simulations is by computing the variance of the simulation $\hat\sigma_N^2$ for N paths, then the standard error is $\frac{\hat\sigma_N}{\sqrt{N}}$, see section on error estimation of MC in "Monte Carlo Methods in Finance" by Peter Jackel, also a chapter "Evaluating a definite integral" in Sobol's little book

Alternatively, you could compute the error for each simulation, and stop when it goes beyond certain threshold or max number of paths is reached, where this number was again determined by the convergence study.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.