# Adaptive Heterogeneous Autoregressive Models of Realized Volatility Based on a Genetic Algorithm

Authors: Hui Qu; Ping Ji
Journal: Abstract and Applied Analysis
 (2014)

---

## Abstract

The heterogeneous autoregressive (HAR) models of high-frequency realized volatility are inspired by the Heterogeneous Market Hypothesis and incorporate daily, weekly and monthly realized volatilities in the volatility dynamics with a (1,5,22) time horizon structure. We build on the HAR models and propose a new framework, adaptive heterogeneous autoregressive (AHAR) models, whose time horizon structures are optimized by a genetic algorithm. Our models can be applied to markets with different heterogeneous structures, and their time horizon structures can be adjusted adaptively as the market's heterogeneous structure varies. Moving window tests with five-minute returns of the CSI 300 index indicate that the (1,5,22) structure originally proposed for American stock markets is not the best choice for Chinese stock markets, and Chinese stock markets’  heterogeneous structure does vary over time. Using four common loss functions, we find that the AHAR models outperform the corresponding HAR models in most of the forecast windows and thus are reasonable choices for volatility forecasting practices.


---

## Body

## 1. Introduction

Improving the forecast accuracy of asset return volatility is a key goal for researchers and practitioners, owing to volatility’s critical role in asset pricing, portfolio construction, risk management, and trading strategy design. Early researches using data of daily and lower frequencies treat volatility as unobservable and indirectly describe its dynamics by modeling the conditional variance of asset returns. Representative examples include the ARCH model of Engle [1], the GARCH model of Bollerslev [2], and the stochastic volatility model of Taylor [3], which have been largely extended and formed into the (G)ARCH-family models and the SV-family models. However, most of the latent volatility models have been unable to capture simultaneously several important empirical features of financial volatility, as discussed by Carnero et al. [4].In recent years, the increased availability of high-frequency intraday data has spurred the new “realized volatility” modeling literature. Andersen and Bollerslev [5], Andersen et al. [6, 7], and Barndorff-Nielsen and Shephard [8] proposed to use the realized volatility (RV) constructed by aggregating squared intraday returns as the measurement of ex-post daily volatility, which for the first time makes volatility “observable.” To separate the continuous sample path variation from the jumps is also possible with high-frequency intraday data. The realized bipower variation [9] constructed from the summation of appropriately scaled cross products of adjacent high-frequency absolute returns is commonly adopted as the measurement of the continuous sample path variation. Tests for statistically significant jumps can be constructed through the statistics proposed by Huang and Tauchen [10]. Inspired by the Heterogeneous Market Hypothesis and the HARCH model of Müller et al. [11, 12], Corsi [13, 14] proposed the heterogeneous autoregressive model of realized volatility (HAR-RV), which incorporates daily, weekly, and monthly realized volatilities in the volatility dynamics and achieves superior forecast performance compared with the volatility models using low-frequency data. Andersen et al. [15] further proposed the HAR-RV-J model and the HAR-RV-CJ model, which separate the contributions to volatility forecasting of the jumps and the continuous sample path variation. The above HAR models are all easily estimated using OLS besides their competitive forecast performance and thus have been largely extended by researchers and adopted in practice.Besides the above-mentioned traditional time series models, the recent advances in artificial intelligence have provided additional tools for researchers’ volatility forecasting practices. Dunis and Huang [16] empirically showed that the recurrent neural network (RNN) models apparently outperform the GARCH(1,1) model in forecasting the GBP/USD and USD/JPY exchange rate volatilities in terms of both forecast accuracy and trading efficiency. Neely and Weller [17] empirically illustrated that the genetic programming (GP) outperforms the GARCH(1,1) model while forecasting the DEM/USD and JPY/USD exchange rate volatilities at longer horizons especially under the MAE loss function. Ma et al. [18] proposed to generate volatility forecasting rules by wavelet transform and genetic algorithm (GA) and achieved forecast accuracy superior to that of the GARCH(1,1) model for S&P 100 index volatility. Chen et al. [19] applied support vector machine (SVM) in volatility forecasting under the GARCH framework and empirically revealed that the SVM-GARCH models’ performance in forecasting the one-period-ahead volatilities of the GBP/USD exchange rate and the NYSE composite index is superior to that of simple moving average, standard GARCH, nonlinear EGARCH, and traditional ANN-GARCH models. Hung [20] proposed the fuzzy GARCH model with a genetic algorithm estimation method and improved the GARCH model’s forecast performance. Tarsauliya et al. [21] proposed evolutionary hybrid artificial neural network models EANN-GARCH, EANN-GJR, and EANN-EGARCH which all achieve better forecast performance in terms of the RMSE compared with conventional ANNs and statistical methods. Hajizadeh et al. [22] proposed hybrid models based on EGARCH and artificial neural networks which provide better S&P 500 index volatility forecasts than the EGARCH model. Sermpinis et al. [23] proposed the higher order neural networks (HONNs) for forecasting FTSE 100 futures’ 21-day-ahead realized volatility and demonstrated better performance in terms of both statistical accuracy and trading efficiency when compared with the multilayer perceptron (MLP), the RNN, the GJR (GARCH-family), and the RiskMetrics. However, the rules mined from artificial intelligence tools usually lack clear economic interpretation and are not easily understandable. Accordingly, the current volatility modeling researches utilizing artificial intelligence tools are not well accepted or adopted in practice.Thus, in this paper, we take a new approach by using a genetic algorithm to optimize the HAR models’ time horizon structures. The genetic algorithm optimized time horizon structures reflect the markets’ heterogeneous structures and thus have clear economic interpretations. Specifically, the current applications of the HAR models all follow the (1,5,22) time horizon structure originally proposed for developed markets, using daily (1 day), weekly (5 days), and monthly (22 days) to represent the short-term, medium-term, and long-term investors’ trading frequencies, respectively. However, investors’ cultural backgrounds and investment habits, as well as the alternative investment choices, differ largely across markets, which will probably result in different heterogeneous structures across markets. Furthermore, investors’ trading frequencies may be affected by financial and economic policies as well as market conditions, which will probably lead to a market’s heterogeneous structure varying over time. Taking the above into consideration, we propose adaptive heterogeneous autoregressive (AHAR) models in this paper, whose time horizon structures are optimized by a genetic algorithm. Thus, the AHAR models can have different time horizon structures when applied to markets with different heterogeneous structures, and their time horizon structures can be adjusted adaptively as the market’s heterogeneous structure varies. The out-of-sample forecast performance of the AHAR-RV model, the AHAR-RV-J model, and the AHAR-RV-CJ model is compared with that of the corresponding HAR models through moving windows using five-minute returns of the CSI 300 index as empirical data, based on which we evaluate the necessity and effectiveness of such an adaptive modeling approach.The remainder of this paper is organized as follows. In Section2, we describe the HAR models, modify them to AHAR models, and introduce our design of the genetic algorithm. In Section 3, the comparative analysis of the AHAR models’ out-of-sample forecast performance in Chinese stock markets is presented. We conclude this paper in Section 4.


