1 Introduction

With the development of non-traditional security theory, environmental, energy, ecological, and financial security have drawn a lot of attention (Nguyen et al., 2020). The continuous spread of COVID-19 around the world has significantly impacted the social and economic development of many nations, including China. In particular, China’s financial markets have suffered severe shocks, which have seriously endangered its financial security and stability (Le et al., 2020). The SSE Composite Index fell 7.72% on the first trading day after the Spring Festival (February 3, 2020), which was the largest one-day decline in nearly five years. Overseas financial markets were also seriously affected, with the global stock market undergoing a dramatic adjustment. The U.S. stock market experienced sharp declines with the Dow Jones index dropping from nearly 30,000 points to around 20,000 points (Afum et al., 2020).

In addition, the spread of COVID-19 has severely damaged the fundamentals of listed companies. Understandably, fear of the pandemic and the need for national prevention and control measures have restricted consumer behaviors. Consumption in catering, entertainment, tourism, transportation, among others was greatly reduced, which directly impacted the operating cash flow and income of relevant enterprises. The temporary rise in the unemployment rate caused by forced unemployment of the labor force and the sharp decline in wage income further decreased demand in those areas (Fang et al., 2020). Due to the COVID-19 pandemic, the path for listed companies to issue bonds for share buybacks was also interrupted, which directly affected stock valuations. The COVID-19 pandemic also revealed the sensitivity of the stock market to unusually volatile "overreactions" in the short term during sudden emergencies (Lasfer et al., 2003). This not only amplifies the vulnerability of the secondary financial market system, but also leads to abrupt changes in the original stable correlation state between stock markets (Guidolin et al., 2019), resulting in risk contagion among stock markets and a significant increase in the risk spillover effect (White et al., 2015). Thus, we can conclude that COVID-19 has led to a sharp rise in market panic and market uncertainty, increased market volatility, enhanced risk resonance and the risk spillover effect among regional financial markets, caused obvious risk transmission among stock markets, and significantly increased the cross-market risk spillover effect. In these types of uncertain times, it is extremely important to predict the risks of the financial market, to grasp the changing rules of the stock market, and for the government to conduct macroeconomic regulation and financial market management (Song et al., 2020).

To date, many scholars have analyzed the risk measurement of financial return series. In 1993, the G30 Group published a report named, "Practice and Rules of Derivatives," which introduced the concept of value at risk (VaR) to measure market risk for the first time. Because of its excellent ability to quantify and abstract risks, VaR has been widely recognized by the financial community since its publication. Duffie and Pan (1997) provided a comprehensive description of VaR, including its theory, concept, background, estimation method, and stock market application. Penza et al. (2001) reiterated the effectiveness of VaR for measuring financial risk. Since then, VaR has become the basis of future research on financial market risk measurement. In studying VaR risk measurement methods, the generalized autoregressive conditional heteroscedasticity model (GARCH) model has attracted researchers' attention. Engle (1982) first proposed the autoregressive conditional heteroscedasticity model (ARCH), and Bollerslev (1986) improved it into the generalized GARCH model. Ricardo used the ARCH family model to model and calculate VaR under different distribution conditions. In the same study, he also tested the accuracy of risk measurements. Giot and Laurent (2004), Angelidis and Degiannakis (2005), Giot (2005), and McMillan and Speight (2007) also modeled and estimated VaR based on the ARCH model, the GARCH model, and the GARCH extension model, respectively. Among them, Angelidis and Degiannakis (2005) found that the estimation of VaR by the GARCH model fitted under a t-distribution was accurate enough to predict five indexes, including the Dow Jones Industrial Average. Ansari et al. (2020) used the GARCH model to measure the risk of Chinese open-ended funds under a t-distribution and GED distribution, respectively, and concluded that the VaR model is better under GED distribution. The essence of VaR is quantile. Engle and Manganelli (2004) proposed to introduce the concept of quantile into the calculation of VaR (CAViaR model), which was developed and estimated based on the quantile theory and directly calculated the quantile through mathematical optimization without estimating the shape and parameter of the distribution. At the same time, the transmissibility of risk is considered, and the lag term is introduced to improve the prediction accuracy of VaR. Taylor (2008), Gaglianone et al. (2011), and Gerlach et al. (2011) conducted an in-depth study on CAViaR and found that the VaR calculation performance of the CAViaR model was the best for financial time series with fat-tail characteristics. The gradual maturity of the quantile method and its good statistical profile led to more and more scholars using the quantile theory method to model and estimate VaR. Chen and Kang (2012) used the quantile regression model to measure the volatility risk of China's stock market, and verified the effectiveness of the quantile regression model for VaR estimation of financial time series data and semi-parametric risk measurement methods. To better measure extreme risks, some have adopted the Extreme Value Theory (EVT) method to improve the GARCH family model. Karmakar (2013) adopted the EVT method to improve the GARCH family model to measure tail risk of the Indian stock market and produced robust risk measurement results under different confidence levels. Youssef et al. (2015) also measured the risk of crude oil and the oil market and found that the FIAPARCH model of extreme value theory had a better prediction effect on VaR, while the selection of threshold value for the EVT method was easily affected by subjective factors. If the threshold is too large, insufficient sample data exceeding the threshold will be generated, which may lead to an increase in parameter estimation variance and low estimation accuracy. If the threshold value is too small, the parameter estimation will be biased. That is, the choice of threshold value will affect the accuracy of risk prediction for the improved model.

