Optimizing the forex trading system parameters: USD/CAD

User Rating: / 0
PoorBest 
Written by Forex Automaton   
Wednesday, 27 May 2009 15:31

After some important changes to the trading system optimization methodology, I continue with USD/CAD on the day scale -- this currency pair has not been analyzed in this context before.

The basic framework remains the same: a run of the program included simulations of trading histories of 13,398 independent "virtual traders" (forex robots), each of them being an incarnation of the same algorithm, differing by the setting of the adjustable knobs. This report uses the USD/CAD day scale data covering the time interval from August 20, 2002 to March 23, 2009, with the actual trading starting in March 2006 (when the initial "training" of the system was completed). The key concepts of conditional projection distributions and profile histograms have been explained before.

What is the best stop-loss to use?

What is the best stop-loss parameter to use in forex? The answer depends on the time scale of trading, since so does the the distribution of returns. The distribution of returns gets broader with time scale; in the random walk problem, your expected root-mean-square departure from the origin grows with time as a square root. For this reason, my stop-loss parameter is not expressed in pips or dollars. Instead, it is a fraction of the root-mean-square of the series of linear returns (price differences) in the nearest subset of the price series.

Effect of stop-loss on the trading returns. Minimum bias.

Fig.1. A profile histogram showing dependence of the annualized return (measured directly by comparing equity at the beginning and end points of trading) on the stop-loss placement. No trader selection is applied.

Effect of stop-loss on the trading return volatility. Minimum bias.

Fig.2. A profile histogram showing dependence of the RMS of the logarithmic annualized return distribution for a trader on the stop-loss placement. No trader selection is applied.

Previously, the algorithm was seen to generate larger values of the arithmetic mean return with tighter stop-loss -- but only up to a certain point, the dependence was not monotonic. On the basis of the low draw-down criterion, the conclusion was that more generous values of stop-loss would be preferable. With the new information on the biased nature of the arithmetic mean, when applied to returns, and with the corrective measures taken, there is less self-contradiction in the data: the tight stop-loss is not advisable even on the basis of Fig.1 alone. Fig.2, showing dependence of the RMS of the logarithmic annualized return distribution (a newly introduced quantity) on the stop-loss placement, demonstrates that tight stop-loss placement leads to bumpier rides in returns.

Trade entry and exit thresholds

Dependence of the annualized return on the trade entry parameter. Quality cut progression.

Fig.3. Profile histograms showing dependence of the actual annualized return on the trade entry threshold parameter. No trader selection is applied.

Dependence of the annualized return on the trade exit parameter. Quality cut progression.

Fig.4. Profile histograms showing dependence of the actual annualized return on the trade exit threshold parameter. No trader selection is applied.

The entry and exit threshold parameters have been explained elsewhere. In Figs 4 and 5 I present minimum-bias (no particular selection applied to the set of traders) data for the entry and exit parameters, respectively. As far as the entry parameter is concerned, the dependence indicates that the optimum may be outside the range of the parameters considered. In the range considered, the data favor conservative entry (high threshold).

Speaking of the exit parameter, the smoothness of shape in Fig.4 looks consistent with previous analyses where in most cases, the dependence was of little value in limiting the range of exit parameters.

Optimizing the forecasting parameter

From the data so far, it looks like with a cut on any single parameter, one is doomed to more or less negative returns. This may come as a surprise to some, but the effect of the combined (simultaneous) cut on each of the parameters inspected so far is going to be far more powerful.

Optimizing the forecasting control parameter. Logarithmic measure of return.

Fig.5. A profile histogram showing the dependence of the annualized return on the forecasting control parameter Fred. Here, the best values of stop-loss, entry and exit parameters are used: stop-loss=3, entry=0.005 or 0.006, exit between 0.003 and 0.0011, ends included.

The forecasting quality parameter is euphemistically called Fred to avoid disclosing its nature. The combined effect of the best stop-loss, entry and exit parameters is seen to put the return in a largely positive territory. The main favorable area of Fred seems to lie on the right-hand side of the axis, but the area around 20, preferred in several other reports, seems to contain a small, but distinct local maximum. The shape of the dependence is not entirely unfamiliar, but bear in mind that we had been looking at very different (and optimistically biased) quantities before. A re-analysis of those other cases is needed before any synthesis can be attempted.

Summary

With this input, the preferred ranges of the trading system parameters are given in the Table.

Forecasting parameter, Fred 77,80,83,86,89,92,95
Stop-loss placement parameter, s 3.
Enter-the-trade threshold parameter, ten 0.005, 0.006
Exit-the-trade threshold parameter, tex 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.010, 0.011

Annualized return distribution with Fred, stop-loss, entry and exit selection

Fig.6. Distributions of the actual annualized return in the course of the trading system parameter optimization. The parameter ranges from Table 1 are used. Normalization is arbitrary. The unit of return is 100%.

Fig.6 presents the summary of progress accomplished so far, using the annualized return statistic. Entries in the histogram are the forex robots (algorithmic traders) and the statistic refers to their trading performance. In the course of the optimization, the initial sample of 13398 forex robots is reduced to 140 winners by trading parameter cuts. The winners have an average annualized return of 0.20 (20%) and the RMS of the distribution is 0.10. While the mean of the distribution is the measure of return, its RMS is the measure of risk associated with choosing a particular robot, or a particular version of the trading system, and its importance is hard to overestimate.

3 traders out of 140 in this selected group are still seen to end up with a slightly negative return. On a positive note, returns as high as 50% a year for the 3 years of trading are seen. The distribution looks fairly symmetric with the most likely outcome, the peak of the distribution, located near the mean.

Bookmark with:

Deli.cio.us    Digg    reddit    Facebook    StumbleUpon    Newsvine
Last Updated ( Monday, 04 January 2010 12:35 )