

Optimizing the forex trading system parameters: USD/CHF 
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 stoploss to use?What is the best stoploss 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 rootmeansquare departure from the origin grows with time as a square root. For this reason, my stoploss parameter is not expressed in pips or dollars. Instead, it is a fraction of the rootmeansquare of the series of linear returns (price differences) in the nearest subset of the price series.
Previously, the algorithm was seen to generate larger values of the arithmetic mean return with tighter stoploss  but only up to a certain point, the dependence was not monotonic. On the basis of the low drawdown criterion, the conclusion was that more generous values of stoploss would be preferable. With the new information on the biased nature of the arithmetic mean, when applied to returns, there is less selfcontradiction in the data: the tight stoploss 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 stoploss placement, demonstrates that tight stoploss 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
The entry and exit threshold parameters have been explained elsewhere. In Figures 4 and 5 I present minimumbias (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 lowthreshold exit are indicated for USD/CAD. Optimizing the forecasting parameterFrom 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.
The forecasting quality parameter is euphemistically called Fred to avoid disclosing its nature. The combined effect of the best stoploss, 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.
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 1723 for the forecasting parameter are still to be preferred. SummaryWith this input, the preferred ranges of the trading system parameters are given in the Table.
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 worstcase 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. 

Last Updated ( Monday, 04 January 2010 12:34 ) 