However, the VaR model has inevitable drawbacks. Artzner et al. (1997) showed that VaR not only ignored loss beyond risk level, but also did not conform to the consistency axiom, because it did not have subadditivity. To make up for this deficiency of VaR, Artzner et al. (1999) proposed a new method to measure financial risk, namely the expected shortfall (ES) value. In addition, Yamai and Yoshiba (2005) demonstrated two other shortcomings. First, rational investors who want to maximize expected utility may be misled by VaR data, which makes it difficult for investors to use when optimizing their portfolios. The function and applicability of ES and VaR in risk management are compared completely. Based on its definition, VaR only measures the maximum loss within a confidence interval and ignores the tail risk (risk under extreme circumstances), while ES considers the expected value of tail loss, which can overcome the loss caused by tail risk to some extent. This was confirmed by Acerbi and Tasche (2002a, 2002b), who rigorously demonstrated the consistency of ES. This resulted in an increase in studies adopting VaR as a substitute for ES. Acereda et al. (2019) successfully analyzed risk metrics to estimate cryptocurrency return using ES values, while Lazar and Zhang (2019) successfully concluded that ES has a smaller impact on risk than the VaR model. In terms of ES risk measurement, Taylor (2008), Bulut and Moschini (2009) used a quantile regression model to calculate ES risk. Amedee-manesme et al. (2017) also demonstrated the benefit of using the Cornish-Fisher expansion to calculate VaR and ES values by using the response surface method.

Based on the aforementioned literature, the VaR model is the most widely used model for financial risk prediction. The GARCH family model is typically used to calculate the VaR value due to the volatility and aggregation of stock returns, but it cannot accurately describe the tail characteristics of a stock return series. In many studies, quantile theory is used to model and estimate financial time series with fat-tail characteristics. Therefore, this paper integrated the advantages of a quantile regression model and traditional GARCH model to establish a combined model for calculating the VaR value. In view of the shortcomings of the VaR method, the ES method was applied to improve model performance. This paper focuses on the Shanghai Composite Index returns. In the modeling of the GARCH family model, eight different distribution assumptions are considered, including normal distribution, t-distribution, GED distribution, skewed normal distribution, skewed t-distribution, SGED distribution, NIG distribution, and GHYP distribution. Combined with AIC and BIC information criteria, the SGED-EGARCH(1,1) model was selected to calculate the VaR and ES values. To describe the risk characteristics of a sse return series more comprehensively, a quantile regression was introduced and the QR-SGED-EGARCH(1,1) model was established to calculate the VaR and ES values. To better compare the quality of the models, this paper also used the Cornish-Fisher Expansion model to calculate VaR and ES values, the Kupiec test to evaluate the effect of each model on VaR risk measurement, and the DLC evaluation index to evaluate the effect of each model on ES risk measurement. In terms of model testing, this paper applies the model to investigate financial risks in stable and turbulent periods, which makes the evaluation of risk measurement ability for each model more convincing.

The remainder of this paper is structured as follows: The second part includes definitions of VaR and ES, and introduces the concepts of the GARCH family models (including GARCH, EGARCH, APARCH, and GJR-GARCH models) and quantile regression. The risk measurement process of VaR and ES based on the GARCH and QR-GARCH family models are provided. In the third part, the SGED-EGARCH(1,1) model is established by processing and testing the Shanghai Composite Index, and the QR-SGED-EGARCH(1,1) model is established by introducing the idea of quantile regression. The VaR and ES values of the established model are estimated, and the risk measurement effect for each model is compared by backtesting. The final section is the conclusion.

2 Theoretical model

2.1 Definitions of value at risk (VaR) and expected shortfall (ES)

VaR measures risk and represents the maximum possible loss of a financial assets or securities portfolio under normal market fluctuations. More specifically, it refers to the maximum possible loss of a financial asset or securities portofolio over a given future period at a certain confidence level (1 − α).

$$ Prob\left( {P_{t + I} - P_{t} < - VaR} \right) = \alpha $$
(1)

where, \(P_{t}\) represents the asset price at time t, the asset price with holding period I is represented as \(P_{t + I}\), and α is the given significance level. Artzner et al. (1999) defined VaR as:

