Optimizing the forex trading system for USD/CAD: the optimal "trader patience" pans out

User Rating: / 1
Written by Forex Automaton   
Friday, 19 June 2009 18:01

I am revisiting the case of USD/CAD on the day scale after a few important changes to the trading system optimization technique have been introduced. The entry threshold parameter, the one that controls the "patience" of a trading system or the amount of "excitement" about a trade idea needed to enter the trade, takes much higher values in this study, and the optimal "patience" is being seen.

The basic framework remains the same: a run of the program included simulations of trading histories of  27,608 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. The trading system control parameters remain as previously defined.

What is the best stop-loss to use for USD/CAD?

What is the best stop-loss parameter to use in USD/CAD? The answer depends on the time scale of trading, since so does 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/CAD.

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. Different symbols represent different trade entry parameter ranges. The unit of return is 100% (100%=1).

The more conservative values of the trade-entry parameter are seen to change magnitude of the average return for such a marginal distribution, in particular, for the lower stop-loss settings. Contrary to what was seen for EUR/USD, the shape of the curve remains similar for the various symbol types as the entry threshold is varied. The maximum of the return moves 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. This confirms the observation made already, albeit on a more limited data set, in the case of USD/GBP optimization.

Fig.1 shows that the importance of the trade entry parameter grows as the stop-loss gets tighter. Somewhat counter-intuitively, it is the traders using tight stop-loss who need to be particularly conservative about when to enter the trade. A conservative entry policy on the contrary, such as the one represented by blue symbols in Fig.1, takes a lot of pressure off the stop-loss selection issue.

Trade entry and exit thresholds

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

Fig.2. Profile histograms showing dependence of the actual annualized return on the trade entry threshold parameter. Traders are grouped according to the trade entry threshold parameter, as in the previous figures. The unit of return is 100% (100%=1).

The entry and exit threshold parameters have been explained elsewhere. In Figures 2 and 3 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/CAD optimization study, g the range of entry parameter has been extended from 0.006 to 0.016, 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. The dynamics of the annualized return in Fig.2 is understandable: lack of selectiveness in the trade ideas leads to decreased returns. The extreme conservatism, on the other hand, leads to the situation when trades are made so seldom that it is hard to expect returns. Thus, a maximum is to be expected; the value of the study is in quantifying its location.

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

Fig.3. Profile histograms showing dependence of the actual annualized return on the trade exit threshold parameter. The unit of return is 100% (100%=1).

Speaking of the exit parameter, a very weak and featureless dependence is seen.

Optimizing the forecasting parameter

The forecasting quality parameter, the least trivial of all to optimize, is euphemistically called Fred to avoid disclosing its nature.

Optimizing the forecasting control parameter. All entry ranges. USD/CAD. Optimizing the forecasting control parameter. Best values of other parameters. USD/CAD.

Fig.4. A profile histogram showing the dependence of the annualized return eon the forecasting control parameter Fred. The unit of return is 100% (100%=1).

The multiple symbol types in Fig.4 separate the dependences of return on Fred for various settings of the entry threshols. The two panels correspond to the different stop-loss ranges. As you see, the shape of dependence discussed in the previous USD/CAD study -- that is, the rising trend -- is only part of the story, found for the not-very-conservative entry parameters (black and red symbols). The dependences get much flatter for blue and magenta points.

What looks like a smaller local maximum of return (or a set of maxima) on the left side of the range, is near the area of what is currently believed to be the working maximum for USD/CHF and GBP/USD. Buying the outstanding strength of just a couple of data points in Fig.4 -- I am speaking of the blue points in the Fred range 20-35 -- feels too risky. However, part of the rationale for these studies is to see how consistent the performance-driven selection results for the different currency combinations are. With that goal in mind, existence of shared optima among such different currency pairs is a good news.

The maxima

With this input, two spots in the parameter space can be identified as the new maxima of return. Strictly speaking, we are not seeking the maxima of return -- but optima, defined by combination of return and risk considerations. The risk aspect is going to be addressed as the risk associated with making a wrong choice of a robot.

Table 1. The "Blue" Maximum.

Forecasting parameter, Fred 14, 17, 20, 23
Stop-loss placement parameter, s 1.13, 1.6
Enter-the-trade threshold parameter, ten 0.005, 0.006
Exit-the-trade threshold parameter, tex 0.001, 0.003, 0.005, 0.007, 0.009, 0.011, 0.013

Table 2. The "Green" Maximum.

Forecasting parameter, Fred 77, 80, 83, 86
Stop-loss placement parameter, s 1.13, 1.6
Enter-the-trade threshold parameter, ten 0.009, 0.010
Exit-the-trade threshold parameter, tex 0.001, 0.003, 0.005, 0.007, 0.009, 0.011, 0.013

Annualized return, Blue forecasting parameter  selection on and off Annualized return, Blue forecasting parameter only Annualized return, Green forecasting parameter  selection on and off Annualized return, Green forecasting parameter only

Fig.6. Distributions of the actual annualized return in the course of the trading system parameter optimization. Black histograms: all parameters except for Fred are as in Table (Blue or Green, respectively), no selection on Fred. Blue: with an extra condition on Fred (Table 1). Green: with an extra condition on Fred (Table 2). 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 27608 forex robots is reduced to two distinct groups of 176 and 112 winners by trading system parameter cuts.

From the analysis of various foreign exchange rates so far, it's evident that forecasting is the most tricky aspect of the trading system 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 have to admit that the Fred selection adds no value to the algorithm. That's why I am showing the black histograms in Fig.6. The black-color data represent the options on the table in the absence of any Fred selection, and show the effect of the money management style selection alone. Table 1 and Table 2 differ by the money management style as well as Fred selection. Fred selection (blue or green) shifts the return distribution in the positive direction considerably.

The choice between the blue and green groups has to be made now, and I am going to base it on the risk considerations. While the mean of the distribution in Fig.6 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. One has to minimize the probability of ending up with a "lemon", a robot which belongs to the parent distribution and lands in the negative area of returns. For Gaussian distributions, a good measure of the probability that this happens is the ratio of mean to the RMS (or Sigma). The higher it is, the lower is the chance of a bad choice. This is, essentially, the rationale behind the Sharpe ratio (when different trading strategies, rather than different periods, are used to obtain the return estimate).

Looking at the Mean/RMS ratios for the blue and green distributions, we obtain 1.3 vs 1.8 -- in favor of the green. To compare with the previous USD/CAD report, the new data did not change the balance in favor of the low Fred maximum, although we were close, having seen the shape to be dependent on the entry parameter (Fig.4), with the low-Fred maxima becoming much more prominent at more conservartive entry and relatively tight stop-loss. The progress compared to the previous report is therefore limited to shifting the preferred range of trading system parameters into the zone of tighter stop-losses and less frequent (due to higher entry threshold) trades -- with the return expectation and the trader selection risk staying comparable.

Bookmark with:

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