is the vector of the mean and  the covariance matrix for two assets with zeromean, the multivariate normal distribution looks like this:−112ρ12 x1 x2x22x12exp−+ 2f (x1 , x2 , σ1 , σ2 , ρ12 ) =22σ1 σ22πσ1 σ2 (1 − ρ12)2(1 − ρ12) σ12σ2(10.18)The likelihood function for a time-varying covariance matrix is the following:
ln L = ln
Ti=1
=
T
f (x1,i , x2,i , ) =
T
ln(f (x1,i , x2,i , ))
i=1
12ln(1 − ρ12,t)2t=122x2,tx1,t12ρ12,t x1,t x2,t−−+ 222σ1,t σ2,t2(1 − ρ12,t) σ1,tσ2,t− ln(2π ) − ln(σ1,t ) − ln(σ2,t ) −
(10.19)
The optimisation routine will be to maximise the log-likelihood function with respect tothe decay factor:max ln L(λ) with 0 < λ ≤ 1
326
Applied Quantitative Methods for Trading and Investment
Here the covariance speciﬁcation is:222= (1 − λ̂)ε1,t−1+ λ̂σ1,t−1σ1,t222σ2,t= (1 − λ̂)ε2,t−1+ λ̂σ2,t−1
(10.20)
22σ12,t= (1 − λ̂)ε1,t−1 ε2,t−1 + λ̂σ12,t−1
where λ̂ is the optimal decay factor.The spreadsheet of Figure 10.11 (“OptimalDecay” in Bourgoin002.xls) is identical tothe RiskMetrics sheet up to column I. The only major difference here is that we calculatethe log-likelihood function (column J) at every time step (equation (10.18)). The sumof the log-likelihood functions (equation (10.19)) is performed in cell M9. Since we aretrying to ﬁnd the optimal lambda, we need to maximise this cell (see Solver settings). Theoptimal decay factor is obtained after using the Solver and optimising the spreadsheet incell M8.
Figure 10.11
The bivariate optimal decay model
10.4.3 The diagonal GARCH modelIn the diagonal GARCH model, each variance and covariance term has its own dynamics(set of parameters), so the functional form for the model is:222σ1,t= ω11 + α11 ε1,t−1+ β11 σ1,t−1222σ2,t= ω22 + α22 ε2,t−1+ β22 σ2,t−1
(10.21)
22σ12,t= ω12 + α12 ε1,t−1 ε2,t−1 + β12 σ12,t−1
The spreadsheet of Figure 10.12 (“Full Diagonal GARCH” in Bourgoin002.xls) is morecomplex because we have to deal with multiple constraints:αij + βij < 1,
αij > 0,
βij > 0
and ωii > 0
Applied Volatility and Correlation Modelling
327
Figure 10.12 The diagonal GARCH model
Note that ωij is allowed to be negative because otherwise you constrain the long-termcorrelation to be positive between the two assets.10The spreadsheet is identical to the optimal decay spreadsheet with regard to the loglikelihood function. The optimisation, on the other hand, has multiple constraints (17 intotal!) and nine parameters as indicated in the Solver settings. Each variance (1 and 2)and the covariance have their own parameters (alphas, betas and omegas).Because the optimisation procedure is quite complicated, it might require a long timeto run.1110.4.4 The diagonal GARCH model with variance targetingFor this model, we apply the variance targeting technique mentioned in Section 10.3.3 tothe multivariate context:ωij = σ 2ij (1 − αij − βij )(10.22)Because most of the time the alphas and betas tend to have very similar optimised valuesbetween each equation, the complexity arises from the ﬁt of the omegas, using the variance1011
This can be derived easily from the long-term correlation implied by the diagonal model.It took 35 seconds to run on a PIII-600 MHz with 256 Mb RAM and Windows 2000.
328
Applied Quantitative Methods for Trading and Investment
Figure 10.13 The diagonal GARCH model with variance targeting
targeting technique accelerates the optimisation procedure dramatically.12 In practice, themodel appeal is greatly enhanced.In the spreadsheet of Figure 10.13 (“Full Diagonal GARCH VT” in Bourgoin002.xls),we can see that the spreadsheet is almost identical to the diagonal GARCH model, theonly subtle difference is that Omega1, Omega2 and Omega12 are not part of the optimisation procedure (check cells M41 and M42), they have been replaced by formulas(equation (10.22)) as shown in cell M12. The number of constraints is reduced to 15from 17 and most importantly the number of parameters is now only six instead of nine.10.4.5 The scalar GARCH model with variance targetingThis is the most simpliﬁed model of the “traditional” type. We consider that all assets underanalysis have the same parameters, i.e., αij = α and βij = β, and we use the variancetargeting technique in order to eliminate the omegas from the estimation procedure, sothe number of parameters to optimise becomes completely independent from the numberof variables in the model and equal to two (α and β):222= σ 21 (1 − α − β) + αε1,t−1+ βσ1,t−1σ1,t222σ2,t= σ 22 (1 − α − β) + αε2,t−1+ βσ2,t−1
(10.23)
22σ12,t= σ 212 (1 − α − β) + αε1,t−1 ε2,t−1 + βσ12,t−112Instead of 35 seconds, the optimisation routine took only 17 seconds, half the time required by the generalmodel with hardly any reduction in the likelihood function.
Applied Volatility and Correlation Modelling
329
Figure 10.14 The scalar GARCH model with variance targeting
The worksheet of Figure 10.14 (“Scalar GARCH VT” in Bourgoin002.xls) shows howthis is done. Only MVDGAlpha1 and MVDGBeta1 are optimised, the omegas are derivedfrom the unconditional variances and the covariance calculated in F3:H3. Here the numberof constraints is a lot smaller (ﬁve).We can note a clear drop in the log-likelihood function to −10 489.96, whereas beforewe had hardly any changes of likelihood at all. Although quite restrictive, the structuralconstraints of the model (alphas and betas identical across all equations) provide a veryappealing model where the number of parameters is always two, so the optimiser will bevery quick.13 In this particular case, we can see that the log-likelihood function is lowerthan the optimal decay (−10 481) but the model guarantees the mean-reversion process,avoiding the underestimation of the volatilities during calm periods.10.4.6 The fast GARCH modelThe purpose of this model is to enable us to calculate conditional correlation in a veryfast and easy manner. It was ﬁrst presented by Bourgoin (2002), and follows in thefootsteps of Ding and Engle (1994), Ledoit (1999), Pourahmadi (1999), Bourgoin (2000)and Athayde (2001) to deal with a very large number of assets. For the purpose of clarity,we will only present the model in a 2 × 2 setting but the application is straightforwardto generalise to a very large number of assets.As we have seen in the previous paragraph it is possible to use the variance targetingprocess on a scalar GARCH in order to obtain a multivariate model with just two parameters regardless of the size of the covariance matrix. This is very appealing because theoptimisation routine will converge quickly to the results. However the problem would bemuch simpler if we could avoid the estimation of the levels of persistence, α and β.Here we follow the idea of Athayde (2001) on the estimation of these parameters. If a“natural” index exists for the data, we can calculate a univariate GARCH model and apply13
The optimisation routine took only 7 seconds to ﬁnd the solution.
330
Applied Quantitative Methods for Trading and Investment
the parameters of persistence to the multivariate scalar GARCH model. On the other handwhen there is not a “natural” index for the data, we construct a synthetic index returnfrom an equal-weighted portfolio of all the assets under analysis and perform a univariateGARCH on this synthetic return series. Bourgoin (2002) showed that within a portfolioof equities, bonds or FX, there is not much difference between the persistence parameters(alpha and beta) of each component within the portfolio; hence it is practically equivalentto a scalar GARCH model.So, as an extension to the previous model, we calculate a single univariate GARCHmodel for the synthetic index (here a GARCH(1,1) but any model discussed in the volatility section can be used) and apply its persistence parameters “down” to the covariancematrix, like Athayde (2001).So the model looks like this. From either a synthetic or a real index, we have:222σindex,t= ωIndex + α̂εIndex,t−1+ β̂σindex,t−1
(10.24)
We then plug in the persistence parameters (α̂ and β̂) “down” into the multivariateequation:222= σ 21 (1 − α̂ − β̂) + α̂ε1,t−1+ β̂σ1,t−1σ1,t222σ2,t= σ 22 (1 − α̂ − β̂) + α̂ε2,t−1+ β̂σ2,t−1
(10.25)
22σ12,t= σ 212 (1 − α̂ − β̂) + α̂ε1,t−1 ε2,t−1 + β̂σ12,t−1
The result is an optimisation procedure that runs on a single univariate GARCH(1,1)model. Asymmetric speciﬁcations can be used as well, as long as we can specify thelong-term covariance terms like in the GJR model.Now let us look at the set-up required to perform this new model in the spreadsheetexample of Figure 10.15 (“Fast GARCH” in Bourgoin002.xls). The ﬁrst task required is to
Figure 10.15 The fast GARCH model
Applied Volatility and Correlation Modelling
331
1.000.800.600.400.200.00−0.20
01-Jan-0015-Mar-0028-May-0010-Aug-0023-Oct-0005-Jan-0120-Mar-0102-Jun-0115-Aug-0128-Oct-0110-Jan-0225-Mar-0207-Jun-0220-Aug-0202-Nov-0215-Jan-0330-Mar-0312-Jun-0325-Aug-0307-Nov-0320-Jan-0403-Apr-0416-Jun-0429-Aug-0411-Nov-0424-Jan-0508-Apr-0521-Jun-0503-Sep-0516-Nov-0529-Jan-0613-Apr-0626-Jun-0608-Sep-0621-Nov-0603-Feb-0718-Apr-0701-Jul-0713-Sep-0726-Nov-0708-Feb-0822-Apr-0805-Jul-0817-Sep-0830-Nov-0812-Feb-0927-Apr-0910-Jul-0922-Sep-09
−0.40
Over-reaction of the fast GARCHand RiskMetrics
Fast Garch Correlation
Excel Full Diag(1,1)
RiskMetrics
Figure 10.16 Multivariate GARCH correlation model comparison
calculate the returns on an equal-weighted portfolio (column L) and perform a univariateGARCH(1,1) on it (columns M and N for the variance and the log-likelihood functionrespectively); this is done in the grey cells. The cells Q25:Q27 contain the variancetargeting omegas derived from the unconditional covariance matrix and the alpha andbeta calculated for the univariate GARCH model. The rest follows through in the sameway as the other spreadsheets.10.4.7 Model comparisonWe can plot the time-varying correlation resulting from the various models as inFigure 10.16 (“GraphicalResults” in Bourgoin002.xls). We can see that despite the addedcomplexity and difference in the models, they provide the same patterns over time.We can notice that the fast GARCH and RiskMetrics tend to slightly overestimate andunderestimate the correlation during stress times.
10.5 CONCLUSIONWe’ve seen from this chapter that it is possible to calculate GARCH models in Excel,from the most simple one in a univariate setting (RiskMetrics) to a fairly complicatedmodel in a multivariate framework (diagonal GARCH). We’ve shown that quite quicklywhen we increase the complexity of the model, the number of parameters and constraintsincreases dramatically, as well as the time required for the optimisation. In order todeal with the high dimensionality problem, we’ve shown a new technique called thefast GARCH that is easily implemented in Excel and can provide a solution when thenumber of assets under analysis becomes large. The spreadsheets show how to performthe statistical analysis, build the maximum likelihood function required for the Solver inorder to obtain the parameters for each model and several comparison charts have also
332
Applied Quantitative Methods for Trading and Investment
been produced. Although it is not recommended to use Excel as an advanced statisticalpackage, the ﬂexibility and insight gained by the spreadsheet-based approach shouldoutweigh the drawbacks, at least in the beginning.
REFERENCESAlexander, C. and A. M. Chibumba (1997), “Orthogonal GARCH: An Empirical Validation inEquities, Foreign Exchange and Interest Rates”, School of Mathematical Sciences DiscussionPaper, Sussex University.Athayde, G. (2001), “Forecasting Relationship between Indexes of Different Countries: A NewApproach to the Multivariate GARCH”, Forecasting Financial Markets Conference, London,May 2001.Black, F. (1976), “Studies of Stock Market Volatility Changes”, Proceedings of the American Statistical Association, Business and Economic Statistics Edition, 177–181.Bourgoin, F. (2000), “Large Scale Problem in Conditional Correlation Estimation”, in Advances inQuantitative Asset Management, C. Dunis (ed.), Kluwer Academic, Dordrecht.Bourgoin, F. (2002), “Fast Calculation of GARCH Correlation”, Forecasting Financial MarketsConference, London, May 2001.Diebold, F. X., A. Hickman, A. Inoue and T. Schuermann (1997), “Converting 1-Day Volatility toh-Day Volatility: Scaling by Sqrt(h) is Worse than You Think”, Working Paper, Department ofEconomics, University of Pennsylvania.Ding, X. and R. F. Engle (1994), “Large Scale Conditional Covariance Matrix: Modelling, Estimation and Testing”, UCSD Discussion Paper.Engle, R. F. and J. Mezrich (1995), “Grappling with GARCH”, Risk Magazine, 8 (9), 112–117.Engle, R. F. and J. Mezrich (1996), “GARCH for Groups”, Risk Magazine, 9 (8), 36–40.Gallant, A. R. (1997), An Introduction to Econometric Theory, Princeton University Press, Princeton, NJ.Glosten, L. R., R. Jagannathan and D. Runkle (1993), “Relationship between the Expected Valueand the Volatility of the Nominal Excess Returns on Stocks”, Journal of Finance, 48 (5),1779–1801.J. P. Morgan (1995), RiskMetrics Technical Document, Version 4.0.J. P. Morgan (1997), RiskMetrics Monitor Fourth Quarter, pp. 3–11.Ledoit, O. (1999), “Improved Estimation of the Covariance Matrix of Stock Returns with an Application to Portfolio Selection”, UCLA Working Paper.Ledoit, O., P. Santa-Clara and M. Wolf (2001), “Flexible Multivariate GARCH Modeling with anApplication to International Stock Markets”, UCLA Working Paper.Pourahmadi, M. (1999), “Joint Mean–Covariance Models with Applications to Longitudinal Data:Unconstrained Parametrization”, Biometrika, 86, 677–690.Tsay, S. T. (2002), Analysis of Financial Time Series, Wiley InterScience, New York.
11
Optimal Allocation of Trend-FollowingRules: An Application Case of TheoreticalResultsPIERRE LEQUEUX
ABSTRACTThis chapter builds upon previously published results on the statistical properties of tradingrules to propose an allocation model for trading rules based on simple moving averages.This model could easily be extended to cover a larger universe of linear trading rules andis presented here purely as a proof of concept. We use theoretical results on volatility, correlation, transactions costs and expected returns of moving averages trading rules within amean–variance framework to determine what should be the optimal weighting of tradingrules to maximise the information ratio, thereby presenting an unbiased methodology ofselecting an ex-ante optimal basket of trading rules.
11.1 INTRODUCTIONMoving averages have now been used for many years by both academics and marketparticipants. Whereas the former have usually been using moving averages trading rulesas a means of testing for market efﬁciency (LeBaron, 1991, 1992; Levich and Thomas,1993; Schulmeister, 1988; Taylor, 1980, 1986, 1990a,b, 1992, 1994), traders have hadmore proﬁt-motivated goals in mind. It is therefore quite surprising that only a relativelysmall section of literature has been devoted to the statistical properties of trend-followingtrading rules. This is clearly one of the most important issues for a market practitioner.Statistical properties of trading rules may give clearer insights in regard of the level oftransactions cost, diversiﬁcation, risk and also return one might expect under various pricetrend model hypotheses. This chapter ﬁrst presents some of the mainstream results thathave been published by Acar and Lequeux (1995, 1996), Acar et al. (1994) and Acar(1994). In the latter part of this chapter we demonstrate how these theoretical resultscould be used within a mean–variance trading rule allocation model.
11.2 DATATo illustrate the main ﬁndings on the statistical properties of moving averages andalso our mean–variance trading rules allocation model we use a sample of ﬁve currency pairs USD–JPY, EUR–USD, GBP–USD, USD–CAD and AUD–USD. The dataApplied Quantitative Methods for Trading and Investment. 2003 John Wiley & Sons, Ltd ISBN: 0-470-84885-5
Edited by C.L. Dunis, J. Laws and P. Naı̈m
334
Applied Quantitative Methods for Trading and InvestmentTable 11.1 Summary statistics of daily logarithmic returns of exchange ratesUSD–JPY
EUR–USD
GBP–USD
USD–CAD
AUD–USD
0.03%0.75%−5.65%3.22%−0.845.080.04590.0187−0.0402−0.02050.00790.0013−0.01310.0390−0.04720.0746
−0.03%0.59%−2.28%2.64%0.271.210.0249−0.0120−0.00980.0009−0.01810.0195−0.0148−0.0060−0.00270.0335
0.00%0.46%−2.15%2.04%0.081.170.0526−0.0316−0.04490.00530.0397−0.0236−0.02120.02080.00210.0013
0.01%0.32%−1.54%1.61%−0.252.410.0218−0.0254−0.0059−0.0162−0.0684−0.0094−0.0377−0.03550.07460.0097
−0.02%0.65%−2.65%4.69%0.242.950.0210−0.02820.0277−0.0297−0.01220.0148−0.0014−0.02480.0097−0.0034
MeanStdevMinMaxSkewKurtosisa(1)aa(2)a(3)a(4)a(5)a(6)a(7)a(8)a(9)a(10)a
a(n) means the autocorrelation coefﬁcient of order n.60%
40%USD-JPY
USD-CAD0%GBP-USD−20%
−40%
AUD-USD
EUR-USD
−60%
Figure 11.1
15/02/2002
15/12/2001
15/10/2001
15/08/2001
15/06/2001
15/04/2001
15/02/2001
15/12/2000
15/10/2000
15/06/2000
15/04/2000
15/02/2000
15/12/1999
15/10/1999
15/08/1999
15/06/1999
15/04/1999
15/02/1999
15/12/1998
15/10/1998
15/08/1998
15/06/1998
15/04/1998
15/02/1998
15/12/1997
15/10/1997
15/08/1997
15/06/1997
15/04/1997
15/02/1997
15/12/1996
15/10/1996
15/08/1996
15/06/1996
15/04/1996
15/02/1996
−80%
USD-JPYEUR-USDGBP-USDUSD-CADAUD-USD
15/08/2000
Cumulative spot returns
20%
Cumulative return of spot exchange rates
covers the period 15/02/1996 to 12/03/2002, a total of 1582 daily observations. For eachexchange rate we have the spot foreign exchange rate and the relevant 1-month interest rate series. As is usual in empirical ﬁnancial research, we use daily spot returns,deﬁned as ln(St /St−1 ). Each of the exchange rates is sampled at 16:00 GMT. We use ahypothetical transaction cost of −0.03%, which generally represents the operating cost
Optimal Allocation of Trend-Following Rules
335
in the interbank market. Table 11.1, taken from cells O1:X17 of the worksheet “Data”of Lequeux001.xls, shows the summary statistics of the daily logarithmic returns for theﬁve exchange rates sampled. As can be seen in Table 11.1, all the series under review areclearly non-normal. This is to be expected for most ﬁnancial time series (Taylor, 1986).It is also worth noting that the time series have had a signiﬁcant mean over the periodand that they all exhibit positive serial dependencies of ﬁrst order. Overall the spotexchange rates studied here have exhibited a trend over the period 1996 to 2002. Thisis more particularly true for USD–JPY, EUR–USD and AUD–USD, as shown in theworksheet “Cumulative Spot Returns” and reproduced in Figure 11.1.
11.3 MOVING AVERAGES AND THEIRSTATISTICAL PROPERTIESMarket efﬁciency depends upon rational, proﬁt-motivated investors (Arnott and Pham,1993). Serial dependencies or in more simple terms, trends, have been commonly observedin currency markets (Kritzman, 1989; Silber, 1994) and are linked to market participants’activity and their motivation. Central banks attempt to dampen the volatility of theircurrency because stability assists trade ﬂows and facilitates the control of inﬂation level.A central bank might intervene directly in the currency market in times of high volatility,such as the ERM crisis in 1992, or act as a discreet price-smoothing agent by adjustingtheir domestic interest rate levels. Other participants in the foreign exchange markets,such as international corporations, try to hedge their currency risk and therefore have nodirect proﬁt motivation. Arguably they may have the same effect as a central bank onexchange rate levels. The success of momentum-based trading rules in foreign exchangemarkets is most certainly linked to the heterogeneity of market agents and their differentrationales, which render the FX markets inefﬁcient. Autoregressive models such as movingaverages are indeed particularly well suited to trade foreign exchange markets, where itis estimated that around 70% of strategies are implemented on the back of some kindof momentum strategies (Billingsley and Chance, 1996). Lequeux and Acar (1998) havedemonstrated the added value of using trend-following methods by proposing a transparentactive currency benchmark that relies on simple moving averages to time the currencymarket. The AFX benchmark they proposed had a return over risk ratio exceeding 0.641for the period January 1984 to November 2002, and this compares well to other traditionalasset classes. Moving average trading rules are an attractive proposition as a decision rulefor market participants because of their simplicity of use and implementation. The dailysimple moving average trading rules work as follows: when the rate penetrates from below(above) a moving average of a given length m, a buy (sell ) signal is generated. If thecurrent price is above the m-moving average, then it is left long for the next 24 hours,otherwise it is held short. Figure 11.2 illustrates the working of such a trading rule.The rate of return generated by a simple moving average of order m is simply calculatedas: Rt = Bt−1 Xt where Xt = ln(Pt /Pt−1 ) is the underlying logarithmic return, Pt the assetprice at time t, and Bt−1 the signal triggered by the trading rule at time t − 1. Bt−1 is
1
See http://www.quant.cyberspot.co.uk/AFX.htm for more information on the AFX.
336
Applied Quantitative Methods for Trading and Investment
15 000If Pt < MA then SellUSD Buy JPY
14 50014 00013 50013 000
MA 117 DAYS
12 50012 00011 500SPOT USD-JPY
11 000
If Pt > MA then BuyUSD Sell JPY
10 500
Feb-02
Oct-01
Dec-01
Aug-01
Apr-01
Jun-01
Feb-01
Oct-00
Dec-00
Aug-00
Apr-00
Jun-00
Feb-00
Oct-99
Dec-99
Aug-99
Apr-99
Jun-99
Feb-99
Oct-98
Dec-98
Aug-98
Apr-98
Jun-98
Feb-98
Oct-97
Dec-97
Aug-97
Apr-97
Jun-97
Feb-97
Oct-96
Dec-96
Aug-96
Apr-96
Jun-96
Feb-96
10 000
Figure 11.2 Spot USD–JPY and moving average trading rule of 117 days
deﬁned as:
 Bt−1 = 1
m1 if Pt−1 >Pt−i (long position) m i=1m����