Create and Test Forex Strategies
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
eas-guide:monte-carlo [2018/01/09 12:48] – yavor | eas-guide:monte-carlo [2019/04/06 14:37] – ?nolink in image tags vini | ||
---|---|---|---|
Line 2: | Line 2: | ||
- | 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 (a.k.a curve fitted). The goal of the Monte Carlo tool is to verify that the strategy is not over-optimized. This tool allows you to randomly change | + | 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 (curve fitted). The goal of the Monte Carlo tool is to verify that the strategy is not over-optimized. This tool allows you to apply random changes to the market data, the execution of the strategy and the numeric parameters of the strategy indicators. |
If you make minor changes to the strategy and its environment, | If you make minor changes to the strategy and its environment, | ||
- | On the other hand – if you make some minor changes and the strategy' | + | On the other hand – if you make some minor changes and the strategy profits crumble – it means that this strategy is over-optimized and thus, it is a bad choice to trade. |
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | When you run the Monte Carlo tool, you actually do not run a single test but 20 (by default) tests. Each test is random can use one or more simulations. | + | When you run the Monte Carlo tool, you actually do not run a single test but 20 (by default) tests. Each test is random. It can use one or more simulations. |
</ | </ | ||
Line 18: | Line 18: | ||
Here you can choose the simulations that will be used in the Monte Carlo tests. You select optional parameters for each simulation from the **Options** tab. | Here you can choose the simulations that will be used in the Monte Carlo tests. You select optional parameters for each simulation from the **Options** tab. | ||
- | {{ : | + | {{ : |
**Market variations** | **Market variations** | ||
- | * **Randomize history data** - This will change the bar range of a certain number of bars. It can change the bar’s Low and High values in both directions. This will result in having higher or shorter bars. | + | * **Randomize history data** - The tool will take a certain number of random |
- | * **Randomize spread** - If this is enabled EA Studio can set the spread to a different value. It might vary within the borders set in Options. | + | * **Randomize spread** - If this option |
- | **Execution problems** - Those are related to problems when executing the signals | + | **Execution problems** - Those are related to problems when executing the signals |
- | * **Randomize slippage** - Slippage is present on markets, where the prices change fast. It might happen that the price changes by one or two ticks, | + | * **Randomize slippage** - Slippage is present on markets, where the prices change fast. It might happen that the price changes by one or two ticks, |
- | * **Randomly skip position entry** - 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 | + | * **Randomly skip position entry** - Will skip opening some of the positions. This sometimes happens in the real world. It might occur due to problems on the broker' |
- | * **Randomly skip position exit** - Will sometimes skip exiting | + | * **Randomly skip position exit** - Will sometimes skip closing |
* **Randomly close position** - This happens only occasionally. Your broker might close your position for some reason. Of course brokers who close your positions when they find suitable are not brokers you should be trading with. | * **Randomly close position** - This happens only occasionally. Your broker might close your position for some reason. Of course brokers who close your positions when they find suitable are not brokers you should be trading with. | ||
Line 37: | Line 37: | ||
- | * **Randomize indicator parameters** - EA Studio 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 indicator parameters** - EA Studio comes with this option off by default. This is because usually strategies do not change. If enabled |
* **Randomize backtest starting bar** - will randomize starting bar of the test. Sometimes starting at a different point in time might bring your account to zero in a very short period. | * **Randomize backtest starting bar** - will randomize starting bar of the test. Sometimes starting at a different point in time might bring your account to zero in a very short period. | ||
Line 43: | Line 43: | ||
===== Simulations chart ===== | ===== Simulations chart ===== | ||
- | {{ : | + | {{ : |
- | By the default running the Monte Carlo tool will result in 20 colored lines drawn on the **simulations** chart. You can see if the lines are grouped and what is the end result of each backtest. This can easily show how destructive | + | By the default running the Monte Carlo tool will run 20 tests with randomized data. The randomization of the data will be done according to the **Simulations** checklist and the values in the **Options** tab. |
+ | |||
+ | Each of the tests will be drawn on the **Simulations chart** with a colored line. You can see how the lines are grouped and what is the end result of each backtest. This can easily show how robust | ||
===== Confidence table ===== | ===== Confidence table ===== | ||
- | {{ : | + | {{ : |
This table shows different statistics from the testing. | This table shows different statistics from the testing. | ||
Line 57: | Line 59: | ||
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. | 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 100% confidence. This assures us if we have traded this strategy, we could expect it to make at least 351 over the given period. This of course if based on 20 random tests and has a great risk of being incorrect. | + | For example in the screenshot above, you see the lowest |
The tool is only named " | The tool is only named " | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | Monte Carlo uses historical data therefore it cannot guarantee or predict the strategy' | + | Monte Carlo uses historical data therefore it cannot guarantee or predict the strategy' |
</ | </ | ||
Line 69: | Line 71: | ||
===== Options ===== | ===== Options ===== | ||
- | {{ : | + | {{ : |
- | * **Count of tests** - lets you choose how many test you want to run and display. | + | * **Count of tests** - choose how many tests you want to run. |
All the options below will apply to the tests **only** if they are enabled from the **Simulations** checklist | All the options below will apply to the tests **only** if they are enabled from the **Simulations** checklist | ||
Line 83: | Line 85: | ||
**Execution problems** | **Execution problems** | ||
- | * **Maximum slippage (points)** - how much can the maximum Random slippage be in points | + | * **Maximum slippage (points)** - how much can the maximum Random slippage |
* **Skip entry probability %** - For each new entry there will be a probability (default 2%) to skip opening the position. | * **Skip entry probability %** - For each new entry there will be a probability (default 2%) to skip opening the position. | ||
- | * **Skip exit probability %** - For each exit there will be a probability (default 2%) to skip closing | + | * **Skip exit probability %** - For each exit there will be a probability (default 2%) to skip exiting |
* **Close position probability %** - What is the chance to close a position in each bar. | * **Close position probability %** - What is the chance to close a position in each bar. | ||
**Strategy variations** | **Strategy variations** | ||
- | * **Indicator change probability %** - chance to change an indicator parameter value. By default only 20% of the parameters will be changed and 80% of the parameters will remain unchanged | + | * **Indicator change probability %** - chance to change an indicator parameter value. By default only 20% of the parameters will be changed and 80% of the parameters will remain unchanged. |
- | * **Indicator max change %** - shows how much the changed parameter’s value can fluctuate. | + | * **Indicator max change %** - shows how much a changed parameter's value can deviate from the original value. |
* **Minimum deviation range** - by default 20 steps. This setting is meant for indicators that have parameters with very low values where changing the value by 20% won't do much difference. In such cases the **Minimum deviation range** will be used and the indicator will be changed by 20 steps (by default) or however much you set. | * **Minimum deviation range** - by default 20 steps. This setting is meant for indicators that have parameters with very low values where changing the value by 20% won't do much difference. In such cases the **Minimum deviation range** will be used and the indicator will be changed by 20 steps (by default) or however much you set. | ||
- | * **Reset** - resets all the fields within Simulations and Options to their default values. | + | * **Reset** |
===== Validation ===== | ===== Validation ===== | ||
- | {{ : | + | {{ : |
When running the [[eas-guide: | When running the [[eas-guide: | ||
Line 106: | Line 108: | ||
The **Validated tests** setting uses the **Validation** settings in the Monte Carlo tool here. | The **Validated tests** setting uses the **Validation** settings in the Monte Carlo tool here. | ||
- | {{ : | + | {{ : |
These are very similar and work in the same way as the general [[eas-guide: | These are very similar and work in the same way as the general [[eas-guide: |