## 2. Models and Methods

### 2.1. Realized Volatility and Its Decomposition

LetΔ and M represent the sampling interval length and the corresponding number of intraday intervals (M=1/Δ), respectively. Then, the logarithmic return of the jth Δ-length sampling interval during day t is rt,j=yt,j-yt,j-1, j=1,2,…,M, where yt,j is the logarithmic price at the end of the jth Δ-length sampling interval. The daily realized volatility is defined by the summation of the squared intraday returns as RVt≡∑j=1Mrt,j2 [5–8], which converges uniformly in probability to the quadratic variation as Δ→0.The ratio-statistic of Huang and Tauchen [10] is used in this paper to identify significant daily jumps
(1)Zt=(RVt-BPVt)/RVt((π/2)2+π-5)(1/M)max⁡(1,QPVt/BPVt2),
where BPVt and QPVt are the realized bipower variation and the realized tripower quarticity [9], respectively, adopting the staggered sampling technique of Andersen et al. [15] to eliminate the impact of market microstructure noise
(2)BPVt=π2MM-2∑j=1M-2|rt,j||rt,j+2|,QPVt=14[Γ(7/6)Γ(1/2)]-3M2M-4∑j=1M-4|rt,j|4/3|rt,j+2|4/3|rt,j+4|4/3,
where Γ() is the Gamma function.In the absence of jumps in the price path during dayt, the ratio-statistic Zt is standard normal for Δ→0. Hence, we can identify the significant jumps by the ratio-statistics in excess of the standard normal critical value Φα (e.g., Φ0.95, Φ0.99, Φ0.999) [15]
(3)JVt=I(Zt>Φα)(RVt-BPVt),
where I() is the indicator function. Accordingly, the continuous sample path variation of day t is estimated as
(4)CVt=I(Zt≤Φα)RVt+I(Zt>Φα)BPVt.


### 2.2. The HAR Models

Inspired by the Heterogeneous Market Hypothesis and the HARCH model of Müller et al. [11, 12], Corsi [13, 14] proposed the HAR-RV model, in which the realized volatility is parameterized as a linear function of the lagged realized volatilities over different horizons. It is defined as
(5)RVt=α0+αdRVt-1+αwRVt-5:t-1+αmRVt-22:t-1+ε1,t,
where RVt-5:t-1=(1/5)∑j=15RVt-j and RVt-22:t-1=(1/22)∑j=122RVt-j are the past weekly and monthly realized volatilities. The parameters αd, αw, and αm evaluate the short-term, medium-term, and long-term investors’ contributions to the overall market volatility, respectively.Since the descriptive statistics (Table2) show that the logarithmic realized volatility is much closer to being normally distributed than is the raw realized volatility, thus more amenable to the use of standard time series procedures, the HAR-RV model cast in logarithmic form is used in this research:
(6)lnRVt=α0+αdlnRVt-1+αw(lnRV)t-5:t-1+αm(lnRV)t-22:t-1+ε1,t,
where (lnRV)t-k:t-1=(1/k)∑j=1klnRVt-j is the normalized multiperiod logarithmic realized volatility.Andersen et al. [15] further proposed the HAR-RV-J model and the HAR-RV-CJ model which separate the contributions to volatility forecasting of the jumps and the continuous sample path variation. The HAR-RV-J model cast in logarithmic form is
(7)lnRVt=α0+αdlnRVt-1+αw(lnRV)t-5:t-1+αm(lnRV)t-22:t-1+βln⁡(JVt-1+1)+ε2,t.The HAR-RV-CJ model cast in logarithmic form is(8)lnRVt=α0+αdlnCVt-1+αw(lnCV)t-5:t-1+αm(lnCV)t-22:t-1+βdln⁡(JVt-1+1)+βw(lnJV′)t-5:t-1+βm(lnJV′)t-22:t-1+ε3,t,
where (lnCV)t-k:t-1=(1/k)∑j=1klnCVt-j, (lnJV′)t-k:t-1=(1/k)∑j=1klnJVt-j′=(1/k)∑j=1kln⁡(JVt-j+1), k=5,22.The parameters of (6), (7), and (8) can all be easily estimated by applying the standard OLS regressions.


### 2.3. The AHAR Models

