So I've got a Monte Carlo simulation runnng in Java. What's the bext way to test it? (currently I have to run it manually many times to get a range of results)
So I've got a Monte Carlo simulation runnng in Java. What's the bext way to test it? (currently I have to run it manually many times to get a range of results)
Well what exactly are you simulating ? Let's say you are simulating a geometric brownian motion, you can look at the distribution's property (so you will need to store results) at a given time of your simulation and compare with the mean and std deviation you should be obtaining.
You should check for actual values. Take a computable example and compare the simulated outcome with the actual one. That's what I asked first, if you need an example then consider the above post suggesting to simulate a brownian motion and compare the simulated and actual characteristics.
It all depends on what you are simulating. If an analytic solution exists, you can compare it to that. If not, compare it to some other numerical solution. If no known solution exists, then for example you can fit it to a normal distribution and find out the confidence intervals. You can then increase the number of samples and see how impacts the confidence intervals.
You might want to employ the outcomes of other simulation techniques to compare to that one. Knowing the particular problem would let us give more specific suggestions. I like the above post, you can employ central limit theorem to the distribution and compare the result to simulated impact.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.