$$ VaR = - \inf \{ x|{\text{prob}}({\Delta }P < x) > \alpha \} $$
(2)

where \(\Delta P={P}_{t+I}-{P}_{t}\) represents the income of assets or portfolio of assets. By that definition, VaR values can be seen as an asset or portfolio loss in the α quantile of the probability distribution of random variables. For example, if a certain asset under the significance level of 0.05 has a VaR value of 10 million yuan, it means that there is a 95% certainty that the asset losses during the next holding period will be less than 10 million yuan, and a 5% probability that it will exceed 10 million yuan.

According to this definition, the VaR value is the maximum possible loss of an asset in the next holding period under a given significance level α. It can measure loss within the confidence level, but not loss beyond the confidence level. Additionally, since the VaR value is not subadditive (the risk of two portfolios should be less than or equal to the sum of their risks), it cannot be used when we are measuring the risk of a portfolio. To address this, Artzner et al. (1999) proposed a risk measurement method based on ES. According to Acerbi and Tasche (2002a, 2002b), ES is defined as:

$$E{S}_{(1-\alpha )}=-\frac{1}{\alpha }{\int }_{0}^{\alpha }{F}^{-1}(x)dx$$
(3)

The loss \({F}_{X}(x)\) probability distribution function of random variables of α quantiles for \({x}_{\alpha }=-Va{R}_{(1-\alpha )}\) can be expressed as:

$$E{S}_{(1-\alpha )}=-E[X|X\le {x}_{\alpha }]$$
(4)

Based on this definition, the ES value is the mean value of the loss portion that exceeds VaR in the loss probability distribution, which is a conditional expectation. Therefore, \(E{S}_{(1-\alpha )}>Va{R}_{(1-\alpha )}\) can measure the tail risk that the VaR value cannot.

2.2 VaR and ES risk measures based on the GARCH family models

Several sequential GARCH models with aggregation, asymmetry, heteroscedasticity, and other characteristics are introduced in the sections below.

2.2.1 GARCH model

Proposed by Bollerslev in 1986, the typical assumption is that residuals follow a normal distribution to use the GARCH model for modeling. However, in reality, the liquidity of the financial market is limited. When there is a shock to the system, such as the impact of the COVID-19 pandemic, a large number of homogeneous transactions will occur in the financial market, and the financial time series will show a thick tail phenomenon. Under normal circumstances, a financial time series would show spikes, but this is not consistent with the normal distribution assumptions. From a statistical point of view; however, the residuals of a financial time series do not conform to the general equal variance assumption. Therefore, we cannot assume normal distribution, so the definition of the GARCH (p,q) model is as follows:

