PREDICTABILITY OF NON- LINEAR TRADING RULES IN THE US STOCK MARKET CHONG & LAM 2010
Overview Liu Min Qi Yichen Zhang Fengtian Literature review of the paper A brief introduction of the 3 models used in the paper The strategies and results Model selection for our project Data selection for our project Statistical tests for data selected Model regression techniques (parameter estimation and trading strategies for SETAR model) Algorithm in java Demonstrate SETAR model (JAVA program) Results and analysis
Literature Review The paper examines the effect of 3 models Namely Variable Moving Average (VMA Model) Autoregressive Model (AR Model) Self-Exciting Threshold Autoregressive Model (SETAR Model) On four major US indices Dow Jones Industrial Average (DJIA) NASDAQ composite index New York Stock Exchange composite index Standard and Poor 500 index (S&P 500)
VMA Model General Form VMA(S, L) Where S represents the short term window And L represents the long term window Calculated from the below formula for a n day moving average Models used in the paper includes VMA(1, 50), VMA(1, 150) and VMA(1, 200)
AR Model General Form Commonly referred as AR (p) Model Where p is the order of autoregressive part
AR Model A linear time series model For the paper, an AR (1) Model was used ∆Y t is the natural log difference of the stock index Where ∆Y t = Y t - Y t-1 Alphas are the fitted coefficient ε t is the residual error AR (1) was chosen because the estimated coefficients are significant, suggesting it is good enough for modelling dynamics of return series
SETAR Model General Form: Usually referred as SETAR(k, p) model k is the number of regimes p is the order of the autoregressive part
SETAR Model A non-linear time series model An extension of AR models Higher degree of flexibility due to the threshold parameter Which introduces a regime switching behavior
SETAR Model For the paper, a SETAR(2, 1) model was chosen ∆Y t is the natural log difference of the stock index Where ∆Y t = Y t - Y t-1 Alphas and betas are the fitted coefficient ε t is the residual error d is the delay factor γ is the threshold parameter
SETAR Model Why SETAR (2, 1)? Because (as claimed by paper) It is simple and has good predictability Threshold parameter already captures non-linearity Therefore additional benefit of higher autoregressive order is small The estimated coefficients are significant based on statistical tests Suggesting first order model is good enough to describe dynamics of the return series
Strategies For VMA Pretty straightforward Buy if MA(S) > MA(L) Sell if MA(S) < MA(L) For AR and SETAR Model fitting is required for every w observations Buy if > 0 Sell if < 0
Trading ruleBuySellBuy>0Sell>0Buy - Sell SETAR(1,50) E-04 SETAR(1,150) E-03 SETAR(1,200) E-03 AR(1,50) E-04 AR(1,150) E-04 AR(1,200) E-03 VMA(1,50) E-04 VMA(1,150) E-04 VMA(1,200) E-04 Dow Jones Industrial Average index. ‘Buy>0’ and ‘Sell>0’ are the fraction of positive buy and sell returns. Buy, Sell and Buy-Sell columns show the one day conditional mean for buy, sell and buy-sell returns
NASDAQ composite index Trading ruleBuySellBuy>0Sell>0Buy - Sell SETAR(1,50) E-03 SETAR(1,150) E-03 SETAR(1,200) E-03 AR(1,50) E-03 AR(1,150) E-03 AR(1,200) E-03 VMA(1,50) E-03 VMA(1,150) E-04 VMA(1,200) E-04
New York Stock Exchange composite index Trading ruleBuySellBuy>0Sell>0Buy - Sell SETAR(1,50) E-03 SETAR(1,150) E-03 SETAR(1,200) E-03 AR(1,50) E-03 AR(1,150) E-03 AR(1,200) E-03 VMA(1,50) E-04 VMA(1,150) E-04 VMA(1,200) E-04
Standard and Poor 500 index Trading ruleBuySellBuy>0Sell>0Buy - Sell SETAR(1,50) E-04 SETAR(1,150) E-04 SETAR(1,200) E-03 AR(1,50) E-04 AR(1,150) E-04 AR(1,200) E-04 VMA(1,50) E-04 VMA(1,150) E-04 VMA(1,200) E-04
Results Performed using observation window period of: 50, 150, and 200 days SETAR performed slightly better than AR for DJIA and S&P 500 AR performed slightly better in NASDAQ Both SETAR and AR outperformed VMA
Model Selection Therefore, SETAR model was chosen for our project Because of the better results obtained from the paper And also because of its non-linearity Which gives it flexibility in modelling However, simulation may be slow due to a need for multi-parameter fitting for each signal
Data Selection We had chosen the HK’s Hang Seng Index and Singapore’s Straits Times Index Data selection (from yahoo finance) Hang Seng Index Daily closing price from 31 st Dec 1986 to 31 st Dec 2010 Total 5962 Observations Straits Times Index Daily closing price from 31 st Dec 1987 to 31 st Dec 2010 Total 5754 Observations
Index Statistics Summary statistics for daily log returns – full sample JB stat represents the Jarque-Bera test for normality ρ (i) is the estimated autocorrelation at lag i Q(5) is the Ljung-Box Q statistic at lag 5 Numbers marked with * are significant at 1% level Heng Seng index Straits Times Index Count Mean Standard Error Standard Deviation Sample Variance Kurtosis * * Skewness * * JB stat * * ρ(1) ρ(2) ρ(3) ρ(4) ρ(5) Q(5) ** **
Statistical Results From the values of skewness, kurtosis, and Jarque-Bera statistics Returns are leptokurtic, skewed, and not normally distributed Ljung-Box Q statistics at 5 th lag significant at 1% Suggestive of substantial serial correlation in stock returns Essential for existence of trading-rule profits These results are consistent with that found in the main paper Which may be indicative of the model’s efficiency on the Hang Seng Index and Straits Times Index
Parameter estimation Model:
Parameter estimation Use Ordinary Least Square method to find γ and θ. (Refer to Bruce E. Hansen (1997) Inference in TAR Models. Studies in Nonlinear Dynamics & Econometrics, Volume 2, Issue 1)
Parameter estimation Remarks: 1.In our case, d (delay parameter) = 1. 2.Observe that the residual variance only takes on at most n distinct values as γ is varied, we set γ = Δ Y t-d, t = 2,…,n.
Parameter estimation Thus, the estimate of θ is Given n observations, we use OLS to obtain the fitted coefficients γ and θ and predict ∆Y t+1 based on ∆Y t.
Trading strategy The SETAR trading strategy is as follows: where W is the observation window and is the conditional expectation of Δ Y t+1 based on most recent W observations up to day t.
Trading strategy Remarks: Just imagine that we use the model to predict the price tomorrow. If the predicted price is higher than today actual price, then we buy. Otherwise, we sell. The value of α and β change with the observation window, as we use the most recent w observations. So as we move, we roll the window forward and update the α and β to get the next prediction of Δ Y.
Trading strategy For example, given W = 50 and n = 100, 1. Obtain γ and α 0 α 1 β 0 β 1. 2. Obtain Δ Y t+1 based on Δ Y t and estimated parameters. 3. Buy if Δ Y t+1 > 0. Sell if Δ Y t+1 < 0. 4. Shift the observation window (set t = t+1) and repeat Step 1 to Step 3.
Algorithm in java The model
Algorithm in java
Least squares method
Algorithm in java
Actual stock index moving by time HANG SENG INDEX
SETAR(1, 50) model Predicted stock index moving by time - HANG SENG INDEX
Actual stock index moving by time - STAITS TIMES INDEX
SETAR(1, 50) model Predicted stock index moving by time - STRAITS TIMES INDEX
SETAR(1, 150) model Predicted stock index moving by time - HANG SENG INDEX
SETAR(1, 200) model Predicted stock index moving by time - HANG SENG INDEX
Empirical results of implementing the trading strategies on the HANG SENG INDEX Trading rule BuySell σ(Buy)σ(Sell) Buy>0Sell>0Buy-Sell SETAR(1, 50) SETAR(1, 150) SETAR(1, 200)
Empirical results of implementing the trading strategies on the STRAITS TIMES INDEX Trading ruleBuySell σ(Buy)σ(Sell) Buy>0Sell>0Buy-Sell SETAR(1, 50) SETAR(1, 150) SETAR(1, 200)
Future work T-Statistics Mean return of buy periods. Mean return of sell periods. Buy- sell return. AR Model The performance of the nonlinear trading rule (SETAR) is compared with that of the linear model (AR).
Thank You