Value at Risk (VaR) Using Volatility Forecasting Models: EWMA, GARCH and Stochastic Volatility

This paper explores three models to estimate volatility: exponential weighted moving average (EWMA), generalized autoregressive conditional heteroskedasticity (GARCH) and stochastic volatility (SV). The volatility estimated by these models can be used to measure the market risk of a portfolio of assets, called Value at Risk (VaR). VaR depends on the volatility, time horizon and confidence interval for the continuous returns under analysis. For empirical assessment of these models, we used a sample based on Petrobras stock prices to specify the GARCH and SV models. Additionally, we adjusted these models by violation backtesting for one-day VaR, to compare the efficiency of the SV, GARCH and EWMA volatility models (suggested by RiskMetrics). The results suggest that VaR calculated considering EWMA was less violated than when considering SV and GARCH for a 1500-observation window. Hence, for our sample, the model suggested by RiskMetrics (1999), which uses exponential smoothing and is easier to implement, did not produce inferior violation test results when compared to more sophisticated tests such as SV and GARCH.


INTRODUCTION
The main objective of volatility models is to provide a measure that can be used in managing financial risks, helping in the selection of portfolio assets and in derivatives pricing. The value-at-risk (VaR) models used in risk management by financial institutions, as a measure of the risk of financial loss for a determined confidence interval and time horizon, need a volatility estimate for their formulation. Volatility forecasting models, such as GARCH and stochastic volatility, are proposed as alternatives for this estimation. In this sense, the present paper suggests the use of autoregressive conditional heteroskedasticity and stochastic volatility models to predict the volatility used in VaR measures.
We specify the models and their estimated parameters using an extended sample of continuous returns of preferred Petrobras shares. Additionally, we use a violation test to compare the VaR limits of the models obtained by GARCH, stochastic volatility (SV) and that suggested by RiskMetrics (1999) for the marked-to-the-market returns our portfolio of Petrobras shares.
The paper is organized in eight sections plus appendixes. The second section presents the VaR measure and the adjustment of the volatility models to this measure. The third section introduces the main concepts of the GARCH model, and the fourth section briefly presents the stochastic volatility model. The fifth and sixth sections present the data used and specify the volatility models. The seventh section then details the backtesting to compare the efficiency of the volatility prediction models used in calculating the VaR. The eighth section presents some final conclusions, and the appendixes contain more detailed results of each model's estimation.

THE VALUE AT RISK (VaR) OF A PORTFOLIO
Value at Risk (VaR) seeks to measure the market risks in terms of asset price volatility. VaR, as defined by Jorion (2001, p.19), synthesizes the greatest (or worst) loss expected from a portfolio, within determined time periods and confidence intervals. Formally, VaR is defined for a long position in an asset S over a time horizon j, with probability p (0<p<1): p = P(∆P j ≤VaR) = F j (VaR) (0.1) where ∆P j represents the gain or loss of position P, given by ∆P j = P t+j -P t and F j (.) is the accumulated distribution function (a.d.f.) of the random variable ∆P j .
The VaR is given in monetary units and represents the p-quantile of the distribution F j (.). According to Moretin (2004, p.179), this quantile is estimated from an empirical distribution of the returns. The VaR calculated in (2.1) has a negative value, because someone with a long position suffers a loss if ∆P j <0. The amount in monetary units in calculating the VaR is obtained by multiplying the value of the financial position by the VaR of the return. Calculation of the VaR can be simplified if it is possible to suppose a normal distribution of the continuous returns (y t ), or log-returns, of the assets composing the portfolio. Starting from the estimates of the distribution parameters, such as the standard deviation of the returns, the expected portfolio loss can be determined as follows: where y* is the critical return value for calculating the VaR for time horizon j.
The following figure illustrates the VaR calculation at a 5% confidence interval for a supposedly normal distribution of returns, with mean µ and standard deviation σ : In this way it is possible to calculate the VaR from the accumulated probability density function of a standard normal distribution. However, care must be taken to convert the logreturn of the VaR into a discrete percentage variation i, in the following manner: 3) The absolute VaR suggested by RiskMetrics, in Longerstaey and More (1995), starts from the premise that the conditional distribution of the returns is normal and has mean zero and variance 2 To calculate the VaR it is necessary to have an estimate of the volatility of the asset's log-returns for the analysis horizon. In this study, we evaluate three different approaches of estimating the volatility to calculate the VaR. The first approach, which is based on the model proposed by RiskMetrics, the most common method among VaR users, utilizes exponential smoothing with a decay factor λ of 0.94 and assumes the returns are normally distributed. This approach can be considered a particular case of the generalized autoregressive conditional heteroskedasticity (GARCH) model, and according to Jorion (2001, p. 175), it is represented by the following equation: The second method analyzed uses the concept of conditional volatility, modeled through a combination of the autoregressive moving average (ARMA) plus Gaussian GARCH, and the third performs the volatility prediction through the stochastic volatility (SV) model. Berkowitz and O'Brien (2002) evaluated VaR models for a sample of six banks using historic series. They compared the models employed by the banks with the VaR calculated based on an ARMA(1,1) plus GARCH(1,1) model, assuming a normal distribution. They found by backtesting that the banks' VaR, although more conservative, did not follow the profit and loss (P&L) volatility of their portfolios and was outperformed by the GARCH model in terms of violation of the VaR limits. Jorion (2001, p. 170)  In this study, we use the conditional volatility model in its reduced form to compute the VaR, as done in the work of Berkowitz and O'Brien (2002), as originally proposed by Zangari (1997). The model we use is composed of an autoregressive component of the returns, represented by an AR(1) model 1 : (0.5) combined with a GARCH(1,1) conditional volatility model (0.6) To calculate the VaR with the AR(1) plus GARCH(1,1) conditional volatility model, we use the conditional mean and variance one step ahead, estimated by the model: In this context, supposing a VaR of 5% for one day (with p = 5% and z =1.65), it should be calculated in the following way: (0.8) In following sections we describe the models used to predict volatility for calculating the VaR. Engle (1982) shows that it is possible to model the mean and variance simultaneously. For this, he uses the concept of conditional variance, which can be modeled as an autoregressive term:

GARCH MODEL
εˆ is the estimated residual of the model y t = a 0 + Φ y t-1 + ε t and v t is the white noise.
The representation of the above equation is the base for the autoregressive conditional heteroskedasticity (ARCH) model. Nevertheless, in terms of estimation of ε t , it is not the most suitable, given that to carry out the joint estimation of {y t } and the conditional variance, the maximum likelihood technique is used. Hence, a more suitable specification is to treat v t as a multiplicative term. Hence, the equation can be written as follows: where α 0 and α i are constant parameters such that α 0 >0, α i ≥0 and 0≤∑α i ≤1, for the variance given by not to be negative and/or explosive. Bollerslev (1986) expanded the model given by (3.2) to permit the conditional variance to be modeled as an autoregressive moving average (ARMA) model. The generalized autoregressive conditional heteroskedasticity (GARCH) model is "a generalized ARCH model in which the conditional variance of n at instant t depends not only on the past squared perturbations, but also the past conditional variances." (Gujarati, 2005, p.440). The most common typification is the GARCH(1,1) model, where the first number refers to the lag of the autoregressive terms and the second refers to the number of lags in the model's moving average component. GARCH (p,q) models are specified as: The constraints of this model are: α 0 >0, α i ≥0, β i ≥0 and 0≤∑α i +∑β i ≤1.
It is interesting to note that GARCH models are conditionally heteroskedastic, but have a constant unconditional variance.
To specify GARCH models, it is necessary to assume the conditional distribution of the error terms ε t . The literature usually employs the following distributions: i) normal; ii) Student's t; and/or iii) generalized errors.
For a given distribution, the model is estimated by the maximum likelihood method. For example, for a GARCH (1,1) model, with T observations, assuming a normal distribution of the error terms, the log-likelihood is given by: where v is the number of degrees of freedom and Γ(x) is the usual Gamma function, i.e., In this paper we use the estimations of the GARCH model considering the maximum likelihood based on the normal distribution 2 .