We build on the HAR models and propose the AHAR models by using genetic algorithm optimized time horizon structures instead of the (1,5,22) structure used in the HAR models. The AHAR-RV model, the AHAR-RV-J model, and the AHAR-RV-CJ model cast in logarithmic form are as follows:(9)lnRVt=α0+α1(lnRV)t-D1:t-1+α2(lnRV)t-D2:t-1+α3(lnRV)t-D3:t-1+ε1,t,lnRVt=α0+α1(lnRV)t-D1:t-1+α2(lnRV)t-D2:t-1+α3(lnRV)t-D3:t-1+βln⁡(JVt-1+1)+ε2,t,lnRVt=α0+α1(lnCV)t-D1:t-1+α2(lnCV)t-D2:t-1+α3(lnCV)t-D3:t-1+β1(lnJV′)t-D1:t-1+β2(lnJV′)t-D2:t-1+β3(lnJV′)t-D3:t-1+ε3,t,
where (D1, D2, D3) is the adaptive time horizon structure optimized by a genetic algorithm.


### 2.4. The Genetic Algorithm Design

A genetic algorithm is a stochastic optimization algorithm originally inspired by the process of natural evolution. It is comprised of three major operations: reproduction, crossover, and mutation, which are designed to ensure that the “fittest” members of the population survive and that their information is preserved and combined to generate possibly better offspring.This paper uses the genetic algorithm to optimize the AHAR models’ time horizon structures; thus, we design the following solution space and encoding as shown in Table1.Table 1
The GA’s solution space and encoding.
Horizon
Lower bound
Upper bound
Number of bits
1st
1
4
2
2nd
1
16
4
3rd
1
128
7Table 2
Descriptive statistics.
Mean
Standard deviation
Skew
Kurt
Max
Min
LB(20)
JB
ADF
RV
t
3.0393
E
-
04
3.5043
E
-
04
3.5834
25.8002
4.1991
E
-
03
1.4350
E
-
05
2857.0***
29060.4***
−10.2***
ln
⁡
RV
t
−8.5918
1.0156
−0.0283
2.4967
−5.4729
−11.1518
9669.7***
13.0***
−5.2***
CV
t
2.9185
E
-
04
3.3945
E
-
04
3.4319
24.4801
4.1991
E
-
03
1.1141
E
-
05
3021.2***
25870.2***
−9.0***
JV
t
1.2079
E
-
05
5.3441
E
-
05
13.0101
255.0796
1.2466
E
-
03
0
31.7**
3267252.0***
−34.6***
Note: LB represents the Ljung-BoxQ-statistics, JB represents the Jarque-Bera normality test statistics, ***represents the significance level of 1%, and **represents the significance level of 5%.Therefore, altogether 13 binary bits are used to represent each candidate (D1, D2, D3) structure. Besides, it is clear that the HAR models’ (1,5,22) structure is also in the GA’s solution space, whose encoding is (00,0100,0010101).The fitness functionf() of our GA is defined as the adjusted R2 which evaluates the model’s in-sample fit. Other parameters of the GA are set as follows: the population size K=40, the crossover rate pc=0.8, the mutation rate pm=0.05, and the maximum number of generations N=300.As illustrated by the GA’s flow chart in Figure1, after generating the initial population, each generation of population evolves through reproduction, crossover, and mutation operations sequentially to generate the offspring generation. Each (D1, D2, D3) structure of the initial population is created by randomly selecting Di between its lower bound and upper bound and it is ensured that D1<D2<D3; for example, if the random selection results in D1=2, D2=16, and D3=5, then we denote the candidate solution as (2,5,16).Figure 1
The GA’s flow chart.The roulette-wheel selection is adopted in the reproduction operation; that is, theith candidate solution (D1(i),D2(i),D3(i))’s probability of being selected for reproduction is f(i)/∑j=1Kf(j)=aR2(i)/∑j=140aR2(j), where aR2(i) is the adjusted R2 of the corresponding AHAR regression model with time horizon structure (D1(i),D2(i),D3(i)) on the sample data.As for the crossover operation, each time two candidate solutions of current population are randomly selected and, with probabilitypc=0.8, they will operate one-point crossover. Specifically, the 2nd binary bit and the 6th binary bit of the 13-bit-length binary string are randomly specified as the single crossover point with equal probability, and all data beyond that point in the two solutions’ strings are swapped to generate two new 13-bit-length strings replacing the parents; for example, (O,P,Q) and (X,Y,Z) are selected for crossover and the crossover point is the 6th binary bit; then, they will be replaced with (O,P,Z) and (X,Y,Q) in the population.As for the mutation operation, each candidate solution of current population has probabilitypm=0.05 to mutate, inverting a randomly selected bit of its binary string. The elitist rule replaces the worst solution of current population with the best solution of last generation and thus ensures that the “fittest” member always survives.We design two termination conditions: (i) the best solution keeps the same for at least 10 generations and (ii) the evolution reaches the maximum number of generations. Evolution terminates as far as one of the conditions is satisfied, and the (D1, D2, D3) structure with the highest fitness value in current generation is the optimal time horizon structure discovered by the GA.


## 2.1. Realized Volatility and Its Decomposition

LetΔ and M represent the sampling interval length and the corresponding number of intraday intervals (M=1/Δ), respectively. Then, the logarithmic return of the jth Δ-length sampling interval during day t is rt,j=yt,j-yt,j-1, j=1,2,…,M, where yt,j is the logarithmic price at the end of the jth Δ-length sampling interval. The daily realized volatility is defined by the summation of the squared intraday returns as RVt≡∑j=1Mrt,j2 [5–8], which converges uniformly in probability to the quadratic variation as Δ→0.The ratio-statistic of Huang and Tauchen [10] is used in this paper to identify significant daily jumps
(1)Zt=(RVt-BPVt)/RVt((π/2)2+π-5)(1/M)max⁡(1,QPVt/BPVt2),
where BPVt and QPVt are the realized bipower variation and the realized tripower quarticity [9], respectively, adopting the staggered sampling technique of Andersen et al. [15] to eliminate the impact of market microstructure noise
(2)BPVt=π2MM-2∑j=1M-2|rt,j||rt,j+2|,QPVt=14[Γ(7/6)Γ(1/2)]-3M2M-4∑j=1M-4|rt,j|4/3|rt,j+2|4/3|rt,j+4|4/3,
where Γ() is the Gamma function.In the absence of jumps in the price path during dayt, the ratio-statistic Zt is standard normal for Δ→0. Hence, we can identify the significant jumps by the ratio-statistics in excess of the standard normal critical value Φα (e.g., Φ0.95, Φ0.99, Φ0.999) [15]
(3)JVt=I(Zt>Φα)(RVt-BPVt),
where I() is the indicator function. Accordingly, the continuous sample path variation of day t is estimated as
(4)CVt=I(Zt≤Φα)RVt+I(Zt>Φα)BPVt.