$$\left\{\begin{array}{c}{\partial }_{t}={\sigma }_{t}{\varepsilon }_{t}\\ {\sigma }_{t}^{2}=\omega +{\sum }_{i=1}^{\rho }{\alpha }_{i}{\sigma }_{t-i}^{2}+{\sum }_{j=1}^{q}{\beta }_{j}{\sigma }_{t-j}^{2}\end{array}\right.$$
(5)

where \(\left\{{\epsilon }_{t}\right\}\) is a sequence of independent identically distributed random variables, \(\omega >0,{\alpha }_{i}\ge 0,{\beta }_{j}\ge 0\),\({\sum }_{i=1}^{\mathrm{max}(p+q)}\left({\alpha }_{i}+{\beta }_{j}\right)<1\). For \(i>p\), we must have \({\alpha }_{i}=0\); For \(j>q\), \({\beta }_{j}=0\). If q = 0, the above equation is a simplified ARCH(p) model.

The basic form of the widely used GARCH model is as follows:

$${\sigma }_{t}^{2}=\omega +\alpha {\sigma }_{t-1}^{2}+\beta {\sigma }_{t-1}^{2}$$
(6)

2.2.2 EGARCH model

Nelson (1991) proposed the EGARCH model, which reflects the asymmetric influence of the financial market. The EGARCH (p,q) model can be written as follows:

$$\left\{\begin{array}{l}{\partial }_{t}={\sigma }_{t}{\varepsilon }_{t}\\ \mathrm{ln}\left({\sigma }_{t}^{2}\right)=\omega +{\sum }_{i=1}^{p}{\alpha }_{i}|\frac{{\mu }_{t-i}}{{\sigma }_{t-i}}|+{\sum }_{i=1}^{r}{\gamma }_{i}\frac{{\varepsilon }_{t-i}}{{\sigma }_{t-i}}+{\sum }_{i=1}^{q}{\beta }_{i}\mathrm{ln}({\sigma }_{t-i}^{2})\end{array}\right.$$
(7)

The latter part represents the asymmetric response of volatility to positive and negative returns, also known as the leverage effect. Parameters in the model can take any value.

2.2.3 APARCH model

By using a Box-Cox transformation, Ding et al. (1993) established the APARCH model to better describe the variation characteristics of volatility. The model is as follows:

$$\left\{\begin{array}{l}{\partial }_{t}={\sigma }_{t}{\varepsilon }_{t}\\ {\sigma }_{t}^{\delta }=\omega +{\sum }_{i=1}^{p}{\alpha }_{i}{\sigma }_{t-i}^{\delta }+{\sum }_{j=1}^{q}{\beta }_{j}(\left|{\varepsilon }_{t-j}\right|-{\gamma }_{j}{\varepsilon }_{t-j}{)}^{\delta }\end{array}\right.$$
(8)

When \(\delta =2\) and \({\gamma }_{j}=0\), the above equation is the GARCH (p,q) model. Due to the flexibility of the δ value, this model has a good performance in prediction.

2.2.4 GJR-GARCH model

By adding dummy variables to the GARCH model to describe the asymmetric response of conditional variance to the return rate, Glosten et al. (1993) proposed the GJR-GARCH model, as shown below:

$$\left\{\begin{array}{l}{\partial }_{t}={\sigma }_{t}{\varepsilon }_{t}\\ {\sigma }_{t}^{2}=\omega +{\sum }_{i=1}^{p}{\alpha }_{i}{\sigma }_{t-i}^{2}+{\sum }_{j=1}^{q}({\beta }_{j}{\varepsilon }_{t-j}^{2}+{\gamma }_{j}{I}_{t-j}{\varepsilon }_{t-j}^{2})\end{array}\right.$$
(9)

where \({I}_{t-j}\) is an indicative function. The value is 1 when \({\varepsilon }_{t-j}\le 0\), and 0 otherwise. The positive and negative rates of return have different effects on volatility.

2.2.5 Risk measures of VaR and ES based on the GARCH family model

The formula of VaR is as follows:

$$Va{R}_{t}={z}_{(1-\tau )}{\sigma }_{t}$$
(10)

where, \({z}_{(1-\tau )}\) is the random error term \({\varepsilon }_{t}\) with a confidence level of (1-τ) quantile under certain distribution assumptions. Based on this, the income ES risk measure is:

$${ES}_{t}(1-\tau )=E(-{r}_{t}|-{r}_{t}>Va{R}_{t}(1-\tau ))=-\frac{{\sigma }_{t}}{\tau }f({z}_{1-\tau })$$
(11)

where \(f\left({z}_{(1-\tau )}\right)\) is the function value of a specific distribution density function at \({z}_{(1-\tau )}\).

2.3 Risk measurement of VaR and ES based on the QR-GARCH model

2.3.1 Quantile regression

A quantile is a point in the probability distribution of a random variable, which divides the sequence of random variables with a certain probability, as defined below:

Let the distribution function of random variable x be \(F(x)=p(X\le x)\), for any \(0<\tau <1\), defined as:

$${F}^{-1}(\tau )=\mathit{inf}\{x:F(x)\ge \tau \}$$
(12)

\({F}^{-1}(\tau )\) is the τ quantile of X.

A quantile regression is the introduction of quantiles into the regression model, which is an extension of the least squares estimation model. The derivation of the parameter estimation method is shown below:

The loss function is defined as:

$${\rho }_{\tau }(\mu )=\mu (\tau -I(\mu <0))$$
(13)

where 0 < τ < 1, the function \(I(\mu <0)\) is the indicative function,

$$I\left(\mu <0\right)=\left\{\begin{array}{l}1, \, \, \, \, \, \, \, \, \, \, \, \mu <0\\ 0, \, \, \, \, \, \, \, \, \, \, \, \mu \ge 0\end{array}\right.$$
(14)

Let Y be the random variable and \(\{{y}_{1},{y}_{2},\cdots ,{y}_{n}\}\) be its sample value. For any 0 < τ < 1, the estimate of the τ quantile of the random variable Y is defined as:

$$\stackrel{\wedge }{\xi }=\underset{\xi \in R}{argmin}{\sum }_{i=1}^{n}{\rho }_{\tau }({y}_{i}-\xi )$$
(15)

It is equivalent to

$$\underset{\xi \in R}{argmin}\left({\sum }_{{y}_{i}\ge \xi }\tau \left|{y}_{i}-\xi \right|+{\sum }_{{y}_{i}<\xi }(1-\tau )\left|{y}_{i}-\xi \right|\right)$$
(16)

Equation (15) can be transformed into a linear programming problem to solve it.

2.3.2 Risk measures of VaR and ES based on the QR-GARCH model

Koenker and Bassett (1978) proposed the idea of quantile regression (QR), which introduces the idea of quantiles into the regression model. According to different quantile values, the calculated estimates reflect and describe the characteristics of different loci of financial time series data distributions. The model based on quantile regressions has an advantage because quantiles are not sensitive to outliers and extreme values. The quantile regression model is also more stable because there is no need to make a series of assumptions. Taylor (1999) proposed a quantile regression model to calculate the VaR value. The quantile regression model is expressed as:

$${V}_{t,k}(\alpha )={\beta }_{1,\alpha }+{\beta }_{2,\alpha }{K}^{1/2}+{\beta }_{3,\alpha }K+{\beta }_{4,\alpha }{K}^{2}+{\beta }_{5,\alpha }{\widehat{\sigma }}_{t+1}+{\beta }_{6,\alpha }{\widehat{\sigma }}_{t=1}^{2}+\cdots +{\varepsilon }_{t,\alpha }$$
(17)

where \({V}_{t,k}(\alpha )\) is the VaR value of the return on assets sequence when the holding period is K and the confidence level is (1 − α). Assuming that \({\widehat{\sigma }}_{t+1}\) is the estimated standard deviation of the yield rate of the (t + 1) stage, and \({\varepsilon }_{t,\alpha }\) indicates the estimated error of the model, the model structure used in this paper is as follows:

$${r}_{t}(\tau )={\beta }_{0}(\tau )+{\beta }_{1}(\tau ){\widehat{\sigma }}_{t}+{\beta }_{2}(\tau ){\widehat{\sigma }}_{t}^{2}+{\varepsilon }_{t}$$
(18)

Let \({\widehat{\sigma }}_{t}\) for the GARCH model represent volatility during one period, and \({\beta }_{0}\left(\tau \right)\), \({\beta }_{1}(\tau )\), \({\beta }_{2}(\tau )\) for quantiles tau represent the estimated parameters. The parameters can be estimated using the following formula:

$$\mathit{argmin}{\sum }_{t=1}^{T}{\rho }_{\tau }\left({r}_{t}(\tau )-({\widehat{\beta }}_{0}(\tau )+{\widehat{\beta }}_{1}(\tau ){\widehat{\sigma }}_{t}+{\widehat{\beta }}_{2}(\tau ){\widehat{\sigma }}_{t}^{2})\right)$$
(19)

Thus we solve for VaR:

$${\mathit{VaR}}_{t}(1-\tau )=-({\widehat{\beta }}_{0}(\tau )+{\widehat{\beta }}_{1}(\tau ){\widehat{\sigma }}_{t}+{\widehat{\beta }}_{2}(\tau ){\widehat{\sigma }}_{t}^{2})$$
(20)

Based on the VaR risk measure, the mean regression analysis is used to realize the estimation of ES, and the linear mean regression model is considered:

$$-{r}_{t}^{*}=\delta (\tau )\cdot {\mathit{VaR}}_{t}(1-\tau )+{\eta }_{t}$$
(21)

Among them \(-{r}_{t}^{*}=\left\{{r}_{t}|-{r}_{t}>{\mathit{VaR}}_{t}(1-\tau )\right\}=\left\{{r}_{t}|{r}_{t}<-{\mathit{VaR}}_{t}(1-\tau )\right\}\) for values less than \(-{\mathit{VaR}}_{t}(1-\tau ),\mathrm{ the}\) value of earnings yield sequence; where \(\delta (\tau )\) is the regression coefficient, \({\eta }_{t}\) is the random error term, satisfying \(E({\eta }_{t})=0\). The conditional expectation of both ends of the above equation can be obtained using the following equation:

$$E(-{r}_{t}^{*})=E(-({r}_{t}|{r}_{t}<-{\mathit{VaR}}_{t}(1-\tau )))=\delta (\tau )\cdot {\mathit{VaR}}_{t}(1-\tau )$$
$${\mathit{ES}}_{t}(1-\tau )=\delta (\tau )\cdot {\mathit{VaR}}_{t}(1-\tau )$$
(22)

3 Empirical analysis

3.1 Data preprocessing

The data in this paper were obtained from the Wind Financial database. The daily closing price of the Shanghai Securities Composite Index from January 4, 2007 to November 5, 2020 were used to calculate the daily yield of 3341 data points to establish and test our model. Considering the closing price volatility of the index in 2020 (shown in Fig. 1) and changes in the actual environment, the closing price of the index from January 16, 2020 to March 24, 2020 was selected. This gives us a total of 41 points of daily yield data to express the stock price changes in China's financial market during the COVID-19 pandemic. The current study calculates the yield based on the closing price of the holding period for one day. The calculation formula is as follows:

$${r}_{t}=\mathit{ln}{P}_{t}-\mathit{ln}{P}_{t-1}$$
(23)

where the daily closing price of an asset at period t is expressed as \({p}_{t}\), and that at period t-1 is expressed as \({p}_{t-1}\); the yield during the holding period is indicated by \({r}_{t}\).

Fig. 1
figure 1

Normal Q-Q chart showing yield rate of the SSE Composite Index

3.2 Normality test

Figure 1 shows the normal Q–Q diagram of the daily yield rate of the Shanghai Stock Exchange Index. As shown in Fig. 1, the value calculated based on the yield rate series deviates from the straight line at the head and tail, meaning that the yield rate series does not conform to the normal distribution. Next, a descriptive statistical analysis and the Jarque-Bera (JB) test were conducted on the daily yield series of the SSE index.

According to the calculation results in Table 1, the skewedness of the yield rate series is equal to − 0.62, indicating that the distribution shape of this yield rate series is left-skewed. Kurtosis is equal to 7.56, meaning the probability distribution of the series is in leptokurtosis, which signifies that the probability distribution of the series is leptokurtic and fat-tailed compared to a normal distribution. Additionally, we can see that the P value for the JB normal test on the series is close to zero. Hence, we can conclude that the probability distribution of the daily yield of the SSE Composite Index is not normally distributed.

Table 1 Basic statistical characteristics of the yield rate series

3.3 ARCH effect test

Engle (1982) proposed a Lagrange multiplier test to determine whether there was an ARCH effect in the residual series. The original hypothesis of this test was that there was no ARCH effect up to order p in the residual series, with the following regression required for the test process:

$${\widehat{u}}_{t}^{2}={\alpha }_{0}+\left({\sum }_{s=1}^{p}{\alpha }_{s}{\widehat{u}}_{t-s}^{2}\right)+{\varepsilon }_{t}, \, t=s+1,\cdots ,T.$$
(24)

where \({\widehat{u}}_{t}\) is the residual error; \({\alpha }_{0}\),…,\({\alpha }_{s}\) is the unknown parameter that needs to be estimated,\({\varepsilon }_{t}\) is the error term, s is an artificially determined positive integer, and T is the total number of individuals in the sample. Figure 2 shows the sequence chart of the daily closing index and daily yield of the SSE Composite Index.

Fig. 2
figure 2

Sequence diagram of daily closing index (left) and daily yield (right) of SSE Composite Index

As shown in the left illustration of Fig. 2, the closing price series fluctuates violently, and the price change curve from 2007 to 2010 and 2014 to 2016 is very steep, which indicates non-stationarity. The fluctuations in the logarithmic yield series in the right illustration of Fig. 2 show that the yield rate fluctuates roughly within the range of − 0.05–0.05, with no significant rules. This was only significantly lower than − 0.05 during the period of drastic fluctuations in closing prices from 2014 to 2016 and the period of the COVID-19 pandemic outbreak in early 2020. Overall, the yield rate series is roughly stable. The following unit root test is applied to test the stationarity of this series, and the Box–Pierce test is applied as the white noise test. The results are shown in Table 2. The significance level α was set at 0.05. The results in Table 2 show that the p values for both the stationary test and the white noise test are significantly lower than the a priori significance level. Thus, the results of both tests reject the null hypothesis that the yield rate series is considered the non-white noise stationary series. This is consistent with the results of the qualitative analysis.

Table 2 Unit root stationary test and white noise test

The following exercise was conducted to test for an ARCH effect in this series (see results in Table 3). According to the test results, the p value of the conditional heteroscedasticity test is close to zero and less than the given value α. Therefore, the null hypothesis is rejected and there is an ARCH effect in this series. Subsequently, the GARCH model can be built based on this series.

Table 3 ARCH effect test

3.4 Model establishment

3.4.1 Establishment of the SGED-EGARCH(1,1) model

As this series is leptokurtic and fat-tailed with non-normal characteristics, to improve the fitting effect, this study establishes GARCH (1,1) under conditions of normal distribution, skewed normal distribution, student’s t-distribution, skewed student’s t-distribution, GED distribution, skewed GED distribution, generalized inverse Gaussian, and generalized hyperbolic skewed student’s t-distribution, respectively, and selects the distribution condition with the best fitting effect as determined by the Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) rules. Results of the modeling are shown in Table 4.

Table 4 Comparison of AIC and BIC values for each model

As shown in the results in Table 4, the AIC and BIC values of the SGED-EGARCH(1,1) model are minimal, and the fitting effect is the best among the given four models and eight distribution conditions. Therefore, the residual sequence is assumed to follow the SGED distribution when fitting the EGARCH model in this paper. The specific model is as follows:

$${\sigma }_{t}^{2}=\mathrm{exp}\left(0.000152+0.00002{\varepsilon }_{t-1}+0.926820\left(\left|{\varepsilon }_{t-1}\right|-E\left|{\varepsilon }_{t-1}\right|\right)\right)+0.068995log{\sigma }_{t-1}^{2}$$

3.4.2 Calculation of VaR based on the SGED-EGARCH (1,1) model

VaR is calculated according to Eq. (10). The following figure shows the fluctuation chart of the negative VaR value and real return rate when the significance level is 0.05 (Fig. 3).

Fig. 3
figure 3

Comparison between the daily yield of the SSE Composite Index and the estimated VaR (95%) value under the GED-GARCH (1,1) model

Figure 3 shows the fluctuation graph for the VaR value and the real yield rate when the significance level is 0.05. We can see that the variation trend of the VaR value calculated according to the fitted model is roughly the same as that of the real yield rate series. When the real market drastically changes, the model changes accordingly. Thus, the model has a good fitting effect.

3.4.3 Establishment of the QR-SGED-EGARCH(1,1) model

Based on the theories introduced above, the VaR values of the QR-SGED-EGARCH(1,1) model at different significance levels are calculated according to Eq. (20). Figure 4 shows the fluctuation chart of VaR values and the actual return rate of the model at a significance level of 0.05.

Fig. 4
figure 4

Comparison between the daily yield rate of SSE Composite Index and the VaR (95%) predicted by the QR-SGED-EGARCH(1,1) model

The predicted value that was calculated using the model is the VaR value under the significance level \(\uptau \). In the model prediction at a significance level of 0.05, the 0.05 quantile is the VaR value. A comparison between the predicted values and real yield series is shown in Fig. 4, from which we can see that the variation trend of the VaR value calculated according to the quantile regression model is roughly consistent with the variation in the real yield rate.

3.5 Test of VaR risk measure results

The inspection process is mainly divided into two parts. First, the relative error value is calculated and compared to the calculated failure rate. Second, the LR test p-value is calculated to check whether the calculated failure rate is significantly different from the given significance level (expected failure rate). The VaR and ES values calculated by the Cornish-Fisher expansion method are tested together in a backtest. To test the universal applicability of the model, the model proposed in this paper was tested during the global financial crisis of 2008, the big drawdown of the SSE Composite Index in 2018, and a specified stable period. Results demonstrate that the QR-SGED-EGARCH model is more effective during exogenous shocks. The specific process is shown as follows.

3.5.1 Failure rate test

Failure rate refers to the probability that the VaR value is smaller than the actual loss. T is the sample size, which is the total number of days, and N is the failed days estimated by the VaR value. Then, the failure rate is defined as:

$$\uppi =\frac{\mathrm{N}}{\mathrm{T}}\times 100\mathrm{\%}$$
(25)

The relative error (RE) is:

$$\mathrm{RE}=\left|(\mathrm{p}-\alpha )/{\alpha }\right|$$
(26)

3.5.2 Kupiec failure rate test

Kupiec (1995) proposed the failure rate test, which is based on whether the failure rate calculated for the fitting model is significantly different from the expected failure rate. The original hypothesis is that the estimated failure rate should be equal to the expected failure rate. The LR statistics tested by Kupiec are shown as follows:

$$LR=-2\mathit{ln}[(1-\alpha {)}^{(T-N)}*{\alpha }^{N}]+2\mathit{ln}[(1-N/T{)}^{(T-N)}*(N/T{)}^{N}]$$
(27)

LR statistics obey the \(\chi (1)\) distribution. The null hypothesis is accepted when the calculated statistic is less than the critical value. It is rejected otherwise.

Table 5 shows the test results of the model failure rate.

Table 5 Inspection results
  1. (1)

    Analysis of VaR backtest results at a 95% confidence level

a) In terms of failure rate, the Cornish-Fisher method overestimated the risk for all time periods, the SGED-EGARCH model underestimated the risk, and the QR-SGED-EGARCH model was more robust. b) From the perspective of relative error, the QR-SGED-EGARCH model displayed a smaller degree of error compared to the other two methods during most crisis periods, indicating that the accuracy of the QR-SGED-EGARCH model is better than other models in VaR risk measurement at a 95% confidence level. The QR-SGED-EGARCH model displayed the minimum RE value during the stationary period, indicating that the introduction of a quantile regression based on the GARCH model still had a good effect during the stationary period. c) According to the P-values of the likelihood ratio test, the corresponding P-values of the QR-SGED-EGARCH model are significantly higher than those of the other two methods for most periods, indicating the superiority of the QR-SGED-EGARCH model over other models of risk measurement.

  1. (2)

    Analysis of VaR backtest results at a 97.5% confidence level

a) From the perspective of relative error, the QR-SGED-EGARCH model displayed a minimum RE value for each period, indicating that the accuracy of the QR-SGED-EGARCH model's VaR risk measure is higher than other models at the 97.5% confidence level. b) In terms of the P-value of the likelihood ratio test, the corresponding P-value of the QR-SGED-EGARCH model was the maximum for all periods, which demonstrates that the QR-SGED-EGARCH model was most effective when the significance level is 2.5%.

  1. (3)

    Analysis of VaR backtest results at a 99% confidence level

