��1 Pt−i (short position)  Bt−1 = −1 if Pt−1 < mi=1
11.4 TRADING RULE EQUIVALENCEIn this chapter we consider a slightly modiﬁed version of moving averages. Instead ofusing spot prices the moving average signals generated are based on logarithmic prices.Simple moving averages by construction are autoregressive models with constrainedparameters. Therefore the major difference between linear predictors such as simple andweighted moving averages and momentum trading rules resides in the weighting schemeused. Simple moving averages give decreasing weights to past underlying returns whereasmomentum rules give an equal weight. Table 11.2 shows the equivalence for the simplemoving average. Results for other linear predictors such as weighted, exponential ordouble moving averages crossover rules can be found in Acar and Lequeux (1998).As an illustration Table 11.3 shows how trading signals would be generated for a simplemoving average trading rule of order 10.When not strictly identical (as in the case of the momentum method), signals generatedby trading rules based on logarithmic prices are extremely similar to the ones generatedby rules based on prices. Acar (1994) shows that using Monte Carlo simulations thesignals are identical in at least 97% of the cases. Figure 11.3 clearly depicts this byshowing the returns generated by simple moving averages trading rules of order 2 to 117
Optimal Allocation of Trend-Following RulesTable 11.2Rule
337
Return/price signals equivalence
Parameter(s)
Price sell signalsln(Ct ) <
Linear rules
m−1
Equivalent return sell signalsm−2
aj ln(Ct−j )
j =0
aj = 1/m
m≥2
Simple MA
dj Xt−j < 0
j =0
dj = (m − j − 1)
Table 11.3 Numerical example of signal generation when using prices or logarithmic price returnsDate
Spotprice
30/01/200231/01/200201/02/200204/02/200205/02/200206/02/200207/02/200208/02/200211/02/200212/02/200213/02/200214/02/200215/02/200218/02/200219/02/2002
13 29813 37813 38713 29613 33313 35713 36213 48113 36513 29013 30913 23113 26613 25913 361
Xt =ln(Pt /Pt−1 )
dj =(m − j − 1)
0.0059980.000673−0.006820.0027770.00180.0003740.008866−0.00864−0.005630.001429−0.005880.002642−0.000530.007663
123456789
m−2
m−1
m−2
ln(Ct ) <
m−1
j =0
j =0
j =0
dj Xt−j
1ln(Ct−j )m
dj Xt−j < 0
aj ln(Ct−j )
j =0
−0.0006−0.00517−0.01172−0.00226−0.005560.000299
13 35513 35613 34113 32913 32513 328
−1−1−1−1−11
−1−1−1−1−11
14.0%y = 0.9796x + 0.00192R = 0.9774
12.0%
MA log returns
10.0%8.0%6.0%4.0%2.0%0.0%0%
2%
4%
6%8%MA price returns
10%
12%
14%
Figure 11.3 Comparison of returns generated by the moving averages using log returns or prices
338
Applied Quantitative Methods for Trading and InvestmentPress to run simulation0.98
Select statistic to plotas X and Y
0.960.940.920.900.880.86
Select currency, MA orderand transaction cost
0.840.82
0
20
40
60
80
100
120
140
Figure 11.4 Correlation of signals as a function of the moving average order
based both on prices and logarithmic returns for USD–JPY over the period 26/07/1996to 12/03/2002. The near equivalence is quite obvious. Note that the reader can recreateFigure 11.3 by drawing an XY plot of the data contained in (B3:B118, N3:N118) of the“Results” worksheet of the ﬁle “Lequeux001.xls”.Figure 11.4 further illustrates the relationship between logarithmic returns and pricebased trading rule signals. The reader can furthermore investigate the various performancestatistics of simple moving averages of order 2 to 117 by using the worksheet “MA” inLequeux001.xls. The user should ﬁrst select a currency pair and then press the simulationbutton. All statistics will then be calculated for a moving average of order 2 to 117. Theresults can then be visualised as an XY plot by selecting the data for X and Y as shown inFigure 11.4. Alternatively the user can select a currency pair and specify the moving average order to compare the differences between logarithmic and price based trading rules.
11.5 EXPECTED TRANSACTIONS COST UNDER ASSUMPTIONOF RANDOM WALKWhen evaluating the performance of a trading rule taking into account transaction costs iscrucial. Whereas this can be done empirically, doing so implies making some assumptionsin regard of the underlying dependencies. It may therefore induce a bias in the ruleselection process. Acar and Lequeux (1995) demonstrated that over a period of T days,there are an expected number, N , of round turns2 and therefore a total trading cost (TC), c,equal to cN. The number N of round turns is a stochastic variable, which depends mainlyon the individual forecaster Ft rather than on the underlying process. Assuming that theunderlying time series, Xt , follows a centred identically and independently distributednormal law, the expected number of round turns generated by a moving average of orderm, supposing that a position is opened at the beginning of the period and that the lastposition is closed at the end day of the period, is given by:E(N ) = 1 + (T − 2)2
11− arc sin(ρF )2 π
A round turn is deﬁned as reversing a position from one unit long to one unit short or vice versa.
Optimal Allocation of Trend-Following Rules
whereρF =
m−2
(m − i − 1)(m − i − 2)
i=0
339m−2
(m − i − 1)2
if m ≥ 2
i=0
Subsequently, the expected transaction costs will be E(TC) = −cE(N ), where c is thetrading cost per round turn. Table 11.4 indicates the expected number of round turns outof a 250-day year under the random walk assumption. The last column shows the resultingyearly cost in percentage terms for a cost per transaction equal to c = 0.03%.To further illustrate the relationship between moving average order and number of roundturns generated we used the spreadsheet Lequeux001.xls to calculate the number of roundturns observed for each of our currency exchange rates and plotted this alongside the exante expected theoretical number of round turns (Figure 11.5). The number of transactionsTable 11.4
Expected number of transactions and cost for simple MAs
Moving average
Expected number ofround turnsa
Expected yearly cost %,c = 0.03%
125.0092.5267.4048.6234.9225.4618.6213.68
−3.75−2.77−2.02−1.46−1.05−0.76−0.56−0.41
S(2)S(3)S(5)S(9)S(17)S(32)S(61)S(117)a
Number of round turns assuming a year of 250 trading days.
140USE-JPYEUR-USDUSD-CADAUD-USDGBP-USDTHEORETICAL
Number of round turns per annuun
1201008060402000
Figure 11.5
20
40
60Moving average order
80
100
Observed and theoretical number of round turns as a function of the MA order
340
Applied Quantitative Methods for Trading and Investment
decreases as a function of the order of the moving average. The reader can reproducethis chart by running the simulation and selecting “MA order” for the X variable and“Round turns” for the Y variable in the worksheet “MA”. This of course only plots theresults for the selected currency pair. To produce the comparison chart the reader mustobtain the data for each currency pair, which is stored in column AD, and generate theplot themselves.The formula is exact for linear rules and just an approximation for non-linear predictors.The shorter-term moving averages generate the most trading signals. Therefore if onetakes into account transaction costs it clearly appears that for equally expected grossreturns, longer-term rules must be preferred. The number of round turns generated bya moving average trading rule is higher under the random walk assumption than whenthe underlying series exhibit positive autocorrelation and lower when exhibiting negativeautocorrelation. Indeed, the more positive the autocorrelation, the more trends and thefewer transactions there are. However the number of transactions is higher when thereare negative autocorrelations and therefore the expected return after transactions costswill be lower. One important implication is that negative autocorrelations will be moredifﬁcult to exploit than positive ones when transaction costs are taken into account. Thismay well explain why there are very few active currency managers relying on contrarian3strategies. The theoretical model can help managers who rely on linear predictors such assimple moving averages to factor in ex-ante the cost of implementing their strategy.
11.6 THEORETICAL CORRELATIONOF LINEAR FORECASTERSAnother strong argument for using trading rules based on an autoregressive model overa fundamental process is that it is possible to calculate ex-ante the level of correlationbetween the signals generated by linear trading rules. It is therefore possible to estimateex-ante what diversiﬁcation can be provided by a set of linear trading rules. This is clearlynot possible when it comes to an exogenous process. It would indeed be very difﬁcultto determine the ex-ante correlation of the returns generated by a trading strategy basedfor example on interest rate movements or current account announcements. Acar andLequeux (1996) have shown that under the assumption of a random walk without driftit is possible to derive the correlation of linear trading rule returns. Assuming that theunderlying time series, Xt , follows a centred identically and independently distributednormal law, the returns R1,t and R2,t generated by simple moving averages of order m1and m2 exhibit linear correlation, ρR , given by:

