If we subtract one standard deviation from the mean loss MAE, the result is about 41 pips. This is near the mean win MAE, and is thus an acceptable lower boundary of our test range. If we add two standard deviations to the mean win MAE, the result is about 87 pips, near the median loss MAE. This is an acceptable upper boundary of our test range. Rounding to the nearest multiple of two, we have:
Lower boundary of test range: 40 pips
Upper boundary of test range: 88 pips
This range should encompass all practical values of the initial stop loss. It should leave enough room for winning trades to develop while also reducing the losses on the losing trades. If we optimize in increments of two pips, the optimizer will test 25 possible values for the ISL. Given the power of today’s computers, this should take only a minute per optimization run.
With our range of MAE values set, we’ll commence the walk-forward optimization of the ISL. To ensure that the test data’s characteristics more closely align with the current state of the market, we’ll use a date range of January 2010 through December 2011 for the walk-forward analysis. Because this is a day-trading system, we’ll use a small optimization period of six months with an out-of-sample period of two months. This creates nine passes through the data. Starting with the January 2010 data, the sequence of optimization and walk-forward runs follows the pattern shown in “Walk-forward testing.”
To simplify things, and to ensure consistency across all the optimization runs, we’ll choose the stop-loss value that returns the highest profit. Choosing our optimized parameter this way may reduce robustness, but will suffice for demonstration purposes. The results of the nine passes are shown in “Loss analysis” (below). We can compare the final result with the base system by backtesting the base system on the same data. Here are the results:
Profit without ISL: $1,428.52
Profit with ISL: $775.92 (expectancy: 1.19)
Adding the initial stop loss did not improve profitability. Instead, it cut the profits nearly in half. This does not imply, however, that there is no advantage to having the ISL in place. In fact, the opposite is true: It allows us to quantify the risk of each trade. Without the initial stop loss, the risk is open-ended and dependent upon price at the time of the forced trade exit at the end of the trading session.
The largest loss incurred by the base system was 448 pips. Several consecutive losses of this magnitude could inflict serious damage to the trading account, and such occurrences are to be expected. In contrast, the largest loss incurred with the initial stop loss system was 97 pips. Note also that the expectancy is positive. For these reasons, we’ll continue using the initial stop loss as we seek the optimum profit target.