Return vs risk in the presence of simultaneous opportunities: Step Two optimization update.

User Rating: / 1
PoorBest 
Written by Forex Automaton   
Friday, 11 September 2009 14:37

Here is a further step towards optimizing the forex trading system performance in the "semi-isolated" mode. The "isolation" means that each market is being predicted independently of the rest, with no attempt to discover and learn the inter-market patterns. However, the money-management 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.

 

Money management for the individual markets

separate

joint

Pattern analysis for the individual markets

separate

Step One

You are here: Step Two

joint

test-only

Step Three

Table 1. Various modes of the trading system operation. The present report deals with the configuration denoted as Step Two, designed as an intermediate step to better understand the evolution of the system from Step One to Step Three. But with the current status of Step Three, Step Two looks like a viable and compelling alternative.

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 back-tested 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 one-decision-a-day 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 apple-to-apple comparison with the previous results, including Step One results.

Mean position duration vs stop-loss. Back-testing results shown as profile histograms. 1.1 Annualized return vs stop-loss. Back-testing results shown as a profile histogram. 1.2 Annualized logarithmic return mean minus RMS Back-testing results shown as a profile histogram. 1.3

Fig.1. Stop-loss optimization. 1.1: Mean position duration (days) vs stop-loss parameter; 1.2: annualized return (1=100%) vs stop-loss parameter; 1.3: same for the figure of merit, logarithmic return minus logarithmic risk as mean minus RMS of annualized monthly return series.

As you could see already in Step One optimization results, needlessly tight stop-loss leads to overtrading and losses. Naturally, a more generous stop-loss leads to longer position life-time, 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 stop-loss (Fig.1.2) we see the shifting of the maximum (towards lower stop-loss) with the increase in the entry parameter. Apparently 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.

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 stop-loss 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 non-monotonic with a maximum seen around the stop-loss 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.

Mean position duration vs entry. Back-testing results shown as profile histograms. 2.1 Annualized return vs trade entry parameter. Back-testing results shown as profile histograms. 2.2 RMS of the annualized logarithmic return vs trade entry parameter. Back-testing results shown as profile histograms. 2.3

Fig.2. Trade entry optimization. 2.1: new trade frequency (inverse days) vs trade-entry threshold parameter; 2.2: dependence of the annualized return on the trade-entry parameter; 2.3: same for the figure of merit, logarithmic return minus logarithmic risk.

The effects of trade-entry 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 stop-loss settings which rob the trader of their capital through overtrading. At first sight one might expect that for low trade-entry thresholds, tighter stop-losses 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 non-monotonic 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 multi-market 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 stop-loss 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".

Logarithmic return minus risk figure of merit vs new trade frequency -- scatter plot

Fig.3. Logarithmic return minus risk (mean minus RMS of monthly annualized logarithmic return) vs new trade frequency, inverse days. Scatter plot view of the data.

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 pre-crisis US stock markets.

While synthesizing the stock bubble performance via forex in 2006-2009 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 break-through or a non-trivial optimum. The non-trivial 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 non-normal 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 (non-negative) 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.

Logarithmic return distribution asymmetry vs new trade frequency -- profile plot 4.1 Annualized return vs new trade frequency -- profile plot 4.2

Fig.4.1: Logarithmic return distribution asymmetry (maximum-abs(minimum)) vs new trade frequency, inverse days. 4.2: Mean of the annualized return distribution vs new trade frequency. Profile histogram view of the data.

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 stop-loss 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 multi-market 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:

  • portfolio diversification (cf. Modern Portfolio Theory)

  • multiple sources of opportunity and the value of patience: with sufficient intelligence of the market operator, prudence secures opportunity while decreasing risk. This mechanism would not be recognised by the Modern Portfolio Theory, since the theory denies to the market operators the ability to foresee speculative opportunities, let alone correctly weigh them against each other.

However, to support these statements quantitatively, a solid apples-to-apples 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 re-processed with the upgraded code and extended time history.

Bookmark with:

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