## 2.2. The HAR Models

Inspired by the Heterogeneous Market Hypothesis and the HARCH model of Müller et al. [11, 12], Corsi [13, 14] proposed the HAR-RV model, in which the realized volatility is parameterized as a linear function of the lagged realized volatilities over different horizons. It is defined as
(5)RVt=α0+αdRVt-1+αwRVt-5:t-1+αmRVt-22:t-1+ε1,t,
where RVt-5:t-1=(1/5)∑j=15RVt-j and RVt-22:t-1=(1/22)∑j=122RVt-j are the past weekly and monthly realized volatilities. The parameters αd, αw, and αm evaluate the short-term, medium-term, and long-term investors’ contributions to the overall market volatility, respectively.Since the descriptive statistics (Table2) show that the logarithmic realized volatility is much closer to being normally distributed than is the raw realized volatility, thus more amenable to the use of standard time series procedures, the HAR-RV model cast in logarithmic form is used in this research:
(6)lnRVt=α0+αdlnRVt-1+αw(lnRV)t-5:t-1+αm(lnRV)t-22:t-1+ε1,t,
where (lnRV)t-k:t-1=(1/k)∑j=1klnRVt-j is the normalized multiperiod logarithmic realized volatility.Andersen et al. [15] further proposed the HAR-RV-J model and the HAR-RV-CJ model which separate the contributions to volatility forecasting of the jumps and the continuous sample path variation. The HAR-RV-J model cast in logarithmic form is
(7)lnRVt=α0+αdlnRVt-1+αw(lnRV)t-5:t-1+αm(lnRV)t-22:t-1+βln⁡(JVt-1+1)+ε2,t.The HAR-RV-CJ model cast in logarithmic form is(8)lnRVt=α0+αdlnCVt-1+αw(lnCV)t-5:t-1+αm(lnCV)t-22:t-1+βdln⁡(JVt-1+1)+βw(lnJV′)t-5:t-1+βm(lnJV′)t-22:t-1+ε3,t,
where (lnCV)t-k:t-1=(1/k)∑j=1klnCVt-j, (lnJV′)t-k:t-1=(1/k)∑j=1klnJVt-j′=(1/k)∑j=1kln⁡(JVt-j+1), k=5,22.The parameters of (6), (7), and (8) can all be easily estimated by applying the standard OLS regressions.


## 2.3. The AHAR Models

We build on the HAR models and propose the AHAR models by using genetic algorithm optimized time horizon structures instead of the (1,5,22) structure used in the HAR models. The AHAR-RV model, the AHAR-RV-J model, and the AHAR-RV-CJ model cast in logarithmic form are as follows:(9)lnRVt=α0+α1(lnRV)t-D1:t-1+α2(lnRV)t-D2:t-1+α3(lnRV)t-D3:t-1+ε1,t,lnRVt=α0+α1(lnRV)t-D1:t-1+α2(lnRV)t-D2:t-1+α3(lnRV)t-D3:t-1+βln⁡(JVt-1+1)+ε2,t,lnRVt=α0+α1(lnCV)t-D1:t-1+α2(lnCV)t-D2:t-1+α3(lnCV)t-D3:t-1+β1(lnJV′)t-D1:t-1+β2(lnJV′)t-D2:t-1+β3(lnJV′)t-D3:t-1+ε3,t,
where (D1, D2, D3) is the adaptive time horizon structure optimized by a genetic algorithm.


## 2.4. The Genetic Algorithm Design

