Optimizing the forex trading system parameters: USD/JPY revisited

User Rating: / 0
PoorBest 
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 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. Comparing trade entry ranges. USD/JPY. Effect of stop-loss on the trading returns. Minimum bias. USD/JPY.

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. Top: comparing the trade entry parameter range from the previous reports (black) and the "extension" range (red). Bottom: no trader selection.

The more conservative values of the trade-entry 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 stop-loss makes sense -- a welcome development, consistent with presence of intelligence in the forecast signal to which the entry threshold is applied.

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

Fig.2. A profile histogram showing dependence of the RMS of the logarithmic annualized return distribution for a trader on the stop-loss placement. Compare the trade entry parameter range from the previous reports (black) and the "extension" range (red).

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

Dependence of the annualized return on the trade entry parameter. USD/JPY

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

The entry and exit threshold parameters have been explained elsewhere. In Figures 3 and 4 I present minimum-bias (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.

Dependence of the annualized return on the trade exit parameter. USD/JPY.

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

Speaking of the exit parameter, excluding the two left values looks like the right thing to do.

Optimizing the forecasting parameter

We 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 stop-loss 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.

Optimizing the forecasting control parameter. Minimum bias. USD/JPY. Optimizing the forecasting control parameter. Best values of other parameters. USD/JPY.

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 is 1.5 or 2, entry is 0.008 or 0.009, exit is 0.005 to 0.013.

Dependence of Log Sharpe on the forecasting control parameter. Best values of other parameters. USD/JPY, 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.

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 65-80 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 65, 68, 71, 74, 77, 80
Stop-loss placement parameter, s 1.6, 2.07
Enter-the-trade threshold parameter, ten 0.008, 0.009
Exit-the-trade threshold parameter, tex 0.005, 0.007, 0.009, 0.011, 0.013

Annualized return with stop-loss, entry and exit selection Annualized return with Fred, 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: same as green in the top panel. Normalization is to the unit histogram area. The unit of return is 100%.

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 worst-case 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.

Bookmark with:

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