The three test indexes show that the QR-SGED-EGARCH model performed better than the other two models for the overall and stationary periods. Although the Cornish-Fisher method achieved better results than the QR-SGED-EGARCH model for both crisis periods, the SGED-EGARCH model introduced with the quantile regression performed better than the improved model for all three crisis periods.

Therefore, the EGARCH model with quantile introduction has a better VaR risk measurement effect than the EGARCH model alone (Chen & Chen, 2002; Taylor, 1999). Since the Cornish-Fisher expansion proposed by Cornish and Fisher is also a good measure of risk (Amedee-Manesme et al., 2017), the current study is the first to compare the Cornish-Fisher expansion method with the QR-SGED-EGARCH(1,1) model. The results show that the QR-GARCH model has a better effect on VaR risk measurement than the Cornish-Fisher expansion model for most time periods.

3.6 ES risk measurement results test

Although VaR has become the standard measurement method of financial risk, it also has certain defects (Artzner et al., 1997; Mckay & Keefer, 1996) and cannot meet the requirements of subadditivity and "consistent risk measurement." Because VaR is represented by a single loci of income distribution, it is used to describe a certain probability to ensure that the loss does not exceed it. Artzner et al. (1999) is a good example of this. Therefore, the ES value is more suitable for financial risk measurement in a crisis period (Lazar & Zhang, 2019). The test method of ES values is usually the DLC test index, as shown below:

$$DLC=\left|\frac{1}{N}\sum_{i=1}^{N}{X}_{i}-\frac{1}{N}\sum_{i=1}^{N}{ES}_{i}\right|$$
(28)

This represents the absolute value of the difference between the average value of loss and the average value of ES, where X is the actual loss greater than VaR and N is the number of days of failure. The size of the DLC value is inversely proportional to the model, so the smaller the value is, the better the model. Table 6 shows the test results of the ES values obtained through the DLC method.

Table 6 Inspection results

As shown in Table 6, the ES value obtained by the QR-SGED-EGARCH(1,1) model with a quantile regression and its corresponding DLC value reached the minimum value 14 times during various periods and at different significance levels α, while the DLC value obtained by the Cornish-Fisher method only reached the minimum value once. However, the corresponding DLC value of the SGED-EGARCH(1,1) model did not reach the minimum value. As shown in Table 6, compared with the stationary period, the ES value obtained by using the QR-SGED-EGARCH(1,1) model during the period of financial crisis was far lower than the corresponding DLC value of the SGED-EGARCH(1,1) model and the Cornish-Fisher model. To sum up, the QR-SGED-EGARCH(1,1) model showed better robustness during the financial crisis period, and the ES value calculated by this model can measure the risk for the financial market during the crisis period.