A genetic algorithm is a stochastic optimization algorithm originally inspired by the process of natural evolution. It is comprised of three major operations: reproduction, crossover, and mutation, which are designed to ensure that the “fittest” members of the population survive and that their information is preserved and combined to generate possibly better offspring.This paper uses the genetic algorithm to optimize the AHAR models’ time horizon structures; thus, we design the following solution space and encoding as shown in Table1.Table 1
The GA’s solution space and encoding.
Horizon
Lower bound
Upper bound
Number of bits
1st
1
4
2
2nd
1
16
4
3rd
1
128
7Table 2
Descriptive statistics.
Mean
Standard deviation
Skew
Kurt
Max
Min
LB(20)
JB
ADF
RV
t
3.0393
E
-
04
3.5043
E
-
04
3.5834
25.8002
4.1991
E
-
03
1.4350
E
-
05
2857.0***
29060.4***
−10.2***
ln
⁡
RV
t
−8.5918
1.0156
−0.0283
2.4967
−5.4729
−11.1518
9669.7***
13.0***
−5.2***
CV
t
2.9185
E
-
04
3.3945
E
-
04
3.4319
24.4801
4.1991
E
-
03
1.1141
E
-
05
3021.2***
25870.2***
−9.0***
JV
t
1.2079
E
-
05
5.3441
E
-
05
13.0101
255.0796
1.2466
E
-
03
0
31.7**
3267252.0***
−34.6***
Note: LB represents the Ljung-BoxQ-statistics, JB represents the Jarque-Bera normality test statistics, ***represents the significance level of 1%, and **represents the significance level of 5%.Therefore, altogether 13 binary bits are used to represent each candidate (D1, D2, D3) structure. Besides, it is clear that the HAR models’ (1,5,22) structure is also in the GA’s solution space, whose encoding is (00,0100,0010101).The fitness functionf() of our GA is defined as the adjusted R2 which evaluates the model’s in-sample fit. Other parameters of the GA are set as follows: the population size K=40, the crossover rate pc=0.8, the mutation rate pm=0.05, and the maximum number of generations N=300.As illustrated by the GA’s flow chart in Figure1, after generating the initial population, each generation of population evolves through reproduction, crossover, and mutation operations sequentially to generate the offspring generation. Each (D1, D2, D3) structure of the initial population is created by randomly selecting Di between its lower bound and upper bound and it is ensured that D1<D2<D3; for example, if the random selection results in D1=2, D2=16, and D3=5, then we denote the candidate solution as (2,5,16).Figure 1
The GA’s flow chart.The roulette-wheel selection is adopted in the reproduction operation; that is, theith candidate solution (D1(i),D2(i),D3(i))’s probability of being selected for reproduction is f(i)/∑j=1Kf(j)=aR2(i)/∑j=140aR2(j), where aR2(i) is the adjusted R2 of the corresponding AHAR regression model with time horizon structure (D1(i),D2(i),D3(i)) on the sample data.As for the crossover operation, each time two candidate solutions of current population are randomly selected and, with probabilitypc=0.8, they will operate one-point crossover. Specifically, the 2nd binary bit and the 6th binary bit of the 13-bit-length binary string are randomly specified as the single crossover point with equal probability, and all data beyond that point in the two solutions’ strings are swapped to generate two new 13-bit-length strings replacing the parents; for example, (O,P,Q) and (X,Y,Z) are selected for crossover and the crossover point is the 6th binary bit; then, they will be replaced with (O,P,Z) and (X,Y,Q) in the population.As for the mutation operation, each candidate solution of current population has probabilitypm=0.05 to mutate, inverting a randomly selected bit of its binary string. The elitist rule replaces the worst solution of current population with the best solution of last generation and thus ensures that the “fittest” member always survives.We design two termination conditions: (i) the best solution keeps the same for at least 10 generations and (ii) the evolution reaches the maximum number of generations. Evolution terminates as far as one of the conditions is satisfied, and the (D1, D2, D3) structure with the highest fitness value in current generation is the optimal time horizon structure discovered by the GA.


## 3. Empirical Evidence

### 3.1. Data and Summary Statistics

Five-minute returns of the CSI 300 index are used as empirical data and the data source is the Tinysoft financial data base. The CSI 300 index is a capitalization-weighted stock market index, designed to replicate the performance of 300 stocks well chosen from the Shanghai and Shenzhen stock exchanges, and thus well represents the operation state of the whole Chinese stock markets. The period of study extends from April 11, 2005 (the first Monday after the release of the CSI 300 index), to April 15, 2010 (the last day before the launch of the CSI 300 index futures), covering 1221 business days altogether. The sampling interval length is set to five minutes, as a trade-off between accuracy and market microstructure noise, similar to most previous studies.Figure2 displays the time series plots of the CSI 300 index’s realized volatility RVt and logarithmic realized volatility lnRVt. Table 2 reports their descriptive statistics as well as the descriptive statistics of the continuous sample path variation CVt and the jumps JVt. The Ljung-Box Q-statistics indicate that the realized volatility and the logarithmic realized volatility both display significant long memory dependence (or long-range persistence). The continuous sample path variation has similar statistics to those of the realized volatility, which are apparently different from those of the jumps. The ADF unit root tests indicate that the above series are all stationary; thus, the HAR and the AHAR modeling analysis can be further conducted. It is also worth noticing that the logarithmic realized volatility is much closer to being normally distributed compared with the raw realized volatility, which justifies considering the HAR models and the AHAR models in logarithmic form.Time series plots of the CSI 300 index’s realized volatility and logarithmic realized volatility.
(a)
Realized volatilityRVt
(b)
Logarithmic realized volatilityln⁡RVt


### 3.2. Out-of-Sample Forecast Performance Comparison