STOCHASTIC VOLATILITY (SV) MODEL
According to Morettin (2004, p.164) "the models of the ARCH family suppose that the conditional variance depends on the past returns." The stochastic volatility (MV) model, first proposed by Taylor (1986), does not make this assumption. This model's premise is that the present volatility depends on its past values, but that it is independent of the past returns. Considering the price of the financial asset at t (S t ), the discrete time stochastic volatility model, presented by Harvey, Ruiz and Shephard (1994), can be written as: where y t represents the continuous return of the asset in period t, calculated by y t = ln(S t / S t-1 ), and logσ 2 follows an AR(1) process. It is assumed that ε t is a series of independent and identically distributed (iid) random terms. Usually ε t is specified to have a standard distribution, so its variance σ ε 2 is unknown. Thus, for a normal distribution σ ε 2 is equal to one, while for a t, distribution with v degrees of freedom, it is v/(v-2). According to the convention in the literature, one can write: y t = σ ε t e 0,5ht (0. 2) 2 We also tested the models based on the Student t distribution. The differences in the results were not significant. where h t is the logarithmic volatility at t and σ is a constant scale factor, for which reason there is no need for a constant in the first-order stationary autoregressive term, according to the following equation: One of the advantages of the discrete time stochastic volatility model is that it is analogous to the continuous time models utilized in articles on options pricing, such as in Hull and White (1987). The basic econometric properties of stochastic volatility models are discussed in Taylor (1986Taylor ( , 1994, Shephard (1996), Ghysels, Harvey andRenault (1996) and Jacquier, Polson and Rossi (1994). One of the key characteristics of this model is that it can be linearized by applying the logarithm squared of the observations in (4.2): log y 2 t = h t + log ε t 2 + log σ 2 (0.5) Afterward, the term ( ) 2 log t E ε is added to and subtracted from expression (4.5), to obtain: 6) The representation of this expression can be written as: As shown in Harvey, Ruiz and Shephard (1994), the state space form given by equations (4.3) and (4.7) supply the basis for estimating the model's parameters by applying a Kalman filter. Harvey, Ruiz and Shephard (1994) estimate the parameters θ = (Φ, σ 2 η ) ∈ (-1,1) by maximizing the following quasi-likelihood function: where y = (y 1 , y 2 ,...), υ t is the projection of the error one step ahead for the best estimator of log y 2 t and F t is the corresponding quadratic error.
The estimation carried out by the quasi-maximum likelihood method is consistent and asymptotically follows a normal distribution. In the next section, we detail the characteristics of the sample, with market data on the shares, used to apply the models presented.

DESCRIPTION OF THE DATA
To apply the volatility models to the calculation of the value at risk (VaR), we chose the preferred shares of Petrobras (Petr4), given their liquidity and the number of trading days with an ample window of data available. The data are daily (trading days) and cover the period from January 2, 1995 to January 12, 2006, for a total of 2729 observations. Alexander (2005, p. 90) reports that "in the GARCH model there is a dichotomy between whether to have sufficient data for the estimates of the parameters to be stable, according to the moving data window, or to have excessive data, so that the predictions do not appropriately reflect current market conditions." Our sample represents a window of eleven years for applying the models, because we prioritized the stability of the parameters. Figure  We initially ran tests to identify the existence or not of a unit root and conditional heteroskedasticity in the series, for adequate application of the models. According to the tests conducted (augmented Dickey-Fuller, Phillips-Perron, KPSS and correlogram of squared returns), it can be said that the series is stationary and heteroskedastic, which qualifies it for application of the models analyzed (see the appendixes).

SPECIFICATION OF THE MODELS
In this section we specify the GARCH and SV models using the data sample mentioned above. We specified the combined AR(1) and GARCH (1,1) model with the help of the EVIEWS program. The AR(1) specified was: We followed the procedures below to estimate the complete GARCH model: -We estimated the AR(1) model following the method suggested by Box and Jenkins (1970); -We verified the lag of the GARCH model by analyzing the autocorrelation and partial autocorrelation functions of the squared residuals, resulting in specification of a GARCH (1,1) model due to its parsimony and because models with more lags did not converge satisfactorily; -We applied Student's t test to the estimated parameters, rejecting the null hypothesis of equality to zero; -The model's constraints were satisfied, since the estimates of the parameters were positive and the sum less than 1; -We verified the absence of autocorrelation in the autocorrelation function by the Ljung Box test; -In the squared residuals tests, we verified the existence of autocorrelation (Ljung-Box), and by the LM test we rejected the null hypothesis of the absence of autocorrelation in the squared residuals; -Using the Jacque-Bera normality test of the standardized residuals, we could verify in the histogram that the distribution of the residuals is leptokurtic, rejecting the hypothesis of normality.
According to these tests, the GARCH (1,1) model is suitable to estimate the conditional volatility, and is thus used to calculate the VaR. The figure below contains the static prediction one step ahead of the conditional variance based on the model specified. Source: Prepared by the authors.
We specified the stochastic volatility (SV) model with the help of the STAMP program. A practical problem arises in estimating this model, namely the existence of zeros in the data series. Since the calculations are carried out in logarithms, the values of the returns cannot be nil. We employed the following transformation, suggested by Breidt and Carriquiry (1994) The model converges very strongly in 14 iterations, with the estimated standard deviation of ξt equal to 1.6888 and that of η t equal to 0.13382. It is important to stress that the Ljung-Box test applied to the residuals estimated by the model suggests there is no autocorrelation. The value obtained in the autoregressive component, of 0.9863, is very high and suggests there is an adjustment equivalence between the GARCH(1,1) and SV models. Figure 4 shows the SV model for the Petrobras stock returns. Just as in the GARCH model, there are volatility clusters coinciding with certain events, but the general volatility level of the SV model appears more stable. Thus, for the case under analysis, either the GARCH (1,1) or the SV model are adequate to estimate the VaR. In this sense, in the next section we apply backtesting to compare the VaR based on the RiskMetrics (1999) methodology, which is widely used in the market, with the VaR based on the GARCH and SV methods.

