NguyenNgocKhoa KTL-AutoRecovered
NguyenNgocKhoa KTL-AutoRecovered
ASSIGNMENT
ECONOMETRICS 2
Hanoi, 2023
Stock price and Return volatility forecasting using Time Series Model
CONTENT
1. Introduction.......................................................................................3
2. Forecasting by ARIMA and ARCH-GARCH................................3
2.1. Methodology.....................................................................................3
2.2. ARIMA modelling results................................................................8
2.3 ARCH-GARCH modelling results.................................................17
3 Conclusion........................................................................................19
4 References........................................................................................19
2
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
1. Introduction
These days, stock market has become an attractive and interesting investment channel
around the world for not only investment institutions but also individual investors, and
Vietnam is not lying out of the trend. Vietnam stock’s market is established in 2000s and
now it has three popular stock exchanges: HOSE, HNX and UPCOM. During and after
the COVID-19 pandemics, the number of people joining stock market increases
significantly, but most people invest emotionally and base on the short-term information.
Besides that, there are also some unknown factors affecting the stock market. Then, the
stock price always fluctuates tremendously. Therefore, forecasting the trend of stock
price is necessary for individuals and organizations to build a suitable investment
strategy. I suggest the ARIMA model and ARCH-GARCH model to forecast for the
stock price and volatility of return in the short term based on historical data.
I will be using the stock BCM (Becamex IDC Corp) listed on HOSE to analyze
forecast future values. BCM, another name of Becamex Investment & Industrial
Development, after more than 40 years of operating, Becamex IDC has become the
leading brand in the fields of investment and construction of industrial zone, residential
area, urban area and transportation infrastructure. It is also renowned for sponsoring a
successful football team playing in VLeague. Becamex IDC was founded in 1976 under
the name of Bến Cát General Trade Company (Becamex), in 1999 the company changed
its name to Trade – Investment and Development Company (BECAMEX Corp). For the
past 3 decades, the Becamex is the key driver behind Binh Duong’s remarkable
industrialization during the past 3 decades. Yet, it remains our shared commitment to
accelerate the economic transformation of Vietnam, moving up the global value chain,
embracing the Industry 4.0 revolution and beyond.
2.1. Methodology
2.1.1 Data collection
The study takes data from website investing.com.vn, which is a trustworthy source
providing information about the Vietnamese Stock market. The collected data is the daily
closing share price of Becamex IDC Corp (BCM), from 1st January 2022 to 31st July
2023. Thus, there is a total of 391 observations. This study will use the last 10
observations as validation set and the previous series as training set.
3
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
This includes checking stationarity and determining order of ARIMA. The Dickey-
Fuller test will be used to check for stationarity. The null hypothesis is that the series is
unit root and non-stationary. If the DF statistic is larger than the critical value, then we
reject the null hypothesis, the series is stationary. Next, I will plot the PACF and ACF of
the stationary series to determine the order. The order of AR is order of the series having
partial correlation while the order of MA is the order of the series having auto correlation.
After choosing order for ARIMA, I will estimate the intercept and coefficients of this
model. With the criteria of significant coefficients and AIC criteria, I will choose good
models to go on the next step.
In this part, I will check the stationarity by using inverse roots and unit circle. If all
the inverse roots lie strictly inside the circle, then the series is stationary. Furthermore, I
check that whether the residual series is white noise with mean equal zero, constant
variance, no serial correlation and normal distribution.
I will use the ARIMA models after diagnostic checking to forecast for the validation
data. The model with smaller forecast error will be chosen to forecast for the future.
4
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
In which:
{
Y t is the stationary I (d ) series
μ is theintercept
ε t is the shock of Y t at timet
p isthe order of AR (p)
ϕ p is the coefficient of AR( p)
q is the order of MA (q )
θ q is the coefficient of MA (q)
5
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
(1986). The GARCH model is also used to forecast for volatility, allowing the
conditional variance to be dependent upon previous own lags.
In which:
{
2
σ t is the conditional variance of ε t
ε t is the shock at timet
w is long−run volatility parameter ensure the variance is positive ¿
p , q is theorder of GARCH ( p , q)
γ i ≥0 , δ i ≥ 0 should be held
¿
2 w
σ =
1−¿ ¿
6
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
Price
Mean 86896.68
Median 87000.00
Minimum 64500.00
Maximum 116300.00
Range 51800.00
Standard Error 560.13
Standard Deviation 11075.87
Sample Variance 122674937.64
Kurtosis -0.23
Skewness 0.33
Observations 391
The table shows the descriptive measures for the investigated price series. The table
indicates that the mean price over the period is 86896.68 and standard deviation is
7
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
11075.17. Meanwhile, the plot shows that there is a upward trend in the stock price. This
information can give a first glance that the series is trend stationary. the price fluctuates
significantly over the period shown. To have a further analysis about the stationarity and
volatility of the price, the study will apply the ARIMA model and ARCH-GARCH model
in the next step.
The study uses the Dickey Fuller test to test the stationarity of the price series. The
result is presented in the table below:
Critical value at 1%
Test DF test statistics (τ¿ ¿ stat )¿
(τ¿ ¿ 0.01)¿
Dickey-Fuller test with trend
Price series −3.0136 −3.98
It is shown that τ stat is smaller than τ 0.01, then the study does not reject the hypothesis
that the series is unit root at level of significance of 1%. Thus, the price series is non-
stationary, and it is necessary to transform this series into the stationary form to have a
better forecasting. This study will take the 1st difference to the original series and log-
return series in ARIMA model applications.
The table below shows the results of Dickey Fuller test for 1st difference series and
log-return series.
Critical value at 1%
Test DF test statistics (τ¿ ¿ stat )¿
(τ¿ ¿ 0.01)¿
Dickey-Fuller test without drift
Difference series −15.893 −2.58
Log-return series −18.9238 −2.58
It is show that τ stat is greater than τ 0.01 for both difference series and log-return series,
then both series are not unit root at level of significance of 1%. Thus, difference series
and log-return series can be used to apply ARIMA model.
8
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
Figure 3. PACF plot of 1st difference Figure 4. ACF plot of 1st difference
In the PACF plot, the series having partial correlation is 2, 6, 7 and 10. Meanwhile, in
the ACF plot, the series has autocorrelation at order 2, 6, 7, 8, 10 and order 15 is the
furthest order having autocorrelation. Thus, it is indicated that the 1 st difference series
uses the order 4 for AR and order 7 for MA in ARIMA model.
The two figures below show the plot of ACF and PACF of the return rate series.
Figure 5. PACF plot return rate Figure 6. ACF plot of return rate
9
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
In the PACF plot, the series has partial autocorrelation at order 2, 7 and 7 is also the
furthest order having partial autocorrelation. Meanwhile, in the ACF plot, the series has
autocorrelation at order 2, 6, 7, 8, 10 and order 15 is the furthest order having
autocorrelation.
Comparing five models, we can firstly reject models ARIMA (5,1,2), ARIMA (6,1,2)
and ARIMA (7,1,2) as the AR and MA coefficients are not all significant even though the
intercepts of these three models are significant at 10%. Thus, if we use these models to
forecast, the results can be biased. Next, we consider the remaining models. Both
ARIMA (7,1,2)-fixed and ARIMA (2,1,2) have significant intercepts and coefficients at
level of significance of 10%. Since the AIC of ARIMA (7,1,2)-fixed is the smallest
therefore ARIMA (7,1,2)-fixed is the most suitable model of the above. However, I also
put ARIMA (2,1,2) to the diagnostic checking part because of the recommendation of the
RStudio.
10
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
Comparing these five models, we can firstly reject ARIMA (2,0,2) due to the
insignificant intercept at 10%. Similarly, not all the coefficients in ARIMA (7,0,2)- no
intercept and ARIMA (7,0,6) fixed are significant at level of significance of 10%,
therefore; we reject these three models. Next, we consider the remaining models. Both
ARIMA (2,0,2)-no intercept and ARIMA (7,0,6) fixed have significant intercepts and
coefficients at level of significance of 10%, so the AIC will be put on the table. As the
AIC of ARIMA (7,0,2) fixed is the smaller one, therefore; we can conclude ARIMA
(7,0,2) fixed is the most suitable model of the above but the ARIMA (2,0,2) no intercept
still meets the requirements and put it to the checking residual pharse
11
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
The first diagnostic checking is stationary checking by inverse roots and unit circle. If
the series is stationary, then all the inverse roots should lie strictly within the AR unit
circle and MA unit circle
Figure 7. Unit circle of ARIMA (2,1,2) Figure 8. Unit circle of ARIMA (7,1,2) fixed
Figure 9. Unit circle of ARIMA (2,0,2) Figure 10. Unit circle of ARIMA (7,0,2) fixed
12
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
intercept
Degree of 6 3 6 3
freedom
P-value 0.07791 0.071 0.1121 0.03441
(Residual test)
13
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
For ARIMA (7,0,2) fixed, we reject hypothesis since the P-value is 3.441%, lower
than the significance level of 5%.For the rest model ARIMA (2,1,2), ARIMA (7,1,2)
fixed and ARIMA (2,0,2) as the P-value is higher than 5%. Thus, residual series of the
rest models are white noises. After two diagnostic tests, it is obvious that we can apply
ARIMA (2,1,2), ARIMA (7,1,2) fixed and ARIMA (2,0,2) models to forecast for the
validation data.
To find the best model among ARIMA (2,1,2), ARIMA (7,1,2) fixed, ARIMA (2,0,2)
no intercept, I will apply these models to forecast for the validation set. The model with
smaller forecast error will be the best model and be chosen to forecast for future stock
price.
Date 1st difference (2,1,2) 1st difference (7,1,2) Log return (2,0,2)
fixed
18/07/2023 50.1620 143.45 0.001786218
19/07/2023 -76.6798 -158.27 -0.001194465
20/07/2023 -248.2627 -257.76 -0.00252595
21/07/2023 -220.7552 143.4 -0.000506511
24/07/2023 -89.3370 237.02 0.00212202
25/07/2023 -44.4273 42.28 0.001893978
26/07/2023 -102.6040 -27.03 -0.000812905
27/07/2023 -150.1752 -86.53 -0.002378765
28/07/2023 -129.9253 -34.16 -0.000780382
31/07/2023 -89.6467 81.41 0.001798015
14
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
Table 10. Forecasting results for stock price using ARIMA (7,1,2) fixed.
Table 11. Forecasting results for stock price using ARIMA (2,0,2) no intercept.
From Table 9, we can see that the further the lapse of time, the higher difference
between actual data and the forecasting results. However, the forecasting results have less
than 5% error, within allowable limits. According to this result, the stock price of BCM
tends to decrease gradually soon. To have better comparison between two models and
forecast evaluation, I will calculate the forecast error through three criterias: RMSE,
MAE, MAPE.
15
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
From Table 12, the RMSE, MAE and MAPE of ARIMA (2,0,2) no intercept is the
smallest of all three ARIMA model. Thus, we can conclude that model ARIMA (2,0,2)
no intercept used for log-return series which is the best model to forecast. The equation
of ARIMA (2,0,2) no intercept is:
r t =0.6604 r t−1−0.9725 r t −2+ ε t −0.6359 ε t−1+ 0.9077 ε t −2
In this part, to forecast for the stock price for the next 10 days from 31/07/2023, I use
model ARIMA (2,0,2) no intercept for log-return series with full data from 1/1/2022 to
31/07/2023 (a total of 391 observations). The forecasting method is mixed. The following
table is the stock price forecasting of VNM for the next 10 days.
From Table 12, the forecast stock price of BCM continued to experience a slight
decrease in the beginning of August. This trend is also witnessed in the actual price but
more significant. However, the forecasting results have exceeded 5% error, within the
allowable limits.
16
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
Chi-squared 29.377
Degree of freedoms 1
P-value 5.958e-08
As the log-return series is stationary around zero, I will forecast for the volatility of
the log-return of BCM stock prices. I use the ARCH test from order 1 for the log-return
series, and it is indicated that the P-value of the ARCH test for order 1 to order 98 are
smaller than the significant level of 5% .
Therefore, the series has ARCH effects to order 98. However, in order to have a better
forecast for volatility, the GARCH test for the series will be added. And the available
models for GARCH test are presented in the table below.
17
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
δ2 - - - - - -
As the table presents, we can see that ARCH (4) model has an insignificant
coefficient at the level of significance of 5%. And when I increase the order of ARCH
model, there are still some insignificant coefficients. So the ARCH (3) model is the best
one to forecast among the ARCH model. However, GARCH is a better model to forecast
than ARCH (Bollerslev (1986) and Taylor (1986)) as lagged variances are added. We can
see that all the intercept and coefficients of GARCH (1,1) are significant at 5%, while
GARCH (1,2) has one coefficient that is insignificant at 5%. To conclude, the GARCH
(1,1) is the best model to forecast for the volatility of BCM’s log-return.
Degree of freedoms 2 1
In the context that GARCH (1,1) is also a popular model in academic research of votality
(Hansen & Lunde, 2005), the study would choose this model for analysis & prediction.
The model of GARCH (1,1) for residuals of Logreturn ARIMA (2,0,2) no intercept series
is:
2 2 2
σ t =0.000001292+0.09465 σ t −1+ 0.9017 ε t −1+ v t
2 0.000001292
σ = =0.00035
1−0.09465−0.9017
18
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
In this part, to forecast for the volatility of the log-return series for the next day
1/8/2023, I use the above model GARCH (1,1) with fixed forecasting method. The
following table is the volatility forecasting for the next 10 days.
19
Nguyễn Ngọc Khoa– Actuary 63
Stock price and Return volatility forecasting using Time Series Model
4 References
1. Brooks C. (2014) Introductory Econometrics for Finance, 3E.
6. Denzil Watson, Antony Head (2016) Corporate Finance: Principles and Practice
8th Edition.
20
Nguyễn Ngọc Khoa– Actuary 63