We adopt the moving window tests to compare the out-of-sample forecast performance of the AHAR models with that of the corresponding HAR models. Specifically, we set the estimation window size to 700 business days, the forecast window size to 100 business days, and the step size to 100 business days, thus dividing the empirical data into five overlapping pairs of estimation windows and forecast windows.For each pair of estimation window and forecast window, we first run the GA in the estimation window to find the optimal time horizon structures for the AHAR-RV model, the AHAR-RV-J model, and the AHAR-RV-CJ model, respectively. The out-of-sample forecast performance of the resulting optimal AHAR models is then compared with that of the corresponding HAR models in the forecast window. The following four common loss functions are employed for the forecast performance evaluation:(10)MAE=1(n2-n1+1)∑t=n1n2|lnRVt-ln⁡σt2|,MAPE=1(n2-n1+1)∑t=n1n2|1-ln⁡σt2lnRVt|·100%,RMSE=1(n2-n1+1)∑t=n1n2(lnRVt-ln⁡σt2)2,Theil=1(n2-n1+1)∑t=n1n2(lnRVt-ln⁡σt2)2×(1(n2-n1+1)∑t=n1n2(lnRVt)2MMM+1(n2-n1+1)∑t=n1n2(ln⁡σt2)2)-1,
where RVt represents the true volatility, σt2 represents the forecasted volatility, and n1 and n2 are the starting and ending of the forecast window, respectively.Figure3 plots the out-of-sample forecasts of the three HAR models and the three AHAR models in five successive forecast windows together with the true logarithmic realized volatility sequence. Table 3 compares these models’ forecast performance in each forecast window, indicating the time horizon structures used. We can see from Table 3 that for each pair of estimation window and forecast window, when applying the GA to optimize the time horizon structures for the AHAR-RV model and the AHAR-RV-J model, we get exactly the same results, which are also pretty close to the time horizon structure optimized for the AHAR-RV-CJ model. This is understandable, since the GA’s optimization result reflects the actual trading frequencies of Chinese stock markets’ representative short-term, medium-term, and long-term investors; it should not alter significantly across the AHAR models. There exist slight differences between the time horizon structures optimized for different AHAR models, since these models have different explanatory variables and different information integration capabilities.Table 3
Moving window out-of-sample forecast performance comparison results.
Windows
AHAR-RV
HAR-RV
AHAR-RV-J
HAR-RV-J
AHAR-RV-CJ
HAR-RV-CJ
1–700701–800
(1,4,109)
(1,5,22)
(1,4,109)
(1,5,22)
(1,4,106)
(1,5,22)
MAE
0.37826
0.37225
0.37826
0.37225
0.38011
0.37374
MAPE
0.05156
0.05076
0.05156
0.05076
0.05185
0.05105
RMSE
0.46385
0.46438
0.46386
0.46442
0.46653
0.46875
Theil
0.03058
0.03063
0.03058
0.03064
0.03074
0.03090
101–800801–900
(1,3,16)
(1,5,22)
(1,3,16)
(1,5,22)
(1,3,18)
(1,5,22)
MAE
0.41608
0.41853
0.41540
0.41782
0.44916
0.45973
MAPE
0.05511
0.05541
0.05501
0.05531
0.05938
0.06083
RMSE
0.62675
0.62882
0.62596
0.62823
0.66261
0.66838
Theil
0.04049
0.04063
0.04044
0.04059
0.04295
0.04331
201–900901–1000
(1,3,18)
(1,5,22)
(1,3,18)
(1,5,22)
(1,4,18)
(1,5,22)
MAE
0.31402
0.31845
0.31421
0.31874
0.32064
0.32252
MAPE
0.03936
0.03985
0.03937
0.03987
0.04011
0.04031
RMSE
0.40048
0.39764
0.40052
0.39761
0.40216
0.40251
Theil
0.02464
0.02446
0.02464
0.02447
0.02475
0.02477
301–10001001–1100
(1,3,18)
(1,5,22)
(1,3,18)
(1,5,22)
(1,4,18)
(1,5,22)
MAE
0.41896
0.41987
0.41931
0.42000
0.42379
0.42471
MAPE
0.05152
0.05161
0.05154
0.05160
0.05195
0.05209
RMSE
0.52583
0.52826
0.52590
0.52831
0.52727
0.52907
Theil
0.03145
0.03159
0.03146
0.03160
0.03157
0.03167
401–11001101–1200
(1,3,16)
(1,5,22)
(1,3,16)
(1,5,22)
(1,3,16)
(1,5,22)
MAE
0.44809
0.45146
0.44837
0.45172
0.45576
0.45750
MAPE
0.05052
0.05087
0.05055
0.05090
0.05131
0.05147
RMSE
0.55241
0.55648
0.55276
0.55678
0.55940
0.56262
Theil
0.03145
0.03170
0.03147
0.03172
0.03189
0.03209
Note: bold number indicates that the AHAR model’s forecast performance is worse than that of the corresponding HAR model in terms of the loss function in its row.Figure 3
Out-of-sample forecasts for the CSI 300 index’s volatility in five successive forecast windows.lnRVt represents the true logarithmic realized volatility. AHAR-RV, HAR-RV, AHAR-RV-J, HAR-RV-J, AHAR-RV-CJ, and HAR-RV-CJ represent the forecasts of the corresponding models, respectively.While running the GA in the first estimation window, the output optimal choice of the 3rd horizon is between 106 and 109. It implies that, during this period of time, representative long-term investors hold securities for up to 5 months in Chinese stock markets. The reason is that the first estimation window covers the period from April 11, 2005, to February 28, 2008, containing the bull market period of Chinese stock markets which is from June 7, 2005, to October 16, 2007 [24]. Accordingly, running the GA in the first estimation window mainly captures heterogeneous investors’ trading behaviors during the bull market period, when long-term investors are more willing to extend the holding period of the securities to further share the benefits. On the other hand, the first forecast window covers the period from February 29, 2008, to July 23, 2008, while the period between October 17, 2007, and October 28, 2008, is regarded as the bear market period of Chinese stock markets [24]. Thus, the first estimation window and forecast window are under totally different market conditions, which reduces the applicability of the GA optimized time horizon structures. As a result, the AHAR models outperform the corresponding HAR models in the first forecast window only in terms of the RMSE and the Theil coefficient.As for the following four estimation windows, since they all cover enough lengths of both the bull market data and the bear market data, the optimization results of the GA are less affected by specific market conditions. Analyzing the GA optimized time horizon structures discloses that, during these periods of time, the representative long-term investors’ average holding period varies between 16 and 18 business days, the representative medium-term investors’ average holding period varies between 3 and 4 business days, and the representative short-term investors’ average holding period is not longer than 1 business day. It implies that the investors in Chinese stock markets have higher turnover rates than those in developed markets, which makes the (1,5,22) structure an inferior choice. However, the GA optimized time horizon structures are all close to the (1,5,22) structure, which explains why the empirical researches applying the HAR models with the (1,5,22) structure in Chinese stock markets can still generate satisfying fit and forecast performance. Besides, since the optimal (D1, D2, D3) structures of different estimation windows differ slightly instead of being the same, regardless of the AHAR model specified, it reveals that Chinese stock markets’ heterogeneous structure does vary over time and thus confirms the necessity of our adaptive modeling approach. Furthermore, the AHAR-RV-CJ model outperforms the HAR-RV-CJ model in all the four forecast windows regardless of the loss function; the AHAR-RV model and the AHAR-RV-J model outperform the corresponding HAR models in three forecast windows regardless of the loss function and outperform the corresponding HAR models in the third forecast window in terms of the MAE and the MAPE. It reveals that the adaptive modeling approach effectively improves the HAR models’ out-of-sample forecast performance and thus provides better volatility modeling and forecasting tools for investors interested in Chinese stock markets.


