Contents

Monte Carlo retest methods

Author: Kornel Mazur

March 1st, 2019

Rating:
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 2.50 out of 5)
Loading...

This is another type of Monte Carlo simulations, in this case it simulates random changes in properties that require the strategy to be retested – such as changes in spread, slippage, strategy parameters, or history data.

Because every simulation requires a complete backtest this cross check could take long time.
It the backtest on main data took let’s say 0.5 seconds, and you want to run 100 simulations in this cross check, you can expect it would take 100 x 0.5 = 50 seconds for every strategy where it is applied.

Some of the methods available are:

Randomize Starting Bar – this will test the strategy behavior when the testing starts on a different starting bar. It is obvious that a good strategy cannot be sensitive to which bar you start the test.

Randomize Strategy Parameters – every strategy uses parameters, such as period of an indicator or constant that is used in comparison. This test checks the sensitivity of the strategy to a small change of parameter value. Probability of change is a probability that any parameter changes its value. Max parameter change is the maximum percentage to which the parameter changes its value. For example if you set Max parameter change to 10%, then a parameter with value 60 can be randomly changed to a range 54 – 66 (+- 10% of its original value of 60).

Randomize History Data – one very common case of curve fitting is when strategy is too dependent on history data. This option checks the behavior of the strategy to a change in history data.

The Probability of change sets for every bar how probable it is that open, high, low or close price will be changed. The Max price change is a percentage value of the change in relation to ATR (Average True Range).

So if for example close price is randomly chosen to be changed, ATR value is 10 pips, and Max price change is 20%, then the price can change by +- 2 pips

< Previous: Retest on additional marketsNext: What If simulations >

1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Insanity82007
Insanity82007
5 months ago

This is from a forum post I put up:
What does the MC retest “Randomize min distance from price from 0 to 10” do?

comment image

Administrator

1349 Posts

Send Message

Hello,
this applies to placing stop orders. The test emulates various minimum distances of a stop order from current market price. What is it needed?
Some brokers define min distance in pips for stop order from current market price that a trader needs to respect when placing a stop order
Lets say min distance defined by the broker is 5 pips. All orders placed 4, 3, 2 or 1 tick from the current market price will be rejected by the broker. The test allows you to check whether the strategy will remain profitable if the min stop distance is increased … for example if you need to move your strategy to another broker that uses a higher value for min stop distance