min(m1 ,m2 )−2
(m1 − i − 1)(m2 − i − 1) 2i=0ρR (m1 , m2 ) = arc sin  πm−21 −22 m22(m1 − i − 1)(m2 − i − 1)i=0
i=0
3Contrarian strategies are mean-reverting strategies. Therefore these strategies will be at their best when theunderlying series exhibit a high level of negative autocorrelation in their returns.
Optimal Allocation of Trend-Following Rules
341
Table 11.5 Simple moving average returns expected correlation4ρ
MA-2
MA-3
MA-5
MA-9
MA-17
MA-32
MA-61
MA-117
MA-2MA-3MA-5MA-9MA-17MA-32MA-61MA-117
1
0.7051
0.5210.711
0.3780.5120.7051
0.2720.3660.5010.6991
0.1960.2640.3610.5010.7071
0.1420.190.260.3590.5040.7051
0.1020.1370.1870.2580.3610.5020.7041
Table 11.5 utilises this equation and shows the coefﬁcient correlation between thereturns generated by different moving averages when applied to the same underlyingmarket.Trend-following systems are positively correlated. Zero or negative correlationobviously would require the combination of trading rules of different nature such astrend-following and contrarian strategies. Buy and sell signals and therefore returns oftrend-following trading rules are not independent over time under the random walkassumption. This will therefore put a ﬂoor on the maximum risk reduction that can beachieved by using them.
11.7 EXPECTED VOLATILITY OF MAVolatility of returns is an important measure of underlying risk when comparing tradingstrategies. There are many fallacious statements and feelings regarding short-term versuslong-term trading strategies. This usually derives from some sort of confusion betweenposition-to-position and mark-to-market returns. Acar et al. (1994) have shown by using abootstrap approach that the volatility of the returns generated by trading rules is approximately equal to the volatility of the underlying process applied to and is thus independentof the moving average order. To illustrate this relationship Figure 11.6 shows the volatility of the daily returns generated by moving averages of order 2 to 177 and the volatilityof USD–JPY spot daily returns over the period 15/02/1996 to 12/03/2002. The readercan reproduce this chart by running the simulation and selecting “MA order” for the Xvariable and “Volatility” for the Y variable in the worksheet “MA”.As exhibited in Figure 11.6, though the variance of the trading rule returns differsdepending on the moving average order, the overall level remains quite independent ofthe time horizon. The difference in terms of risk would be of no consequence to a markettrader, the same level of riskiness as a buy and hold position in the underlying. On amark-to-market basis active management does not add risk relative to a passive holdingof the asset.4For instance ρ(MA-2, MA-117) means the rule returns correlation between the simple moving average oforder 2 and the moving average of order 117 is equal to 0.102
342
Applied Quantitative Methods for Trading and Investment12.33%Volatility of MA returnsUSD-JPY returns volatility
Annualised volatillity
12.33%12.32%12.32%12.31%12.31%12.30%12.30%0
20
40
60Moving average order
80
100
Figure 11.6 Volatility of spot USD–JPY and moving averages trading rule returns of order 2to 117
11.8 EXPECTED RETURN OF LINEAR FORECASTERSTo depict the relationship between the returns generated by moving averages trading ruleswe conducted a Monte Carlo experiment. We generated 10 000 simulated series of 400 datapoints. The random variables were generated using a methodology developed by Zangari(1996)5 where each random variable r t results from the mixture of two independentnormal distributions of mean zero: one with a probability of occurrence p = 1 and astandard deviation of 1 and the other with a probability of success of 0.1 and a standarddeviation of 3.r t = (0,1) + (0,3)B(0.1)For each of the series drawn we calculated the return that would have been generatedfor moving averages of order 2 to 117. We also noted the normalised drift |µm|/σ mand the ﬁrst three autocorrelation coefﬁcients of the series drawn. We then regressedthe normalised drift and the ﬁrst three autocorrelation coefﬁcients of the underlying timeseries against the computed moving average trading rule annualised returns. The resultsare shown in Figures 11.7 and 11.8.6As illustrated in Figures 11.7 and 11.8, the expected return of moving averages is afunction of both drift and price dependencies. Short-term moving average returns will be5The simulation can be found in the spreadsheet Lequeux002.xls. Note however that with 10 000 iterations thesimulation takes a long time to run. It is possible to change the number of iterations, to say 100, by selecting“Tools”, “Macro”, “Visual Basic Editor” and changing the line of code “For i = 1 To 10000” to “For i = 1To 100”.6Figure 11.7 can be found in the “Sensitivity to Drift” workbook of Lequeux004.xls. Figure 11.8 can be foundin the “Sensitivity of Dependencies” workbook of Lequeux004.xls.
Optimal Allocation of Trend-Following Rules
343
0.70
0.60
Regression coefficient
0.50
0.40
0.30
0.20
0.10
0.002
6 10 14 18 22 26 30 34 38 42 46 50 54 58 62 66 70 74 78 82 86 90 94 98 102106110114Moving avarage order
Figure 11.7 Normalised drift and moving average trading rule returns1.40
a1a2a3
Regression coefficient
1.201.000.800.600.400.200.000
20
40
60Moving average order
80
100
Figure 11.8 Autocorrelations and moving average trading rule returns
far more sensitive to price dependencies rather than drift, whereas the return of longerterm moving averages will be more sensitive to the exchange rate drift. This relationshipis well highlighted by Figures 11.7 and 11.8. On the one hand we note that the regressioncoefﬁcient between the drift of the underlying time series and the delivered return of themoving average trading rule increases with the length of the moving average. On theother hand the coefﬁcients of regression between returns of the moving average tradingrule and the ﬁrst three autocorrelation coefﬁcients of the underlying time series decrease
344
Applied Quantitative Methods for Trading and InvestmentTable 11.6 Weighting of ρ as a function of the moving average order
Weightings
MA-2
MA-3
MA-5
MA-9
MA-17
MA-32
MA-61
MA-117
A(1)A(2)A(3)
1.0000.0000.000
0.6340.3660.000
0.4260.3360.238
0.3700.3280.302
0.3670.3180.316
0.3390.3240.337
0.3110.3050.384
0.3290.2820.390
with the length of the moving average. Research on the expected return of trend-followingstrategies has been published. Acar (1994) wrote a seminal paper that proposes a closedform solution to estimate ex-ante the return of a trend-following trading rule. The resultsare interesting because they provide an unbiased framework for a better understanding ofwhat may drive the returns generated by linear trading rules. Assuming that the rate ofreturn, xt , follows a Gaussian process, Acar established the mean of the trading rule by:22E(rt+1 ) = 2/πσρe(−µf /2σf ) + µ(1 − 2[−µf /σf ])where ρ = Corr(xt+1 , ft ),  is the cumulative function of N (0,1), µ is the expectedvalue and σ is the standard deviation of the underlying return xt . The expected value andstandard deviation of the forecaster ft are given by µf and σf . In the case of a randomwalk with drift model the above formula will simplify as E(rt+1 ) = µ(1 − 2[−µf /σf ]).In this case the expected return is a negative function of the volatility. In the special casewhen there is no drift the expected proﬁt is given by:2σ Corr(xt+1 , ft )E(rt+1 ) =πIn our applied example we use an adjusted form of this proposition where ρ =3i=1 wi Corr(xt+1 , ft ), with wi the weight attributed as a function to the sensitivity ofthe forecaster to autocorrelation coefﬁcients. The weights were derived from our Zangarisimulation and are shown in Table 11.6.7
11.9 AN APPLIED EXAMPLEIn the previous sections of this chapter we have highlighted that it is possible to determineex-ante the transaction cost, the volatility, the estimated returns as well as the correlationbetween linear individual forecasters such as moving averages. This provides us with thenecessary statistical tools to establish a framework for a mean–variance allocation modelof trend-following rules. Though we could use a larger sample of linear trading rules suchas simple, weighted, exponential moving averages and momentums, we choose to focusonly on a subset of trading rules for the sake of computational simplicity. The readercould easily translate this framework to a wider universe of trading rules if required. Inthe following we try to determine ex-ante what would be the optimal weighting betweenmoving averages of order 2, 3, 5, 9, 32, 61 and 117 to maximise the delivered informationratio. The model has been programmed into a spreadsheet8 to give the reader the possibility7
The results may be found in the “Regressions Data” sheet of Lequeux004.xls, A59:I62.The model can be found in the “Simulation” sheet of the spreadsheet Lequeux005.xls. The results containedin Tables 11.7 and 11.8 may be found in the appropriate workbooks of Lequeux003.xls. The reader can seehow they were arrived at by referring to the “Performance Basket” sheet of Lequeux005.xls.8
Optimal Allocation of Trend-Following Rules
345
to experiment and also investigate the effect of changing the sampling methodology toestimate the various parameters required to estimate ex-ante returns of our set of movingaverages. Figure 11.9 details the workings of the spreadsheet.Tables 11.7 and 11.8 show the results that were obtained when using this model andwhen allocating equally between the moving averages of order 2, 3, 5, 9, 32, 61 and 117.The returns generated by the moving average trading rule allocation model have outperformed the equally weighted basket of moving averages in terms of return divided byrisk (IR) for four currencies out of ﬁve. It also provides cash ﬂow returns that are closerto normal as denoted by the lower kurtosis of the daily returns (Tables 11.7 and 11.8).Though these may not appear as outstanding results at ﬁrst, one has to take into account thelevel of transaction cost incurred. Because of the daily rebalancing necessary the cost ofimplementation will be far greater for the allocation model than for the equally weightedapproach. The fact that the model still manages to outperform the equally weighted basketdemonstrates somehow the higher quality of the allocation model.
Expected return,volatility & IR ofMA basket
Select currency andtransaction cost for
Expected return, volatility &transaction cost of MAs
Expected correlationof MA returns
Solved weightsto optimise theinformation ratio
Estimates of means, variancesand autocorrelationcoefficients
Autocorrelationcoefficients weightings
Solved MA weights
Figure 11.9 Simple moving averages allocation model
346
Applied Quantitative Methods for Trading and InvestmentTable 11.7 Results for the equally weighted basket of moving averagesEUR–USD
USD–JPY
GBP–USD
USD–CAD
AUD–USD
1.56%6.77%0.23−11.27%
6.06%9.01%0.67−11.13%
−2.01%5.24%−0.38−13.35%
−1.73%3.79%−0.46−16.85%
3.77%7.64%0.49−10.64%
−1.66
−1.23
−2.55
−4.45
−1.39
−2.11%1.96%0.123.36
−3.16%5.64%0.8712.56
−1.36%1.48%0.173.26
−1.54%0.90%−0.785.52
−3.53%2.65%−0.015.39
ReturnVolatilityIRMaximum cumulativedrawdownNormalised maximumcumulative drawdownMaximum daily lossMaximum daily proﬁtSkewKurtosis
Table 11.8
ReturnVolatilityIRMaximum cumulativedrawdownNormalised maximumcumulative drawdownMaximum daily lossMaximum daily proﬁtSkewKurtosis
Results for the mean–variance allocation model
EUR–USD
USD–JPY
GBP–USD
USD–CAD
AUD–USD
−0.47%9.97%−0.05−16.52%
10.29%12.75%0.81−13.54%
1.32%7.58%0.17−16.17%
−0.98%5.48%−0.18−15.34%
10.73%11.05%0.97−18.68%
−1.66
−1.06
−2.13
−2.80
−1.69
−2.67%2.58%0.080.92
−3.22%5.65%0.524.36
−1.49%2.15%0.250.90
−1.61%1.51%−0.191.76
−4.72%2.65%−0.252.65
11.10 FINAL REMARKSIn this chapter we ﬁrst highlighted some of the statistical properties of trading rulesand developed the reason for the interest in these for a market participant. In the latterpart of the chapter we went on to provide the reader with an unbiased framework fortrading rules allocation under constraint of cost and maximisation of information ratio.The results have shown that in four currency pairs out of ﬁve this would have providedbetter economic value than using an equally weighted basket of trading rules. These resultsare signiﬁcant for active currency managers who seek to provide their investors with abalanced risk/return proﬁle in the currency markets whilst using trend-following models.Though the results are encouraging, the challenge remains ahead. How to forecast the driftand serial dependencies remains the essence in any forecasting context and remains thekey factor in bettering such a model. It may well be that the answer for forecasting thoseparameters lies more within a macro-fundamental approach rather than using uniquely theprice as an information discounting process.
Optimal Allocation of Trend-Following Rules
347
REFERENCESAcar, E. (1994), “Expected Return of Technical Forecasters with an Application to Exchange Rates”,Presentation at the International Conference on Forecasting Financial Markets: New Advances forExchange Rates and Stock Prices, 2–4 February 1994, London. Published in Advanced TradingRules, Acar & Satchell (eds), Butterworth-Heinemann, 1998.Acar, E. and P. Lequeux (1995), “Trading Rules Proﬁts and the Underlying Time Series Properties”,Presentation at the First International Conference on High Frequency Data in Finance, Olsen andAssociates, Zurich, Switzerland, 29–31 March 1995. Forthcoming in P. Lequeux (ed.), FinancialMarkets Tick by Tick, Wiley, London.Acar, E. and P. Lequeux (1996), “Dynamic Strategies: A Correlation Study”, in C. Dunis (ed.),Forecasting Financial Markets, Wiley, London, pp. 93–123.Acar, E., P. Lequeux and C. Bertin (1994), “Tests de marche aléatoire basés sur la proﬁtabilité desindicateurs techniques”, Analyse Financière, 4 82–86.Arnott, R. D. and T. K. Pham (1993), “Tactical Currency Allocation”, Financial Analysts Journal,Sept, 47–52.Billingsley, R. and D. Chance (1996), “Beneﬁts and Limitations of Diversiﬁcation among Commodity Trading Advisors”, The Journal of Portfolio Management, Fall, 65–80.Kritzman, M. (1989), “Serial Dependence in Currency Returns: Investment Implications”, Journalof Portfolio Management, Fall, 96–102.LeBaron, B. (1991), “Technical Trading Rules and Regime Shifts in Foreign Exchange”, Universityof Wisconsin, Social Science Research, Working Paper 9118.LeBaron, B. (1992), “Do Moving Average Trading Rule Results Imply Nonlinearities in ForeignExchange Markets”, University of Wisconsin, Social Science Research, Working Paper 9222.Lequeux, P. and E. Acar (1998