# Mark Johnson - Monte Carlo Resampling of Equity Curves Using N-Bar Segments

*Monte Carlo Simulation of your trading system*

*Monte Carlo Simulation of your trading system*

*NOTE: Advanced topic. Make sure to read previous parts of the tutorial first. In order to interpret properly Monte Carlo simulation results **you need to** read this section of the manual. Non-trivial settings and non-obvious details are explained below. Please don't skip it.*

**Introduction**

Generally speaking "Monte Carlo" methods represent broad class of computer algorithms that use repeated random sampling to obtain statistical properties of given process. It was invented by Polish mathematican Stanislaw Ulam working on nuclear weapons projects at the Los Alamos lab. As he was unable to analyse complex physical processes using conventional mathematical methods, he thought that he could set up a series of random experiments, observe the outcomes and use them to derive statistical properties of the process.

More on Monte Carlo methods in general can be found here: https://en.wikipedia.org/wiki/Monte_Carlo_method

In trading system development, Monte Carlo simulation refers to process of using randomized simulated trade sequences to evaluate statistical properties of a trading system.

There are many ways to perform actual computations that differ when it comes to implementation details, but probably the most straightforward and reliable is bootstraping method that performs random sampling with replacement of actual trade list generated by the back-test.

See https://en.wikipedia.org/wiki/Bootstrapping_(statistics) for detailed discussion of bootstrapping method.

Various Monte Carlo simulation methods allow to verify robustness of the trading system, find out probability of ruin and many other statistical properties of the trading system.