## 3.1. Data and Summary Statistics

Five-minute returns of the CSI 300 index are used as empirical data and the data source is the Tinysoft financial data base. The CSI 300 index is a capitalization-weighted stock market index, designed to replicate the performance of 300 stocks well chosen from the Shanghai and Shenzhen stock exchanges, and thus well represents the operation state of the whole Chinese stock markets. The period of study extends from April 11, 2005 (the first Monday after the release of the CSI 300 index), to April 15, 2010 (the last day before the launch of the CSI 300 index futures), covering 1221 business days altogether. The sampling interval length is set to five minutes, as a trade-off between accuracy and market microstructure noise, similar to most previous studies.Figure2 displays the time series plots of the CSI 300 index’s realized volatility RVt and logarithmic realized volatility lnRVt. Table 2 reports their descriptive statistics as well as the descriptive statistics of the continuous sample path variation CVt and the jumps JVt. The Ljung-Box Q-statistics indicate that the realized volatility and the logarithmic realized volatility both display significant long memory dependence (or long-range persistence). The continuous sample path variation has similar statistics to those of the realized volatility, which are apparently different from those of the jumps. The ADF unit root tests indicate that the above series are all stationary; thus, the HAR and the AHAR modeling analysis can be further conducted. It is also worth noticing that the logarithmic realized volatility is much closer to being normally distributed compared with the raw realized volatility, which justifies considering the HAR models and the AHAR models in logarithmic form.Time series plots of the CSI 300 index’s realized volatility and logarithmic realized volatility.
(a)
Realized volatilityRVt
(b)
Logarithmic realized volatilityln⁡RVt


## 3.2. Out-of-Sample Forecast Performance Comparison

