Optimizing the forex trading system parameters: USD/CHF

User Rating: / 0
PoorBest 
Written by Forex Automaton   
Friday, 29 May 2009 16:59

After some important changes to the trading system optimization methodology, I continue with USD/CHF 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/CHF 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. USD/CHF.

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. USD/CHF.

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, 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.

Both figures look very much like their counterparts in the similar USD/CAD analysis.

Trade entry and exit thresholds

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

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. USD/CHF.

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 Figures 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). This is similar to conclusion of the USD/CAD analysis.

Speaking of the exit parameter, the shape seems to favor the values on the left (but not extreme left) of the range. This is in contrast with many other cases where no clear preference could be inferred for the exit sensitivity parameter. It's interesting that a conservative entry and low-threshold exit are indicated for USD/CAD.

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. Minimum bias. USD/CHF. Optimizing the forecasting control parameter. Best values of other parameters. USD/CHF.

Fig.5. A profile histogram showing the dependence of the annualized return on the forecasting control parameter Fred. Top: no selection on other parameters. Bottom: the best values of stop-loss, entry and exit parameters are used: stop-loss between 2 and 3, ends included, entry=0.006, exit between 0.002 and 0.005, 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, shown in Fig.5, bottom (to compare with Fig.5, top with no such selection) is seen to put the return in a largely positive territory. The shape looks very different from USD/CAD, with a different overall trend and favorable areas in the middle and on the left of the Fred range.

Dependence of Log Sharpe on the forecasting control parameter. Best values of other parameters. USD/CHF, day scale.

Fig.6. A profile histogram showing the dependence of the "Log Sharpe" (explained in the text, not to be confused with the traditional Sharpe ratio) on the forecasting control parameter Fred. High values of Log Sharpe, just like high values of the traditional Sharpe, correspond to high return with low risk. The best values of stop-loss, entry and exit parameters are used.

Previously in these reports, Sharpe ratio was used to add risk considerations to those of return while searching for the optimum. As already noted, Sharpe ratio as used in the "old approach" reports contains biased quantities and is avoided in the "new" approach. A possible replacement is a difference of two logarithmic quantities, the mean of the monthly annualized logarithmic returns and the RMS of the series of such returns. This is the quantity "LOG SHARPE" plotted in Fig.6. As you see from Fig.5 and Fig.6 combined, the introduction of the second moment quantity (RMS), a measure of the risk, does not change the conclusion: the values in the range 17-23 for the forecasting parameter are still to be preferred.

Summary

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

Forecasting parameter, Fred between 17 and 23
Stop-loss placement parameter, s 2.06667, 2.53333, 3.
Enter-the-trade threshold parameter, ten 0.006
Exit-the-trade threshold parameter, tex 0.002, 0.003, 0.004, 0.005

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

 

Fig.7. Distributions of the actual annualized return in the course of the trading system parameter optimization. Top panel: red: all parameters except for Fred are as in Table 1, no selection on Fred. Green: all parameters including Fred are as in Table 1. Bottom panel: rebinned version of the green histogram from the top panel, 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 34 winners by trading system parameter cuts. The winners have an average annualized return of 0.42 (42%) and the RMS of the distribution is 0.12. 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.

From the analysis of various foreign exchange rates so far, it's evident that Fred is the most difficult parameter to optimize. We may end up with a single, compromise approach for all exchange rate or be forced to class exchange rates according to the similarity of the Fred optimization solutions. In either case, we must be prepared to face the worst-case scenario when we will be foreced to admit that the Fred selection adds no value to the algorithm. That's why I am showing the top panel of Fig.6. This figure represents the options on the table in the absence of any Fred selection, and with the best selection of the money management aspects of the system. Even in the absence of Fred selection, the distribution is seen to be considerably shifted in the positive direction. Fred selection (red in the top panel, or the bottom panel) shifts in even more.

Bookmark with:

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