====== Monte Carlo ====== Monte Carlo is the best tool for testing the strategy robustness. When you create a strategy, you see its backtest statistics. However, there is a problem -the strategy might be over-optimized. The goal of the Monte Carlo tool is to verify that the strategy is not over-optimized. The Monte Carlo tool allows you to change the market data, the execution of the strategy and the strategy’s indicators numeric parameters. If you make minor changes to the strategy and its environment, and it continues to have good profits, this means that the strategy has a good chance to make money in the real market. On the other hand – if you make some minor changes and the strategy’s profits crumble – it means that this strategy is over-optimized and thus, is a bad choice to trade. The FSP Pro Monte Carlo tool can simulate changes in the market conditions, strategy execution problems and changes in the strategy. When you run the Monte Carlo tool, you actually do not run a single test but 20 (by default) tests. Each test can use one or more simulations. {{:fsbpro_guide:monte_carlo.png|Monte Carlo}} ===== 1. Simulations ===== {{:fsbpro_guide:monte_carlo_tests.png?200|Monte Carlo Tests}} ==== 1.1 Market variation ==== **Randomize history data** - the program will change the bar range. It can change the bar’s Low and High values in both directions. This will result in having higher or shorter bars. You can set how much these values can change in the Options. This option does not change Open and Close prices. This is why some indicators, which use only the Close price, may not change. **Randomize spread** - If this option is enabled the program can set the spread to a different value. It might vary within the borders set in Options. By default, FSB Pro runs its backtests with a constant spread. However, spreads in real world can change with each trade. ==== 1.2 Execution problems ==== These options test problems with the strategy execution. Such things do happen in the real world, so it is wise to test if the strategy is resilient enough to such events. **Randomly skip position entries** - will just skip opening some of the positions. This sometimes happens in the real world. It might occur due to problems on the broker side, internet connection issues or slowness in the machine executing the strategy. **Randomly skip position exits** –works as the previous one, but for exiting positions. This one of course is much more important, since not closing a position in time might result in loss. **Randomly close positions** – Simulates problems with the broker. Tests what will happen if the broker for some reason sometimes closes your positions. **Randomize slippage** – slippage is present on markets, where the prices change fast. It might happen that the price changes by one or two ticks, while the program sends the order and the broker computes it. ==== 1.3 Strategy variation ==== **Randomize indicator parameters** – FSB Pro comes with this option off by default. This is because usually strategies do not change. If enabled will choose some of the indicators in the strategy and change their numeric values by a certain percentage. If you have an over-optimized strategy, even minor changes in parameters will make its profits drop significantly or will even lose money. **Randomize backtest starting bar** - will randomize starting bar of the test. ===== 2. Options ===== {{:fsbpro_guide:monte_carlo_options.png?200|Monte Carlo Options}} The options hold the numeric values for the different simulations. **Number of tests** – lets you choose how many tests you want to run and display on the Tests Chart ==== 2.1 Market variation ==== **Number of changed bars** - what percentage of the bars will be changed **Data range change ATR** - how much the bar prices can change, compared to the bar’s height. (ATR stands for “average true range”, the “averaged range of the bar”) **Spread range in points** – range, within which the spread can change. The Monte Carlo tool will use a different spread for each position. ==== 2.2 Execution problems ==== **Skip entry probability** - chance to skip an entry. **Skip exit probability** – chance to skip closing a position. **Close position probability** – chance to close a position within each bar. **Slippage range** – minimum and maximum slippage values. ==== 2.3 Strategy variation ==== **Ind. param change probability** – chance to change an indicator parameter value. If the value of this field were 20% (as it is by default), then around 80% of the parameters of the indicators in a strategy would remain as they are. **Ind. param max change** – shows how much the changed parameter’s value can fluctuate. Reset button - resets all the fields within Simulations and Options to their default values ===== 3. Test Chart ===== {{:fsbpro_guide:monte_carlo_tests_chart.png?no-link|Monte Carlo Tests Charts}} Here you can see each of the tests, drawn with a different color. The more tests you run, the easier you can see the zone that is statistically most probable to occur when trading. ===== 4. Confidence Table ===== {{:fsbpro_guide:monte_carlo_confidence_table.png?400|Monte Carlo Confidence Table}} This table shows different statistics from the testing. The first row shows the initial strategy (the one you are using the Monte Carlo tool on). The first column shows the percentage of tests that showed results better than the current row. “Confidence” column shows the probability for the profit to be higher than the “Net Balance” value. For example in the screenshot above, you see the last row shows 95% confidence. This assures us if we trade this strategy, we could expect it to make at least 52,000 over the given period. This tool, on its own, cannot guarantee for the strategy’s success when trading. ~~DISQUS~~