

Optimizing the forex trading system parameters: USD/JPY revisited 
Written by Forex Automaton  
Tuesday, 09 June 2009 08:29  
After important changes to the trading system optimization technique, I am revisiting the case of USD/JPY on the day scale. In this study, the extended range of the entry threshold parameter, same as in the previous EUR/USD study, is used. The extended, more conservative threshold values are seen to increase the returns while reducing the risk. The basic framework remains the same: a run of the program included simulations of trading histories of 12,789 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/JPY 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. The trading system control parameters remain as previously defined. 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.
The more conservative values of the tradeentry parameter, above 0.006, are seen to change magnitude of the average return for such a marginal distribution. Contrary to what was seen for EUR/USD, the shape of the curve remains similar for the black and red points. But the maximum of the return does move to the left as the entry requirement becomes more coservative, indicating, as was noted in the EUR/USD report just mentioned, that those more conservative values increase the relative weight of the situations where tighter stoploss makes sense  a welcome development, consistent with presence of intelligence in the forecast signal to which the entry threshold is applied.
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 generally leads to bumpier rides in returns.Note also that the red set of points, seen to have higher returns in Fig.1, is seen to have lower risk (RMS) in Fig.2. Trade entry and exit thresholds
The entry and exit threshold parameters have been explained elsewhere. In Figures 3 and 4 I present minimumbias (no particular selection applied to the set of traders) data for the trade entry and trade exit parameters, respectively. Compared to the previous USD/JPY optimization study, the range of entry parameter has been extended from 0.006 to 0.009, and the range of the exit parameter was extended up to 0.013. In this latter case, the step of the optimization grid has also been changed since it was concluded that the dependence is weak and featureless. In the range considered, the data favor conservative entry (high threshold) and it looks like the optimum may still have not been reached. This is similar to conclusion of the USD/CAD and EUR/USD studies. The range for this parameter still needs to be extended further to the right, until the area is seen such that the returns begin to decline simply due to the lack of trading activity. We may not be there yet.
Speaking of the exit parameter, excluding the two left values looks like the right thing to do. Optimizing the forecasting parameterWe optimize the forecasting quality parameter, the least trivial of all, with the combined (simultaneous) cut on the parameters inspected so far. The parameter is euphemistically called Fred to avoid disclosing its nature. The combined effect of the best stoploss and entry parameters, shown in Fig.5, bottom (to compare with Fig.5, top with no such selection) is seen to enhance the returns considerably, especially for the higher values of Fred. The shape resembles USD/CAD and EUR/USD.
The case of USD/JPY was previously noted for the particular shape of its Sharpe ratio dependence on the Fred parameter. The dependence was suggesting a Fred optimum (and Sharpe maximum) at values much lower than those one would pick on the basis of Fig.5. As already noted, Sharpe ratio as used in the "old approach" reports like the one just linked, 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 6580 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 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 12789 forex robots is reduced to 120 winners by trading system parameter cuts. The winners have an average annualized return of 0.68 (68%) and the RMS of the distribution is 0.19. 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 forced to admit that the Fred selection adds no value to the algorithm. That's why I am showing the top panel of Fig.7. 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 the Fred selection, except for the very basic one, the distribution is seen to be considerably shifted in the positive direction. Fred selection (green in the top panel, or the bottom panel) shifts in even more. Returns in excess of 100% a year for the 3 years of trading are seen. 

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