Financial Time Series Analysis via Backtesting Approach

This book chapter investigated the place of backtesting approach in financial time series analysis in choosing a reliable Generalized Auto-Regressive Conditional Heteroscedastic (GARCH) Model to analyze stock returns in Nigeria. To achieve this, The chapter used a secondary data that was collected from www.cashcraft.com under stock trend and analysis. Daily stock price was collected on Zenith bank stock price from October 21st 2004 to May 8th 2017. The chapter used nine different GARCH models (standard GARCH (sGARCH), Glosten-Jagannathan-Runkle GARCH (gjrGARCH), Exponential GARCH (Egarch), Integrated GARCH (iGARCH), Asymmetric Power Autoregressive Conditional Heteroskedasticity (ARCH) (apARCH), Threshold GARCH (TGARCH), Non-linear GARCH (NGARCH), Nonlinear (Asymmetric) GARCH (NAGARCH) and The Absolute Value GARCH (AVGARCH) with maximum lag of 2. Most the information criteria for the sGARCH model were not available due to lack of convergence. The lowest information criteria were associated with apARCH (2,2) with Student t-distribution followed by NGARCH(2,1) with skewed student t-distribution. The backtesting result of the apARCH (2,2) was not available while eGARCH(1,1) with Skewed student t-distribution, NGARCH(1,1), NGARCH(2,1), and TGARCH (2,1) failed the backtesting but eGARCH (1,1) with student t-distribution passed the backtesting approach. Therefore with the backtesting approach, eGARCH(1,1) with student distribution emerged the superior model for modeling Zenith Bank stock returns in Nigeria. This chapter recommended the backtesting approach to selecting reliable GARCH model.


Introduction
Time series is a series of observation collected with respect to time. The time could be in minutes, hours, daily, weekly, monthly, yearly etc. Time series data can be seen and applied in all fields of endeavors such as engineering, geophysics, business, economics, finance, agriculture, medical sciences, social sciences, meteorology, quality control etc. [1] but this chapter focused on financial time series analysis.
In the field of time series analysis, Autoregressive Moving Average (ARMA) and Autoregressive Integrated Moving Average (ARIMA) models are popular and excellent for modeling and forecasting univariate time series data as proposed by Box and Jenkins in 1970 but many times these models failed in analyzing and forecasting financial time series [2], this is because the ARMA and ARIMA models are used to model conditional expectation of a process but in ARMA model, the conditional variance is constant. This means that ARMA model cannot capture process with time-varying conditional variance (volatility) which is mostly common with economic and financial time series data [3].
In economic and financial time series literatures, time-varying is more common than constant volatility, and accurate modeling of time volatility is of great importance in financial time series analysis by financial econometricians [4]. In practice, financial time series contains uncertainty, volatility, excess kurtosis, high standard deviation, high skewness and sometimes non normality [3]. Therefore, to model and capture properly the characteristics of financial time series models such as Auto-Regressive Conditional Heteroscedastic (ARCH), Generalized Auto-Regressive Conditional Heteroscedastic (GARCH), multivariate GARCH, Stochastic volatitlity (SV) and various variants of the models have been proposed to handle these characteristics of financial time series [5]. This chapter would focus on univariate GARCH models. In practice, the backtesting approach compliment the estimated GARCH model, in order to select a reliable GARCH model useful for real life application.
This book chapter aimed at obtaining reliable GARCH model via backtesting approach using daily Zenith bank Nigeria plc stock returns.

Empirical literature reviews of previous studies
Emenogu, et al. [3] modeled and forecasted the Guaranty Trust (GT) Bank daily stock returns from January 22,001 to May 82,017 data set collected from a secondary source. The ARMA-GARCH models, persistence, half-life and backtesting were used to analyzed the collected data using student t and skewed student tdistributions, and the analyses are carried out R environment using rugarch and performanceAnaytics Packages. The study revealed that using the lowest information criteria values only could be misleading rather we added the use of backtesing. The ARMA(1,1)-GARCH(1,1) models fitted exhibited high persistency in the daily stock returns while the days it takes for mean-reverting of the models is about 5 days, but unfortunately the models failed backtesting. The results further revealed ARMA(1,1)-eGARCH (2,2) model with student t distribution provides a suitable model for evaluating the GT bank stock returns among the competing models while it takes less than 30 days for the persistence volatility to return back to its average value of the stock returns. They recommended that researchers should adopt backtesting approach while fitting GARCH models while GT bank stocks investor should be assured that no matter the fluctuations in the stock market, the GT bank stock returns has the ability to returns to its mean price return.
Asemota and Ekejiuba [6] examined the volatility of banks equity weekly returns for six banks (coded B1 to B6) using GARCH models. Results reveal the presence of ARCH effect in B2 and B3 equity returns. In addition, the estimated models could not find evidence of leverage effect. On evaluating the estimated models using standard criteria, EGARCH (1, 1) and CGARCH (1, 1) model in Student's t-distribution are adjudged the best volatility models for B2 and B3 respectively. The study recommends that in modeling stock market volatility, variants of GARCH models and alternative error distribution should be considered for robustness of results. The study also recommended for adequate regulatory effort by the CBN over commercial banks operations that will enhance efficiency of their stocks performance and reduce volatility aimed at boosting investors' confidence in the banking sector.
Adigwe, et al. [7], examined the effect of stock market development on Nigeria's economic growth. The objective of the study was to determine if stock market development significantly impact on the country's economic growth. Secondary data were employed for the study covering 1985 to 2014. Ordinary Least Square (OLS) econometric technique was used for the time series analysis in which variations in economic growth was regressed on market capitalisation ratio to GDP, value of stock traded ratio to GDP, trade openness and inflation rate. The analysis revealed that stock market has the potentials of growth inducing, but has not contributed meaningfully to Nigerian economic growth, since only 26.5% of variations in economic growth were explained by the stock market development variables. Based on this, they suggested for an encouragement of more investors in the market, improvement in the settlement system and ensuring investors' confidence in the market.
Yaya, et al. [8] examined the application of nonlinear Smooth Transition-Generalized Autoregressive Conditional Heteroscedasticity (ST-GARCH) model of Hagerud on prices of banks' shares in Nigeria. The methodology was informed by the failure of the conventional GARCH model to capture the asymmetric properties of the banks' daily share prices. The asymmetry and non-linearity in the model dynamics make it useful for generating nonlinear conditional variance series. From the empirical analysis, we obtained the conditional volatility of each bank's share price return. The highest volatility persistence was observed in Bank 6, while Bank 12 had the least volatility. Evidently, about 25% of the investigated banks exhibited linear volatility behavior, while the remaining banks showed nonlinear volatility specifications. Given the level of risk associated with investment in stocks, investors and financial analysts could consider volatility modeling of bank share prices with variants of the ST-GARCH models. The impact of news is an important feature that relevant agencies could study so as to be guided while addressing underlying issues in the banking system. Emenike and Aleke [9] studied the daily closing prices of the Nigerian stocks from January 1996 to December 2011 used the asymmetric GARCH variants. Their result showed strong evidence of asymmetric effects in the stock returns and therefore proposed EGARCH as performing better than other asymmetric rivals.
Arowolo [10] examined the forecasting properties of linear GARCH model for daily closing stocks prices of Zenith bank Plc in the Nigerian Stock Exchange. The Akaike and Bayesian Information Criteria (AIC and BIC) techniques were used to obtain the order of the GARCH (p,q) that best fit the Zenith Bank return series. The information criteria identified GARCH (1,2) as the appropriate model. His result further supported the claim that financial data are leptokurtic.
Emenike and Ani [11], examined the nature of volatility of stock returns in the Nigerian banking sector using GARCH models. Individual bank indices and the Allshare Index of the Nigerian Stock Exchange were evaluated for evidence of volatility persistence, volatility asymmetry and fat tails using data from 3 January 2006 to 31 December 2012. Results obtained from GARCH models suggest that stock returns volatility of the Nigerian banking sector move in cluster and that volatility persistence is high for the sample period. The results also indicate that stock returns distribution of the banking sector is leptokurtic and that sign of the innovations have insignificant influence on the volatility of stock returns of the banks. Finally, the findings of this study show that the degree of volatility persistence is higher for the All Share Index than for most of the banks.
Abubakar and Gani [12] re-examined the long run relationship between financial development indicators and economic growth in Nigeria over the period 1970-2010. The study employed the Johansen and Juselius (1990) approach to cointegration and Vector Error Correction Modeling (VECM). Their findings 3 Financial Time Series Analysis via Backtesting Approach DOI: http://dx.doi.org /10.5772/intechopen.94112 revealed that in the long-run, liquid liabilities of commercial banks and trade openness exert significant positive influence on economic growth, conversely, credit to the private sector, interest rate spread and government expenditure exert significant negative influence. The findings implied that, credit to the private sector is marred by the identified problems and government borrowing and high interest rate are crowding out investment and growth. The policy implications are financial reforms in Nigeria should focus more on deepening the sector in terms of financial instruments so that firms can have alternatives to banks' credit which proved to be inefficient and detrimental to growth, moreover, government should inculcate fiscal discipline.

Model specification
This study focuses on the GARCH models that are robust for forecasting the volatility of financial time series data; so GARCH model and some of its extensions are presented in this section.

Autoregressive conditional heteroskedasticity (ARCH) family model
Every ARCH or GARCH family model requires two distinct specifications, namely: the mean and the variance Equations [13]. The mean equation for a conditional heteroskedasticity in a return series, y t is given by The mean equation in Eq. (1) also applies to other GARCH family models. E tÀ1 : ðÞ is the expected value conditional on information available at time t-1, while ε t is the error generated from the mean equation at time t and φ t is the sequence of independent and identically distributed random variables with zero mean and unit variance.
The variance equation for an ARCH(p) model is given by It can be seen in the equation that large values of the innovation of asset returns have bigger impact on the conditional variance because they are squared, which means that a large shock tends to follow another large shock and that is the same way the clusters of the volatility behave. So the ARCH(p) model becomes: Where ε t $ N (0,1) iid, ω > 0 and α i ≥ 0 for i > 0. In practice, ε t is assumed to follow the standard normal or a standardized student-t distribution or a generalized error distribution [14].

Asymmetric power ARCH
According to Rossi [15], the asymmetric power ARCH model proposed by [16] given below forms the basis for deriving the GARCH family models.
Given that: where This model imposes a Box-Cox transformation of the conditional standard deviation process and the asymmetric absolute residuals. The leverage effect is the asymmetric response of volatility to positive and negative "shocks".

Standard GARCH(p, q) model
The mathematical model for the sGARCH(p,q) model is obtained from Eq. (4) by letting δ ¼ 2 and Where a t ¼ r t À μ t (r t is the continuously compounded log return series), and. ε t $ N (0,1) iid, the parameter α i is the ARCH parameter and β j is the GARCH parameter, and ω > 0, α i ≥ 0, β j ≥ 0, and P max p,q ðÞ i¼1 The restriction on ARCH and GARCH parameters α i , β j suggests that the volatility (a i ) is finite and that the conditional standard deviation (σ i ) increases. It can be observed that if q = 0, then the model GARCH parameter (β j ) becomes extinct and what is left is an ARCH(p) model. To expatiate on the properties of GARCH models, the following representation is necessary: , the GARCH model can be rewritten as It can be seen that {η t } is a martingale difference series (i.e., E(η t ) = 0 and.
cov η t , η tÀj ¼ 0, for j ≥ 1). However, {η t } in general is not an iid sequence. A GARCH model can be regarded as an application of the ARMA idea to the squared series a 2 t . Using the unconditional mean of an ARMA model, results in this provided that the denominator of the prior fraction is positive [14]. When p = 1 and q = 1, we have GARCH(1, 1) model given by:

GJR-GARCH(p, q) model
The Glosten-Jagannathan-Runkle GARCH (GJRGARCH) model, which is a model that attempts to address volatility clustering in an innovation process, is obtained by letting δ ¼ 2.

IGARCH(1, 1) model
The integrated GARCH (IGARCH) models are unit-root GARCH models. The IGARCH (1, 1) model is specified in Grek [18] as Where ε t $ N(0, 1) iid, and 0 < β 1 < 1, Ali (2013) used α i to denote 1 À β i . The model is also an exponential smoothing model for the {a 2 t } series. To see this, rewrite the model as. By repeated substitutions, we have which is the well-known exponential smoothing formation with β 1 being the discounting factor [14].

TGARCH(p, q) model
The Threshold GARCH model is another model used to handle leverage effects, and a TGARCH(p, q) model is given by the following: where N tÀi is an indicator for negative a tÀi , that is, and α i , γ i ,andβ j are nonnegative parameters satisfying conditions similar to those of GARCH models, [14]. When p ¼ 1, q ¼ 1, the TGARCH(1, 1) model becomes:

NGARCH(p, q) model
The Nonlinear Generalized Autoregressive Conditional Heteroskedasticity (NGARCH) Model has been presented variously in literature by the following scholars [19][20][21]. The following model can be shown to represent all the presentations: Where h t is the conditional variance, and ω, β and α satisfy ω > 0, β ≥ 0andα ≥ 0. Which can also be written as

The exponential generalized autoregressive conditional heteroskedasticity (EGARCH) model
The EGARCH model was proposed by Nelson [22] to overcome some weaknesses of the GARCH model in handling financial time series pointed out by [23], In particular, to allow for asymmetric effects between positive and negative asset returns, he considered the weighted innovation where θ and γ are real constants. Both ε t and ε t jj À E ε t jj ðÞ are zero-mean iid sequences with continuous distributions. Therefore, Eg ε t ðÞ ½ ¼ 0. The asymmetry of g ε t ðÞ can easily be seen by rewriting it as An EGARCH(m, s) model, according to Dhamija and Bhalla [24] can be written as Which specifically results in EGARCH (1, 1) being written as where a tÀ1 jj À Ea tÀ1 jj ðÞ are iid and have mean zero. When the EGARCH model has a Gaussian distribution of error term, then E ε t jj ðÞ ¼ ffiffiffiffiffiffiffi ffi 2=π p , which gives:

The absolute value GARCH (AVGARCH)
An asymmetric GARCH (AGARCH), according to Ali [25] is simply While the absolute value generalized autoregressive conditional heteroskedasticity (AVGARCH) model is specified as:

Nonlinear (asymmetric) GARCH, or N(a)GARCH or NAGARCH
NAGARCH plays key role in option pricing with stochastic volatility because, as we shall see later on, NAGARCH allows you to derive closed-form expressions for European option prices in spite of the rich volatility dynamics. Because a NAGARCH may be written as And if z t $ IIDN 0, 1 ðÞ , z t is independent of σ 2 t as σ 2 t is only a function of an infinite number of past squared returns, it is possible to easily derive the long run, unconditional variance under NGARCH and the assumption of stationarity: Where ÂÃ because of stationary. Therefore Which exists and positive if and only if α 1 þ δ 2 ÀÁ þ β < 1. This has two implications: i. The persistence index of a NAGARCH(1,1) is α 1 þ δ 2 ÀÁ þ β and not simply α þ β; ii. a NAGARCH(1,1) model is stationary if and only if α 1 þ δ 2 ÀÁ þ β < 1.

Persistence
The low or high persistency in volatility exhibited by financial time series can be determined by the GARCH coefficients of a stationary GARCH model. The persistence of a GARCH model can be calculated as the sum of GARCH (β 1 ) and ARCH (α 1 ) coefficients that is α þ β 1 . In most financial time series, it is very close to one (1) [26,27]. Persistence could take the following conditions: If α þ β 1 < 1: The model ensures positive conditional variance as well as stationary. If α þ β 1 ¼ 1: we have an exponential decay model, then the half-life becomes infinite. Meaning the model is strictly stationary.
If α þ β 1 > 1: The GARCH model is said to be non-stationary, meaning that the volatility ultimately detonates toward the infinitude [27]. In addition, the model shows that the conditional variance is unstable, unpredicted and the process is nonstationary [28].

Half-life volatility
Half-life volatility measures the mean reverting speed (average time) of a stock price or returns. The mathematical expression of half-life volatility is given as It can be noted that the value of α þ β 1 influences the mean reverting speed [27], which means that if the value of α þ β 1 is closer to one (1), then the volatility shocks of the half-life will be longer.

Backtesting
Financial risk model evaluation or backtesting is an important part of the internal model's approach to market risk management as put out by Basle Committee on Banking Supervision [29]. Backtesting is a statistical procedure where actual profits and losses are systematically compared to corresponding VaR estimates [30]. This book chapter adopted Backstesting techniques of [29]; The test was implemented in R using rugarch package and this test considered both the unconditional (Kupiec) and conditional (Christoffersen) coverage tests for the correct number of exceedances (see details in [31,32]. The unconditional (Kupiec) test also refer to as POF-test (Proportion of failure) with its null hypothesis given as Here y is the number of exceptions and T is the number of observations and k is the confidence level. The test is given as Under the null hypothesis that the model is correct and LR POF is asymptotically chi-squared (χ 2 ) distributed with degree of freedom as one (1). If the value of the LR POF statistic is greater than the critical value (or p-value<0.01 for 1% level of significant or p-value<0.05 for 5% level of significant) the null hypothesis is rejected and the model then is inaccurate.
The Christoffersen's Interval Forecast Test combined the independence statistic with the Kupiec's POF test to obtained the joint test [30,31]. This test examined the properties of a good VaR model, the correct failure rate and independence of exceptions, that is condition coverage (cc). the conditional coverage (cc) is given as À2ln Where u i is the time between exceptions I and i-1 while u is the sum of u i . If the value of the LR cc statistic is greater than the critical value (or p-value<0.01 for 1% level of significant or p-value<0.05 for 5% level of significant) the null hypothesis is rejected and that leads to the rejection of the model.

Distributions of GARCH models
In this study we employed two innovations namely student t and skewed student t distributions they can account for excess kurtosis and non-normality in financial returns [28,33].
The student t-distribution is given as The Skewed student t-distribution is given as Where v is the shape parameter with 2 < v < ∞ and λ is the skewness parameter with À1 < λ < 1. The constants a, b and c are given as Where μ and σ are the mean and the standard deviation of the skewed student t distribution respectively.

Method of data collection
The data used in this study is a secondary data that was collected from www.ca shcraft.com under stock trend and analysis. Daily stock price was collected on Zenith bank stock price from October 21st 2004 to May 8th 2017.
The returns was calculated using the formula below Where R t is stock returns; P t is the present stock price; P t-1 is the previous stock price and ln is the natural logarithm transformation. Then total observation becomes 3070.

Results and discussion
The section presented the results emanating from the analysis and discussions of results. Figure 1 below presented the plot of the log of Zenith Bank returns which is the first step in financial time series analysis. The plot revealed some spikes at the early part of the return series while later the series returns became stable. Figure 2 below presented the plot of the cleansed log of Zenith Bank returns, this is necessary to remove any possible outlier that may be presents in the return series.
The Table 1 below presented the descriptive statistics of the zenith bank return series. The Table 1 revealed a maximum return as 0.338000 while minimum return as À0.405850. The average return as 0.000114 which signifies a gain in the stock for the period under study. The series is negatively skewed with high value of kurtosis. The return series is not normally distributed and the return series is stationary with presence of ARCH effects in the return series, these are typical characteristics of a financial return series [34,35]. Table 2 below presents the selection criteria values for daily zenith Bank stock returns based on the student and skewed student t-distributions. The log returns of
Descriptive statistics and unit root testing of zenith Bank stock returns.       Table 3.
Parameter estimates and ARCH LM tests of the GARCH models.
the daily stock price of Zenith Bank returns were modeled with nine different GARCH models (sGARCH, gjrGARCH, eGARCH, iGARCH, aPARCH, TGARCH, NGARCH, NAGARCH and AVGARCH) with maximum lag of 2. Most the information criteria for the sGARCH model were not available because the model fails to converge. The lowest information criteria were associated with apARCH (2,2) with Student t-distribution followed by NGARCH(2,1) with skewed student t distribution. The caution here is that GARCH model should not be selected only based on information criteria only but the significance value of the coefficients, goodness-oftest fit and backtesting should be considered also [3]. The estimated GARCH models for the zenith bank stock with nine different GARCH models (sGARCH, gjrGARCH, eGARCH, iGARCH, aPARCH, TGARCH, NGARCH, NAGARCH and AVGARCH) shows that most of the coefficients of the fitted GARCH models were not significant at 5% level except for eGARCH (1,1) model that provided significant coefficients in most cases. In the overall, most of the estimated GARCH models revealed absence of serial correlation in the error terms and absence of ARCH effects in the residuals. Because of limited space, we presented only the result of eGARCH (1,1) model in Table 3 above. Persistence of GARCH model measure whether the estimated GARCH model is stable or not as shown in Table 4 above. In financial time series literature it should be less than 1 [3,36]. Most of the models are stable except for iGARCH model. The half-life measure how long it will take for mean-reversion of the stock returns. The result revealed an average of 10 days for mean-reversion to take place.
The Table 5 above presented the backtesting test of some selected GARCH model. The backtesting result of the apARCH (2,2) was not available while eGARCH(1,1) with Skewed student t-distribution, NGARCH(1,1), NGARCH(2,1), and TGARCH (2,1) failed the backtesting but eGARCH (1,1) with student tdistribution passed the backtesting approach which is supported by the results in Table 5 above. Therefore with the backtesting approach, eGARCH(1,1) with student t-distribution emerged the superior model for modeling Zenith Bank stock returns in Nigeria [30,31]. This chapter recommended the backtesting approach to selecting reliable GARCH model for estimating stock returns in Nigeria.

Conclusions
This book chapter investigated the place of backtesting approach in financial time series analysis in choosing a reliable GARCH Model for analyzing stock returns. To achieve this, The chapter used a secondary data that was collected from www.cashcraft.com under stock trend and analysis. Daily stock price was collected on Zenith bank stock price from October 21st 2004 to May 8th 2017. The chapter used nine different GARCH models (sGARCH, gjrGARCH, eGARCH, iGARCH, aPARCH, TGARCH, NGARCH, NAGARCH and AVGARCH) with maximum lag of 2. Most the information criteria for the sGARCH model were not available because the model could to converged. The lowest information criteria were associated with apARCH (2,2) with Student t distribution followed by NGARCH(2,1) with skewed student t distribution. The caution here is that GARCH model should not be selected only based on information criteria only but the significance value of the coefficients, goodness-of-test fit and backtesting should be considered also [3].