BACKTESTING
According to the RiskMetrics (1999) manual, backtesting compares the results obtained with the measures generated by the model, to measure the efficiency of the model used by financial institutions.
One of the methods used to evaluate the efficiency of models through backtesting is to test for violations of the VaR limits, given by the number of excesses outside the confidence interval.
This test uses the portfolio's value marked to the market, counting the number of times the portfolio's returns exceeded the confidence interval stipulated for the VaR. violations can be differentiated into: upper limits, when the return exceeds the confidence interval on the right side of the tail; and lower limits, when the return is more negative than the critical return determined by the VaR. In this work we apply the violation test for the lower limits, using the marked-to-the-market returns of the Petrobras shares for a window of 1500 observations. In this form, it is possible to compare the efficiency of the GARCH and RiskMetrics models. The next figure shows the Petrobras returns and the VaR calculated by the RiskMetrics model, with volatility estimated by the exponential weighted moving average (EWMA), with a decay factor λ =0.94. It can be seen that at the moments of greatest volatility, the Petrobras returns exceeded the lower VaR limits.   The results of the limits-violation testing show that in 4.54% of the observations, the Petrobras returns exceed the VaR limits calculated with the GARCH model, while the corresponding percentages for the SV model were 3.87% and for the EWMA model only 3.20%. It is important to point out that these results are only indicative for a sample, and by comparing them it is not possible to conclude which is more efficient. But it is possible to infer that the VaR calculated by the EWMA method, through the model proposed by RiskMetrics, suffered fewer violations of the limits than the VaR calculated with the volatility forecast by the GARCH (1,1) and SV methods. Nevertheless, it should be remembered that all the models tested remained within the 5% significance level used in the VaR.

FINAL CONSIDERATIONS
This article analyzed three models used to estimate volatility: exponential weighted moving average (EWMA), generalized autoregressive conditional heteroskedasticity (GARCH) and stochastic volatility (SV). The volatility estimated by these models is the basis for calculating the VaR, a metric widely used by financial institutions and companies with exposures, to evaluate the risk of probable losses in their portfolios caused by asset price variations. The VaR measure depends on the volatility, the time horizon and the confidence interval for the continuous returns calculated through the logarithmic differences of the asset prices.
For empirical analysis, we used a sample of prices of preferred Petrobras shares to specify the generalized autoregressive conditional heteroskedasticity and the stochastic volatility models. Both the GARCH and the SV models proved adequate to model the volatility. Additionally, we carried out limits-violation backtesting for a VaR of 5% calculated one step ahead, to compare the efficiency of the GARCH and SV models with that proposed by RiskMetrics (EWMA). The results of these tests were not conclusive, but we verified that the VaR calculated by EWMA suffered fewer violations that those calculated by the GARCH and SV models, for a window of 1500 observations. The model suggested by RiskMetrics (1999), which uses the volatility calculated by exponential smoothing, besides being favored by the simplicity of its implementation, did not provide inferior results in the violation test in comparison with the more sophisticated volatility estimation models.
For subsequent works, we suggest the use of portfolios with more than one asset, or verification of the models for longer projection horizons than one day.

APPENDIXES i) Autocorrelation of the series
The correlogram of the stock's returns is presented below: From the analysis of the ACF and PACF, it is not very clear which model the behavior of these functions represents. However, a significant reduction can be perceived both in the ACF and PACF in the series' first lag. In this context, the AR(1), MA(1) and ARMA(1,1) are estimated and the respective information criteria are analyzed to select the model to be estimated with GARCH: Based on the significance of the estimated coefficients, as well as the information criteria of the models, we chose to use the AR(1) specification for the series.
ii) Analysis of the series for adjustment of a GARCH model The correlogram of the stock's squared returns is presented below: The squared return series presents strong autocorrelation, which provides indications that the generalized autoregressive conditional heteroskedasticity model can be used for the best modeling of the series. The graph of the squared return series shows characteristic clusters of the GARCH model: .00 .01 .02 .03 .04 .