This article is an extension of the previous article to discover whether the ARIMA model can create a profitable trading strategy. In this article, ARIMA-GARCH will be implemented with the same strategy and data.
1. Introduction
Generalized Autoregressive Conditionally Heteroscedastic model (GARCH) is a mathematical model that models the change in variance in a range of time.
The main difference between GARCH and ARIMA lies in the heteroscedastic terms. Heteroscedastic refers to data with unequal variability, in other words, the variance always changes. It is the opposite of the homoscedastic, where it refers to data with equal variability. ARIMA model uses a homoscedastic assumption to models the data. Thus, leaving the variance changing unmodeled. For this reason, the GARCH model is implemented to handle the variance of the time series data.
2. Generalized Autoregressive Conditionally Heteroscedastic
The simple equation of GARCH (1,1) is stated below. Note that the general notation of GARCH is GARCH (p,q) with the definition of p and q is the same as the ARIMA.
The far-left variable is the conditional volatility, followed by weighted long-run variance, then the variable on the right side of the first plus is the weighted lagged square return then the far left variable is weighted lagged square variance.
3. Dataset
The dataset used in this article is Bank Central Asia (BCA) stock historical close price from 1 January 2019 to 31 December 2019. Note that the stock market only opens on weekdays and closes on the weekend and other special days. The plot of the dataset can be seen below.
4. Strategy
The ARIMA -GARCH strategy used in this article is nearly the same as the ARIMA strategy. The descriptive explanation of this strategy is mentioned below :
- For each day, n previous days are used for fitting the ARIMA model (21 previous days is used in this article).
- The fitting process will test each combination of p, d, and q. The value of p and q used in this article is ranging from 0 to 2. Whereas the value of d is 0 and 1.
- Each parameter combination will be tested and the ARIMA final model will be chosen by parameter combination that generated the least AIC value.
- The ARIMA fitting residual then fed to GARCH (1,1) model to predict the volatility.
- The ARIMA final model is used to make a prediction for the next day value
- The GARCH model also make a prediction for the next day value
- The final prediction is the sum of ARIMA and GARCH prediction
- If the prediction close value is higher than the current close value, the stock is longed. On the contrary, if the prediction close value is lower than the current close value, the stock is shorted.
- If the prediction is in the same direction as the previous day, there is no action.
5. Result
The prediction result of ARIMA GARCH is shown in the figure below. Again, the prediction result is nearly identical to the actual data. The MAPE value of the prediction is 0.007 %. Does this extremely low value lead to great equity profile?
The equity curve from the ARIMA-GARCH strategy and Buy & Hold Strategy is shown in the figure below. Turns out that the ARIMA-GARCH strategy is also can’t beat the stock price market.
The final equity for Buy & Hold Strategy and ARIMA-GARCH is 1.199 and 1.16 respectively. Recall the final equity for the ARIMA strategy was 1.1761, the ARIMA-GARCH final equity value is worse.
6. Conclusion
The ARIMA-GARCH trading strategy was conducted in the Bank Central Asia stock data throughout the 2019 year. The final equity for Buy & Hold strategy is 1.1999 and the ARIMA-GARCH trading strategy is 1.16. From the equation only, the ARIMA-GARCH trading strategy is not more profitable than the Buy & Hold strategy.