4 Conclusion

In recent years, most scholars have used the GARCH model to model and analyze financial market risks under different distribution conditions. Some scholars have also introduced the idea of quantile regression on a secondary basis and established the QR-GARCH model, which has displayed a better fitting effect. In terms of risk measurement, the current practice is to use the VaR and ES value. The ES value can show the part of loss that VaR cannot, and can better measure financial market risks.

In this paper, the SGED-EGARCH(1,1) model is used to model the daily return rate of the Shanghai Composite Index from January 4, 2007 to November 5, 2020. Based on this, a quantile regression is introduced and the QR-SGED-EGARCH(1,1) model is established to measure the VaR and ES values. To verify the universal applicability of the model in times of crisis, this paper also selected the 2008 financial crisis and 2018 Shanghai Composite Index crash periods, and added a stable period to further illustrate the effectiveness of this model in times of crisis. We managed to draw the following conclusions: First, by measuring the VaR value using the Kupiec failure rate test, the QR-SGED-EGARCH(1,1) model and the Cornish-Fisher expansion both performed well in crisis situations, with the QR-SGED-EGARCH(1,1) model holding a slight edge over the Cornish-Fisher expansion. The QR-SGED-EGARCH(1,1) model also had a good effect in the stable period. While the addition of a quantile regression can better measure financial market risks during a critical situation, it is still applicable during the stable period. Second, the ES value calculated by the QR-SGED-EGARCH (1,1) model was more accurate during times of crisis compared with the other two methods after the DLC method was used to test the ES values. In general, the ES value calculated by the QR-SGED-EGARCH(1,1) model had a better fitting effect on the risk of the financial markets during the COVID-19 outbreak compared to traditional models. This measurement method can help better predict financial risk and better understand the changing rules of the stock market, which is relevant to any government looking to exert economic macro-control and manage the financial markets.