We adopt the moving window tests to compare the out-of-sample forecast performance of the AHAR models with that of the corresponding HAR models. Specifically, we set the estimation window size to 700 business days, the forecast window size to 100 business days, and the step size to 100 business days, thus dividing the empirical data into five overlapping pairs of estimation windows and forecast windows.For each pair of estimation window and forecast window, we first run the GA in the estimation window to find the optimal time horizon structures for the AHAR-RV model, the AHAR-RV-J model, and the AHAR-RV-CJ model, respectively. The out-of-sample forecast performance of the resulting optimal AHAR models is then compared with that of the corresponding HAR models in the forecast window. The following four common loss functions are employed for the forecast performance evaluation:(10)MAE=1(n2-n1+1)∑t=n1n2|lnRVt-ln⁡σt2|,MAPE=1(n2-n1+1)∑t=n1n2|1-ln⁡σt2lnRVt|·100%,RMSE=1(n2-n1+1)∑t=n1n2(lnRVt-ln⁡σt2)2,Theil=1(n2-n1+1)∑t=n1n2(lnRVt-ln⁡σt2)2×(1(n2-n1+1)∑t=n1n2(lnRVt)2MMM+1(n2-n1+1)∑t=n1n2(ln⁡σt2)2)-1,
where RVt represents the true volatility, σt2 represents the forecasted volatility, and n1 and n2 are the starting and ending of the forecast window, respectively.Figure3 plots the out-of-sample forecasts of the three HAR models and the three AHAR models in five successive forecast windows together with the true logarithmic realized volatility sequence. Table 3 compares these models’ forecast performance in each forecast window, indicating the time horizon structures used. We can see from Table 3 that for each pair of estimation window and forecast window, when applying the GA to optimize the time horizon structures for the AHAR-RV model and the AHAR-RV-J model, we get exactly the same results, which are also pretty close to the time horizon structure optimized for the AHAR-RV-CJ model. This is understandable, since the GA’s optimization result reflects the actual trading frequencies of Chinese stock markets’ representative short-term, medium-term, and long-term investors; it should not alter significantly across the AHAR models. There exist slight differences between the time horizon structures optimized for different AHAR models, since these models have different explanatory variables and different information integration capabilities.Table 3
Moving window out-of-sample forecast performance comparison results.
Windows
AHAR-RV
HAR-RV
AHAR-RV-J
HAR-RV-J
AHAR-RV-CJ
HAR-RV-CJ
1–700701–800
(1,4,109)
(1,5,22)
(1,4,109)
(1,5,22)
(1,4,106)
(1,5,22)
MAE
0.37826
0.37225
0.37826
0.37225
0.38011
0.37374
MAPE
0.05156
0.05076
0.05156
0.05076
0.05185
0.05105
RMSE
0.46385
0.46438
0.46386
0.46442
0.46653
0.46875
Theil
0.03058
0.03063
0.03058
0.03064
0.03074
0.03090
101–800801–900
(1,3,16)
(1,5,22)
(1,3,16)
(1,5,22)
(1,3,18)
(1,5,22)
MAE
0.41608
0.41853
0.41540
0.41782
0.44916
0.45973
MAPE
0.05511
0.05541
0.05501
0.05531
0.05938
0.06083
RMSE
0.62675
0.62882
0.62596
0.62823
0.66261
0.66838
Theil
0.04049
0.04063
0.04044
0.04059
0.04295
0.04331
201–900901–1000
(1,3,18)
(1,5,22)
(1,3,18)
(1,5,22)
(1,4,18)
(1,5,22)
MAE
0.31402
0.31845
0.31421
0.31874
0.32064
0.32252
MAPE
0.03936
0.03985
0.03937
0.03987
0.04011
0.04031
RMSE
0.40048
0.39764
0.40052
0.39761
0.40216
0.40251
Theil
0.02464
0.02446
0.02464
0.02447
0.02475
0.02477
301–10001001–1100
(1,3,18)
(1,5,22)
(1,3,18)
(1,5,22)
(1,4,18)
(1,5,22)
MAE
0.41896
0.41987
0.41931
0.42000
0.42379
0.42471
MAPE
0.05152
0.05161
0.05154
0.05160
0.05195
0.05209
RMSE
0.52583
0.52826
0.52590
0.52831
0.52727
0.52907
Theil
0.03145
0.03159
0.03146
0.03160
0.03157
0.03167
401–11001101–1200
(1,3,16)
(1,5,22)
(1,3,16)
(1,5,22)
(1,3,16)
(1,5,22)
MAE
0.44809
0.45146
0.44837
0.45172
0.45576
0.45750
MAPE
0.05052
0.05087
0.05055
0.05090
0.05131
0.05147
RMSE
0.55241
0.55648
0.55276
0.55678
0.55940
0.56262
Theil
0.03145
0.03170
0.03147
0.03172
0.03189
0.03209
Note: bold number indicates that the AHAR model’s forecast performance is worse than that of the corresponding HAR model in terms of the loss function in its row.Figure 3
Out-of-sample forecasts for the CSI 300 index’s volatility in five successive forecast windows.lnRVt represents the true logarithmic realized volatility. AHAR-RV, HAR-RV, AHAR-RV-J, HAR-RV-J, AHAR-RV-CJ, and HAR-RV-CJ represent the forecasts of the corresponding models, respectively.While running the GA in the first estimation window, the output optimal choice of the 3rd horizon is between 106 and 109. It implies that, during this period of time, representative long-term investors hold securities for up to 5 months in Chinese stock markets. The reason is that the first estimation window covers the period from April 11, 2005, to February 28, 2008, containing the bull market period of Chinese stock markets which is from June 7, 2005, to October 16, 2007 [24]. Accordingly, running the GA in the first estimation window mainly captures heterogeneous investors’ trading behaviors during the bull market period, when long-term investors are more willing to extend the holding period of the securities to further share the benefits. On the other hand, the first forecast window covers the period from February 29, 2008, to July 23, 2008, while the period between October 17, 2007, and October 28, 2008, is regarded as the bear market period of Chinese stock markets [24]. Thus, the first estimation window and forecast window are under totally different market conditions, which reduces the applicability of the GA optimized time horizon structures. As a result, the AHAR models outperform the corresponding HAR models in the first forecast window only in terms of the RMSE and the Theil coefficient.As for the following four estimation windows, since they all cover enough lengths of both the bull market data and the bear market data, the optimization results of the GA are less affected by specific market conditions. Analyzing the GA optimized time horizon structures discloses that, during these periods of time, the representative long-term investors’ average holding period varies between 16 and 18 business days, the representative medium-term investors’ average holding period varies between 3 and 4 business days, and the representative short-term investors’ average holding period is not longer than 1 business day. It implies that the investors in Chinese stock markets have higher turnover rates than those in developed markets, which makes the (1,5,22) structure an inferior choice. However, the GA optimized time horizon structures are all close to the (1,5,22) structure, which explains why the empirical researches applying the HAR models with the (1,5,22) structure in Chinese stock markets can still generate satisfying fit and forecast performance. Besides, since the optimal (D1, D2, D3) structures of different estimation windows differ slightly instead of being the same, regardless of the AHAR model specified, it reveals that Chinese stock markets’ heterogeneous structure does vary over time and thus confirms the necessity of our adaptive modeling approach. Furthermore, the AHAR-RV-CJ model outperforms the HAR-RV-CJ model in all the four forecast windows regardless of the loss function; the AHAR-RV model and the AHAR-RV-J model outperform the corresponding HAR models in three forecast windows regardless of the loss function and outperform the corresponding HAR models in the third forecast window in terms of the MAE and the MAPE. It reveals that the adaptive modeling approach effectively improves the HAR models’ out-of-sample forecast performance and thus provides better volatility modeling and forecasting tools for investors interested in Chinese stock markets.


## 4. Conclusions

Building on the heterogeneous autoregressive models inspired by the Heterogeneous Market Hypothesis, we propose adaptive heterogeneous autoregressive models by using genetic algorithm optimized time horizon structures instead of the (1,5,22) structure used in the HAR models. Thus, the AHAR models can be applied to markets with different heterogeneous structures, and their time horizon structures can be adjusted adaptively as the market’s heterogeneous structure varies.Moving window tests with five-minute returns of the CSI 300 index reveal that the AHAR models’ optimal time horizon structures differ from the (1,5,22) structure and vary over time when applied to Chinese stock markets. Specifically, Chinese stock markets’ representative long-term investors’ average holding period varies between 16 and 18 business days, representative medium-term investors’ average holding period varies between 3 and 4 business days under general market conditions, while the representative long-term investors hold securities for up to 5 months during the bull market period. Furthermore, the AHAR models generally have better out-of-sample forecast performance than that of the corresponding HAR models using four common loss functions.Since our approach of combining the HAR models with the genetic algorithm produces volatility forecasting models with better forecast performance and is easily implementable, it has broad appeal for practitioners. Such an adaptive modeling approach can be applied to extensions of the HAR-RV model, the HAR-RV-J model, and the HAR-RV-CJ model, for example, by the inclusion of overnight returns and lagged negative returns as explanatory variables, which may allow the pursuit of further forecast accuracy improvements. This topic is left for future research.



---

*Source: 943041-2014-06-04.xml*