InvestmentTable 1.3
PP test statistic
a
−41.04039
EUR/USD returns PP test1%5%10%
−3.4370−2.8637−2.5679
critical valueacritical valuecritical value
MacKinnon critical values for rejection of hypothesis of a unit root.
Lag truncation for Bartlett kernel: 7Residual variance with no correctionResidual variance with correction
(Newey–West suggests: 7)3.29E-053.26E-05
Phillips–Perron Test EquationDependent Variable: D(DR− USEURSP)Method: Least SquaresSample(adjusted): 3 1749Included observations: 1747 after adjusting endpointsVariable
Coefﬁcient
Std. error
t-Statistic
Prob.
DR− USEURSP(−1)C
−0.982298−0.000212
0.0239330.000137
−41.04333−1.539927
0.00000.1238
R-squaredAdjusted R-squaredS.E. of regressionSum squared resid.Log likelihoodDurbin–Watson stat.
0.4911880.4908960.0057370.0574366538.0301.999532
Mean dependent var.S.D. dependent var.Akaike info. criterionSchwarz criterionF -statisticProb(F -statistic)
−1.36E-060.008041−7.482575−7.4763181684.5550.000000
0.04
EUR/USD returns
0.030.020.010−0.01−0.02−0.0318 October 1994 to 3 July 2001
Figure 1.3 The EUR/USD returns series (18 October 1994 to 3 July 2001)
Applications of Advanced Regression Analysis
9
the autocorrelation coefﬁcients reveals that the EUR/USD returns series is white noiseat the 99% conﬁdence interval, the results of which are presented in Table 1.4. For suchseries the best predictor of a future value is zero. In addition, very noisy data often makesforecasting difﬁcult.The EUR/USD returns summary statistics for the examined period are presented inFigure 1.4. They reveal a slight skewness and high kurtosis and, again, the Jarque–Berastatistic conﬁrms that the EUR/USD series is non-normal at the 99% conﬁdenceinterval. However, such features are “common in high frequency ﬁnancial time seriesdata” (Gençay, 1999: 94).Table 1.4 EUR/USD returns correlogramSample: 1 1749Included observations: 1748
123456789101112
Autocorrelation
Partial correlation
Q-Stat.
Prob.
0.018−0.0120.003−0.0020.014−0.0090.007−0.0190.0010.0120.012−0.028
0.018−0.0130.004−0.0020.014−0.0100.008−0.0190.0020.0120.012−0.029
0.54870.82000.83940.84511.19111.33641.41972.03712.04052.31332.57873.9879
0.4590.6640.8400.9320.9460.9700.9850.9800.9910.9930.9950.984
400Series:DR_USEURSPSample 2 1749Observations 1748300
200
100
0−0.0250
−0.0125
0.0000
0.0125
MeanMedianMaximumMinimumStd. Dev.SkewnessKurtosis
−0.000214−0.0003770.033767−0.0248980.0057350.4345035.009624
Jarque–BeraProbability
349.14550.000000
0.0250
Figure 1.4 EUR/USD returns summary statistics (17 October 1994 to 3 July 2001)
10
Applied Quantitative Methods for Trading and Investment
A further transformation includes the creation of interest rate yield curve series, generated by:yc = 10 year benchmark bond yields–3 month interest rates
(1.2)
In addition, all of the time series are transformed into returns series in the mannerdescribed above to account for their non-stationarity.
1.4 BENCHMARK MODELS: THEORY AND METHODOLOGYThe premise of this chapter is to examine the use of regression models in EUR/USDforecasting and trading models. In particular, the performance of NNR models is comparedwith other traditional forecasting techniques to ascertain their potential added value asa forecasting tool. Such methods include ARMA modelling, logit estimation, MovingAverage Convergence/Divergence (MACD) technical models, and a naı̈ve strategy. Exceptfor the straightforward naı̈ve strategy, all benchmark models were estimated on our insample period. As all of these methods are well documented in the literature, they aresimply outlined below.1.4.1 Naı̈ve strategyThe naı̈ve strategy simply assumes that the most recent period change is the best predictorof the future. The simplest model is deﬁned by:Ŷt+1 = Yt
(1.3)
where Yt is the actual rate of return at period t and Ŷt+1 is the forecast rate of return forthe next period.The naı̈ve forecast can be reviewed in Sheet 1 column E of the oos Naı̈ve.xls Excelspreadsheet, and is also presented in Figure 1.5. Also, please note the comments withinthe spreadsheet that document the calculations used within the naı̈ve, ARMA, logit, andNNR strategies.The performance of the strategy is evaluated in terms of forecasting accuracy and interms of trading performance via a simulated trading strategy.1.4.2 MACD strategyMoving average methods are considered quick and inexpensive and as a result are routinely used in ﬁnancial markets. The techniques use an average of past observations tosmooth short-term ﬂuctuations. In essence, “a moving average is obtained by ﬁnding themean for a speciﬁed set of values and then using it to forecast the next period” (Hankeand Reitsch, 1998: 143).The moving average is deﬁned as:Mt = Ŷt+1 =
(Yt + Yt−1 + Yt−2 + · · · + Yt−n+1 )n
(1.4)
Applications of Advanced Regression Analysis
11
Figure 1.5 Naı̈ve forecast Excel spreadsheet (out-of-sample)
where Mt is the moving average at time t, n is the number of terms in the moving average,Yt is the actual level at period t 5 and Ŷt+1 is the level forecast for the next period.The MACD strategy used is quite simple. Two moving average series M1,t and M2,tare created with different moving average lengths n and m. The decision rule for taking positions in the market is straightforward. If the short-term moving average (SMA)intersects the long-term moving average (LMA) from below a “long” position is taken.Conversely, if the LMA is intersected from above a “short” position is taken.6 This strategy can be reviewed in Sheet 1 column E of the is 35&1MA.xls Excel spreadsheet, andis also presented in Figure 1.6. Again, please note the comments within the spreadsheetthat document the calculations used within the MACD strategy.The forecaster must use judgement when determining the number of periods n and mon which to base the moving averages. The combination that performed best over thein-sample period was retained for out-of-sample evaluation. The model selected was acombination of the EUR/USD series and its 35-day moving average, namely n = 1 andm = 35 respectively, or a (1,35) combination. A graphical representation of the combination is presented in Figure 1.7. The performance of this strategy is evaluated in terms offorecasting accuracy via the correct directional change measure, and in terms of tradingperformance.Several other “adequate” models were produced and their performance evaluated. Thetrading performance of some of these combinations, such as the (1,40) combination, and5
In this strategy the EUR/USD levels series is used as opposed to the returns series.A “long” EUR/USD position means buying euros at the current price, while a “short” position means sellingeuros at the current price.6
12
Applied Quantitative Methods for Trading and Investment
Figure 1.6
EUR/USD and 35-day moving average combination Excel spreadsheet
1.40
EUR/USD
1.301.201.101.000.900.8095
Figure 1.7
96
9798990017 October 1994 to 3 July 2001
01
EUR/USD and 35-day moving average combination
the (1,35) combination results were only marginally different. For example, the Sharperatio differs only by 0.01, and the average gain/loss ratio by 0.02. However, the (1,35)combination has the lowest maximum drawdown at −12.43% and lowest probability ofa 10% loss at 0.02%.7 The evaluation can be reviewed in Sheet 2 of the is 35&1MA.xlsand is 40&1MA.xls Excel spreadsheets, and is also presented in Figures 1.8 and 1.9,7A discussion of the statistical and trading performance measures used to evaluate the strategies is presentedbelow in Section 1.6.
Applications of Advanced Regression Analysis
13
Figure 1.8 (1,35) combination moving average Excel spreadsheet (in-sample)
respectively. On balance, the (1,35) combination was considered “best” and thereforeretained for further analysis.1.4.3 ARMA methodologyARMA models are particularly useful when information is limited to a single stationaryseries,8 or when economic theory is not useful. They are a “highly reﬁned curve-ﬁttingdevice that uses current and past values of the dependent variable to produce accurateshort-term forecasts” (Hanke and Reitsch, 1998: 407).The ARMA methodology does not assume any particular pattern in a time series, butuses an iterative approach to identify a possible model from a general class of models.Once a tentative model has been selected, it is subjected to tests of adequacy. If thespeciﬁed model is not satisfactory, the process is repeated using other models until asatisfactory model is found. Sometimes, it is possible that two or more models mayapproximate the series equally well, in this case the most parsimonious model shouldprevail. For a full discussion on the procedure refer to Box et al. (1994), Gouriérouxand Monfort (1995), or Pindyck and Rubinfeld (1998).The ARMA model takes the form:Yt = φ0 + φ1 Yt−1 + φ2 Yt−2 + · · · + φp Yt−p + εt − w1 εt−1 − w2 εt−2 − · · · − wq εt−q(1.5)8The general class of ARMA models is for stationary time series. If the series is not stationary an appropriatetransformation is required.
14
Applied Quantitative Methods for Trading and Investment
Figure 1.9 (1,40) combination moving average Excel spreadsheet (in-sample)
where Yt is the dependent variable at time t; Yt−1 , Yt−2 , . . . , Yt−p are the laggeddependent variables; φ0 , φ1 , . . . , φp are regression coefﬁcients; εt is the residual term;εt−1 , εt−2 , . . . , εt−p are previous values of the residual; w1 , w2 , . . . , wq are weights.Several ARMA speciﬁcations were tried out, for example ARMA(5,5) andARMA(10,10) models were produced to test for any “weekly” effects, which can bereviewed in the arma.wf1 EViews workﬁle. The ARMA(10,10) model was estimated butwas unsatisfactory as several coefﬁcients were not even signiﬁcant at the 90% conﬁdenceinterval (equation arma1010). The results of this are presented in Table 1.5. The modelwas primarily modiﬁed through testing the signiﬁcance of variables via the likelihoodratio (LR) test for redundant or omitted variables and Ramsey’s RESET test for modelmisspeciﬁcation.Once the non-signiﬁcant terms are removed all of the coefﬁcients of the restrictedARMA(10,10) model become signiﬁcant at the 99% conﬁdence interval (equationarma13610). The overall signiﬁcance of the model is tested using the F -test. The nullhypothesis that all coefﬁcients except the constant are not signiﬁcantly different from zerois rejected at the 99% conﬁdence interval. The results of this are presented in Table 1.6.Examination of the autocorrelation function of the error terms reveals that the residualsare random at the 99% conﬁdence interval and a further conﬁrmation is given by the serialcorrelation LM test. The results of this are presented in Tables 1.7 and 1.8. The modelis also tested for general misspeciﬁcation via Ramsey’s RESET test. The null hypothesisof correct speciﬁcation is accepted at the 99% conﬁdence interval. The results of this arepresented in Table 1.9.
Applications of Advanced Regression AnalysisTable 1.5
15
ARMA(10,10) EUR/USD returns estimation
Dependent Variable: DR− USEURSPMethod: Least SquaresSample(adjusted): 12 1459Included observations: 1448 after adjusting endpointsConvergence achieved after 20 iterationsWhite Heteroskedasticity–Consistent Standard Errors & CovarianceBackcast: 2 11Variable
Coefﬁcient
Std. error
t-Statistic
Prob.
CAR(1)AR(2)AR(3)AR(4)AR(5)AR(6)AR(7)AR(8)AR(9)AR(10)MA(1)MA(2)MA(3)MA(4)MA(5)MA(6)MA(7)MA(8)MA(9)MA(10)
−0.000220−0.042510−0.210934−0.359378−0.0410030.0013760.132413−0.2389130.1828160.026431−0.6156010.0377870.2279520.3412930.036997−0.004544−0.1407140.253016−0.206445−0.0140110.643684
0.0001400.0497980.0953560.0617400.0794230.0676520.0540710.0525940.0468780.0603210.0761710.0401420.0953460.0583450.0747960.0591400.0467390.0423400.0400770.0480370.074271
−1.565764−0.853645−2.212073−5.820806−0.5162640.0203382.448866−4.5426163.8998010.438169−8.0818670.9413432.3907855.8495510.494633−0.076834−3.0105985.975838−5.151153−0.2916618.666665
0.11760.39340.02710.00000.60580.98380.01450.00000.00010.66130.00000.34670.01690.00000.62090.93880.00270.00000.00000.77060.0000
R-squaredAdjusted R-squaredS.E. of regressionSum squared resid.Log likelihoodDurbin–Watson stat.
0.0163510.0025650.0053560.0409425528.2261.974747
Mean dependent var.S.D. dependent var.Akaike info. criterionSchwarz criterionF -statisticProb(F -statistic)
−0.0002250.005363−7.606665−7.5301211.1860640.256910
Inverted AR roots
0.84 + 0.31i0.07 + 0.98i−0.90 + 0.21i0.85 + 0.31i0.07 − 0.99i−0.90 + 0.20i
0.84 − 0.31i0.07 − 0.98i−0.90 − 0.21i0.85 − 0.31i0.07 + 0.99i−0.90 − 0.20i
0.55 − 0.82i−0.59 − 0.78i
0.55 + 0.82i−0.59 + 0.78i
0.55 − 0.82i−0.59 − 0.79i
0.55 + 0.82i−0.59 + 0.79i
Inverted MA roots
16
Applied Quantitative Methods for Trading and InvestmentTable 1.6
Restricted ARMA(10,10) EUR/USD returns estimation
Dependent Variable: DR− USEURSPMethod: Least SquaresSample(adjusted): 12 1459Included observations: 1448 after adjusting endpointsConvergence achieved after 50 iterationsWhite Heteroskedasticity–Consistent Standard Errors & CovarianceBackcast: 2 11Variable
Coefﬁcient
Std. error
t-Statistic
Prob.
CAR(1)AR(3)AR(6)AR(10)MA(1)MA(3)MA(6)MA(10)
−0.0002210.263934−0.444082−0.334221−0.636137−0.2470330.4282640.3534570.675965
0.0001440.0493120.0407110.0355170.0432550.0460780.0307680.0282240.041063
−1.5317555.352331−10.90827−9.410267−14.70664−5.36121313.9192112.5230716.46159
0.12580.00000.00000.00000.00000.00000.00000.00000.0000
R-squaredAdjusted R-squaredS.E. of regressionSum squared resid.Log likelihoodDurbin–Watson stat.
0.0152680.0097930.0053370.0409875527.4292.019754
Mean dependent var.S.D. dependent var.Akaike info. criterionSchwarz criterionF -statisticProb(F -statistic)
−0.0002250.005363−7.622139−7.5893342.7888720.004583
Inverted AR roots
0.89 + 0.37i0.08 − 0.98i−0.92 + 0.31i0.90 − 0.37i0.07 + 0.99i−0.93 + 0.31i
0.89 − 0.37i0.08 + 0.98i−0.92 − 0.31i0.90 + 0.37i0.07 − 0.99i−0.93 − 0.31i
0.61 + 0.78i−0.53 − 0.70i
0.61 − 0.78i−0.53 + 0.70i
0.61 + 0.78i−0.54 − 0.70i
0.61 − 0.78i−0.54 + 0.70i
Inverted MA roots
The selected ARMA model, namely the restricted ARMA(10,10) model, takes the form:Yt = −0.0002 + 0.2639Yt−1 − 0.4440Yt−3 − 0.3342Yt−6 − 0.6361Yt−10− 0.2470εt−1 + 0.4283εt−3 + 0.3535εt−6 + 0.6760εt−10The restricted ARMA(10,10) model was retained for out-of-sample estimation. The performance of the strategy is evaluated in terms of traditional forecasting accuracy andin terms of trading performance. Several other models were produced and their performance evaluated, for example an alternative restricted ARMA(10,10) model was produced (equation arma16710). The decision to retain the original restricted ARMA(10,10)model is because it has signiﬁcantly better in-sample trading results than the alternativeARMA(10,10) model. The annualised return, Sharpe ratio and correct directional changeof the original model were 12.65%, 1.49 and 53.80%, respectively. The corresponding
Applications of Advanced Regression Analysis
17
Table 1.7 Restricted ARMA(10,10) correlogram of residualsSample: 12 1459Included observations: 1448Q-statistic probabilities adjusted for 8 ARMA term(s)
123456789101112131415
Autocorrelation
Partial correlation
Q-Stat.
Prob.
−0.010−0.0040.004−0.0010.000−0.019−0.004−0.0150.0000.0090.031−0.0240.019−0.0280.008
−0.010−0.0040.004−0.0010.000−0.019−0.004−0.0150.0000.0090.032−0.0240.018−0.0280.008
0.15090.17770.19730.19900.19910.70990.72841.05731.05731.18242.61223.46003.97615.08975.1808
0.3040.5540.4550.4840.5530.5320.638
values for the alternative model were 9.47%, 1.11 and 52.35%. The evaluation can bereviewed in Sheet 2 of the is arma13610.xls and is arma16710.xls Excel spreadsheets,and is also presented in Figures 1.10 and 1.11, respectively. Ultimately, we chose themodel that satisﬁed the usual statistical tests and that also recorded the best in-sampletrading performance.1.4.4 Logit estimationThe logit model belongs to a group of models termed “classiﬁcation models”. Theyare a multivariate statistical technique used to estimate the probability of an upward ordownward movement in a variable. As a result they are well suited to rates of returnapplications where a recommendation for trading is required. For a full discussion of theprocedure refer to Maddala (2001), Pesaran and Pesaran (1997), or Thomas (1997).The approach assumes the following regression model:Yt∗ = β0 + β1 X1,t + β2 X2,t + · · · + βp Xp,t + εt
(1.6)
where Yt∗ is the dependent variable at time t; X1,t , X2,t , . . . , Xp,t are the explanatoryvariables at time t; β0 , β1 , . . . , βp are the regression coefﬁcients; εt is the residual term.However, Yt∗ is not directly observed; what is observed is a dummy variable Ytdeﬁned by:if Yt∗ > 0(1.7)Yt = 10otherwiseTherefore, the model requires a transformation of the explained variable, namely theEUR/USD returns series into a binary series. The procedure is quite simple: a binary
18
Applied Quantitative Methods for Trading and InvestmentTable 1.8
Restricted ARMA(10,10) serial correlation LM test
Breusch–Godfrey Serial Correlation LM TestF -statisticObs*R-squared
0.5822341.172430
ProbabilityProbability
0.5587810.556429
Dependent Variable: RESIDMethod: Least SquaresPresample missing value lagged residuals set to zeroVariable
Coefﬁcient
Std. error
t-Statistic
Prob.
CAR(1)AR(3)AR(6)AR(10)MA(1)MA(3)MA(6)MA(10)RESID(−1)RESID(−2)
8.33E-070.0006000.0195450.018085−0.028997−0.000884−0.015096−0.0145840.029482−0.010425−0.004640
0.0001440.0406120.0358860.0318760.0374360.0384110.0265380.0260530.0353690.0311880.026803
0.0057760.0147730.5446390.567366−0.774561−0.023012−0.568839−0.5597920.833563−0.334276−0.173111
0.99540.98820.58610.57060.43870.98160.56960.57570.40470.73820.8626
R-squaredAdjusted R-squaredS.E. of regressionSum squared resid.Log likelihoodDurbin–Watson stat.
0.000810−0.0061440.0053380.0409535528.0151.998650
Mean dependent var.S.D. dependent var.Akaike info. criterionSchwarz criterionF -statisticProb(F -statistic)
1.42E-070.005322−7.620186−7.5800920.1164470.999652
Table 1.9 Restricted ARMA(10,10) RESET test for model misspeciﬁcationRamsey RESET TestF -statisticLog likelihood ratio
0.7854680.790715
ProbabilityProbability
0.3756220.373884
variable equal to one is produced if the return is positive, and zero otherwise. The sametransformation for the explanatory variables, although not necessary, was performed forhomogeneity reasons.A basic regression technique is used to produce the logit model. The idea is to start witha model containing several variables, including lagged dependent terms, then through aseries of tests the model is modiﬁed.The selected logit model, which we shall name logit1 (equation logit1 of the logit.wf1EViews workﬁle), takes the form:
Applications of Advanced Regression Analysis
Figure