

Return vs risk in the presence of simultaneous opportunities: Step Two optimization update. 
Written by Forex Automaton  
Friday, 11 September 2009 14:37  
Here is a further step towards optimizing the forex trading system performance in the "semiisolated" mode. The "isolation" means that each market is being predicted independently of the rest, with no attempt to discover and learn the intermarket patterns. However, the moneymanagement component of the algorithm is aware of the concurrent trading ideas from the different markets and weighs them against each other, selecting the most promising. In this report I focus on risk vs return optimization.
The basic framework remains the same: a run of the program included simulations of trading histories of 4942 of independent "virtual traders" (forex robots), each of them being an incarnation of the same algorithm, differing by the setting of the adjustable knobs. The algorithm learns continuously, but at any point in time, it may use only data from the past (and not the future) of the time series. For the forecasting parameter knob (so called Fred), the range of the settings is narrowed down to the best values on the basis of backtested performance seen in the Step One simulations, that range being 71 through 80. As in all other studies posted here so far, the trading is performed on onedecisionaday time scale, with 1:100 leverage, risking no more than 10% of the trading capital at any point in time. This report uses the EUR/USD, USD/JPY, GBP/USD, USD/CAD, USD/CHF and AUD/USD day scale data covering the time interval from August 20, 2002 to August 21, 2009, with the actual trading starting in April 2006 (when the initial "training" of the system was completed). The trading system control parameters remain as previously defined. A few words on the measures of risk and return used in these studies. The trading performance data are updated continuously and the mean annualized logarithmic return and its RMS are calculated on the monthly basis. These form the basis for a risk vs return approach to the trading system optimization. The rationale for using these measures of risk and return has been given before. I keep using the linear annualized return, since that's an accountant's quantity you want to know. But return vs risk analysis is done in the logarithmic variables. The simulations for this report have been performed with the most recent set of upgrades, documented separately. Even though the effect of these changes on the optimization is expected to be minor, they prevent an appletoapple comparison with the previous results, including Step One results. 1.1 1.2 1.3 As you could see already in Step One optimization results, needlessly tight stoploss leads to overtrading and losses. Naturally, a more generous stoploss leads to longer position lifetime, and the more so as the more conservative the trade acceptance policy becomes with the increase of the entry threshold (Fig.1.1). Inspecting the return dependence on the stoploss (Fig.1.2) we see the shifting of the maximum (towards lower stoploss) with the increase in the entry parameter. Apparently 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. The logarithmic return minus risk figure of merit (Fig.1.3) is easy to understand. Most people use the ratio of return to risk (Sharpe ratio) to judge how much return a given degree of risk "buys". In the world of logarithms, the operation of taking the raio corresponds to subtraction. And just as you want the Sharpe ratio to be high, you want the linear difference of return and risk logarithms to be high. The plot shows that the generous stoploss results, in general, in better return per unit of risk. The magenta curve, the one corresponding to the most conservative range of entry thresholds, is nonmonotonic with a maximum seen around the stoploss of 2.5. It is interesting that the strategy corresponding to the peak of the magenta curve is not profitable: both risk and return are necessary to make a decision. 2.1 2.2 2.3 The effects of tradeentry threshold are illustrated in Fig.2. The frequency with which new trade ideas are accepted for execution, decreases with the threshold. A high entry threshold makes it more difficult for a trade idea to even get considered, let alone become accepted. The cyan points in Fig.2.1 correspond to the range of tight stoploss settings which rob the trader of their capital through overtrading. At first sight one might expect that for low tradeentry thresholds, tighter stoplosses will lead to more frequent trades, but that is not the case if cyan data are compared with red or green. Apparently, other constraints present in the algorithm (such as the fixed fraction of account to be risked) make it difficult to place new trades when a trader is being ruined by overtrading (an ability to pyramid positions when winning would be the exact opposite of this effect). As to the shape of the return dependence on the entry parameter in Fig.2.2, it was noted in Step One reports to be nonmonotonic with a maximum, the maximum being found at the parameter value of 0.01. This is where the transition from Step One to Step Two gets interesting: Fig.2 shows that the position of the maximum is shifted to the right. It's not at 0.01 but at 0.016 or 0.017, looking at the green and red data sets in Fig.2.2. What happened? In the multimarket money management mode (which is the only difference between Step One and Step Two), there is competition between trade ideas coming from the different markets. As a result, conservatism brings an additional benefit: being patient pays off as it increases a chance that another market will provide a better return if one is still in the waiting state when the opportunity arises. For this mechanism to work, the algorithm has to be intelligent enough to recognise such an opportunity and value it correctly. What we see is consistent with saying that the algorithm is intelligent enough. Thus, patience secures opportunity. Getting back to the problems of the overtrading "risk group" (defined via tight stoploss setting), Fig.2.2 shows that one hope for the traders in this group is to be extra conservative when entering trades. This is seen from the fact that the maximum of return lies at much higher threshold value for the cyan points. This is of course nothing more than rephrasing the conclusion made when analyzing Fig.1.2, of which Fig.2.2 is a "side view".
Fig.3 is the presentation format I plan to use in the return vs risk analysis, in particular, when comparing Step One, Step Two and Step Three. As the new trade frequency drops with the trading style getting more conservative (points of different colors in the plot), the points approach the extreme of no trading: zero trading frequency, zero risk and zero return (it's zero logarithmically as well since logarithm of 1 is 0). This corresponds to the point (0,0) in the plot where the points seem to be heading. Sharpe ratio can be quickly estimated as an exponent of the quantity plotted along the vertical axis. The best Sharpe ratios we get now are around exp(0.4) = 0.7  in the same ballpark as the precrisis US stock markets. While synthesizing the stock bubble performance via forex in 20062009 may sound appealing, a devil's advocate may observe that this Sharpe value is being approached at the same time as the trade frequency approaches zero. The distribution in Fig.3 is smooth with no indication of breakthrough or a nontrivial optimum. The nontrivial aspect of the data will be presented shortly. The interpretation of Sharpe ratio, as everything in the classical finance, rests on the assumption of normal returns. For a nonnormal and asymmetric distribution, such as the distribution of trader's returns, the combination of the first and second moments (the basis for the Sharpe ratio) does not tell the whole story, does not allow one to draw conclusions about probabilities. In the current data sets, the degree of asymmetry in returns can be judged by the difference between the maximum and the absolute (nonnegative) value of the minimum logarithmic return in a monthly series for each trader. Since with enough statistics the minimum return is invariably negative, in practice one can construct this asymmetry measure as maximum plus minimum. 4.1 4.2 As Fig.4 indicates, the distribution of monthly returns is highly asymmetric and skewed in the direction of positive returns. This observation is true for the broadest possible classes of virtual traders. Therefore the risk of negative returns is less than the RMS would imply based on a normal distrubution hypothesis. For the range of stoploss parameters I like (green and red), the maximum distribution asymmetry occurs at new trade frequency around 0.3. Given that 6 markets are being traded, this translates into a single market trade frequency of 0.3/6=0.05  which in the Step One report was found to correspond to the entry threshold that maximized the return. However, Fig.4.2 shows that the maximum return corresponds to new trade frequency of 0.2, which translates into a single market new trade frequency of 0.2/6=0.033. So for a fair comparison with Step One, there is a drop in the "most profitable" trade frequency  which complements an increase in the "most profitable" entry threshold from 0.010 to 0.016. I believe what this is all about is the value of patience associated with the multimarket mode of operation. In conclusion, I was planning to say a few more words regarding the comparison of Step One and Step Two outcomes. In fact, one of the purposes of Step Two is to find the trading regime where the benefits of trading simultaneously in multiple markets are most visible, and this regime remains to be pinned down. I expect the presence of multiple markets to be beneficial to the algorithmic traders through at least two mechanisms:
However, to support these statements quantitatively, a solid applestoapples comparison of Step One and Step Two results is needed. In order to do that, Step One (or to be precise, its best forecasting parameter range) is now being reprocessed with the upgraded code and extended time history. 

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