Home Products & Services Educational Downloads Risk System Financial Ratios System

Manual and Help for Excel addin Metrixus - Metrics for Financial Market

-> Content

Back: 2.2.13. Best Exponentially Weighting Volatility - EWV

Next: 3. FAQ


2.2.14. ARCH - GARCH - IGARCH - EGARCH - GJR (TGARCH)

ARCH - Autoregressive Conditional Heteroskedastic – family models are not linear models applied to data series volatility determination – mainly financial ones - where linear models have been proved unable to explain some of theses data series features. However, there aer many family members.

ARCH model, initially proposed by Engle, assumes that - in a regression - error variance is correlated with the independent variable (regression error). In such a way, variance is said to be conditional (not constant) and its value depends on error itself. That is, conditional heteroskedasticity.


Erro = Error
Variável independente = independent variable

To ARCH model and considering data series of regression error and a model order q, being t a generic time frame, conditional variance of error is:


Where:

      • coeficientes = coefficients



Thus, conditional variance depends on the square errors of the regression according to an order q.

It is possible to prove that, in model ARCH above, the conditional variance has a trend to converge to a constant. This constant represents the not conditional variance that is given by:


incondicional = unconditional

Coefficients sum less than 1 is to garantee model has stationary covariance - error variance is expected to be constant and limited (unconditional variance).


Due to difficulties in coefficients estimation of ARCH, meaning large values for q order, GARCH - Generalized Autoregressive Conditional Heteroskedastic models, originally considered by Bollerslev, adds the dependence of variance to former variances.

Thus, GARCH model is given by:


where p>0 is the order of the dependence of the variance with former variances, being the coefficients .

The p and q model orders must satisfy the following conditions to have stationary covariance, or an unconditional variance or a trend of convergence:



In function of the adopted precision - mathematical roundings and bordering situations in the restrictions - an unrealistic value for the unconditional variance can be gotten even with the condition above being respected.


IGARCHIntegrated GARCH – is pretty like GARCH model, but do not obey to stationary covariance restriction:



In this model, one shock in the variance (or the secular series) in one instant in the time influences or remains important for a long period of forecasts. Many financial series present this characteristic.

It is important to observe that for short horizon forecasts, no-stationary covariance will not be a greta issue. However, if the horizon of forecasts is long, this model will tend to anywhere (not stationary and unlimited)!


EGARCHExponential GARCH – models deals with negative coefficients for p and q orders, eliminating these restrictions in original GARCH model and also allowing asymmetric answers for shocks in time series.

EGARCH is given by:


Where:
Thus, positive or negative shocks can produce different results according to coefficients (the leverage effect or negative correlation between return and volatility). If the coefficient is lesser than 0, there is negative correlation.

Still for EGARCH model, recent shocks can have a greater or lesser importance than GARCH – exponential curve versus quadratic curve of original GARCH model. Figure bellow shows theses possibilities.

EGARCH models can be tough to converge, depending on the number of coefficients to be determined.


GJR - Glosten, Jagannathan and Runkle – model is another asymmetric variation of GARCH model, whose objective is as well as in EGARCH to allow to differentiate negative and positive time series shocks.

To GJR:


where:
In GJR mdoel, coefficient greater then 0 means negative correlation.

GJR and TGARCHThreshold GARCH – models are similar, being TGARCH applied to conditional standard deviation instead of conditional variance.

There are many others models like, for inatance, PGARCHPower GARCH, QGARCHQuadratic GARCH, AGARCHAsymmetric GARCH, etc.


To establish the coefficients of ARCH family models we can use the maximization of LLF (log-likelihood function) through numerical iterative algorithms.

LLF function is, for a time series of size T with normal distribution of regression errors (or returns) and considering as the coefficients of the model, given by:


where f is probability function (i=1) or joint probability function (i>1) of normal dsitribution:




Rewriting the LLF:



This function can be analytically or numerically maximized.
If the order of dependence in relation to the past is bigger than the instant in the time, missing values (previous to the beginning of the series) can be assumed to be equal to unconditional variance for stationary models or equal to the mean of square of the series errors for no-stationary or asymmetric models (initial variance equals the quadratic error medium). The initial error is always equal to the square root of the initial variance.


It is also possible to forecast volatility (or variance) for a future period. For example, GARCH(1,1) model volatility can be represented for an instant d ahead of an instant t as:






Generalizing:




It is common to directly substitute the error of the regression for the returns of the assets in financial series. That is, the conditional variance depends on the square of the last returns according to an order q and depends on last conditional variance second a order p. Also, returns (time series) have normal distribution with variance and null mean.

2.2.14.1. ARCH Family Command

Access:

  • Menu - Metrixus | ARCH Family
  • - Toolbar Metrixus

Description: Returns the coefficients of ARCH family model selected to match a time series (returns or regression errors), determined by the numerical method of iterative algorithms MLEmaximum likelihood estimation or LLF maximization, considering a normal distribution with null mean for time series.

Allows setting up q and p orders for the chosen model. Maximum value for all orders is 7 (if even possible - enough data).

Important: LLF function is used for a normal distribution of regression errors and is numerically maximized!


Important: Time series must be regression errors or, for financial series, asset prices that will be converted to returns - log-returns or not!

Maximum precision adopted for coefficients is 0.000001.
Maximum number of iterations that numrecial algorithm runs till convergence is 100,000 iterations.

Important: After the maximum number of iterations is reached, results presented will be partial and related to the last iteration.

Aiming to solve bordering conditions for coefficient restrictions, as well as of the numerical rounding and the precision of the calculations in the stationary models, all models with the following feature will be considered not stationary:


precisão = precision

Find best model (minimum criteria) option allows to find optimum model, that is, that one that presents the lowest value for information criterion AIC - Akaike, AICc – Akaike corrected or BIC - Schwarz.
All 3 criteria are presented in output sheet and the selected one is identified by min after its name.

Information criteria for best fit were included after 1.0.5 version. Before 1.0.5, best fit only searches for LLF maximization.

When selecting this option, must also be chosen which members of family ARCH will participate of the process of optimum model determination. At least one member must be chosen. Also, it is necessary to limit the maximum orders that will be used by all the chosen models.
Remember that greater the chosen orders for q or p, greater will be the time for the attainment of optimum model. Still, greater the number of tested models, greater will be the time to find the best model. For example, if all families are selected with maximum values available for q and p, the system can delay to get a reply because it will need to test 5 models, each one with up to 48 (48 = 7x7-1) options and everything with a precision of 0.000001. This can really delay!

Analysis of returns from asset prices option allows running this command directly from asset quotations. Returns are internally generated.

Use log returns option is available only for asset prices and allows log-operator over returns. This operator is not internally reverted! This option just simplifies time series treatment.

Important: In the case of use of quotations and analysis of logarithmic returns, the coefficients for logarithmic conditional volatility are returned!

It is possible to use data in direct order or reverse order. Option reverse order (recent data appears first) is used when recent data appears before old data.

Important: Data in time series must be sequential. For more than one column available, data must be ordered into rows and columns. In reverse order, any data in column A comes after any data in column B and data in row number 1 comes after data in row 2 of the same column!!

To show chart output with calculated volatilities, mark Show volatility chart option.

Selected data range must be a contiguous area with at least 3 cells. Fields with text format or empty are disregarded. Data range must be selected before calling this command.

This command generates a new file contends the results in the table and chart form.
The generation of spread sheets without colors allows an easy impression of the data beyond representing gains of execution performance.

Results depend on model chosen, but are always composed by a new file with static data - without links with original data - contends coefficients used in conditional volatility calculation. In this file there will be the following information, where T is total number of valid data in time series (equals to n or n-1 for asset prices):
  • A0: independent coefficient. Maximum precision of 0.00001 in the iterative algorithms. This value is always greater than 0 (minimum of 0.00001), but for EGARCH.

  • A?: coefficients for q order or dependency on former squared errors (or returns). Maximum precision of 0.00001 in the iterative algorithms. These coefficients are always positive (minimum value of 0.00001) in all symmetric models.

  • L?: coefficients for asymmetric models (the leverage effect). Maximum precision of 0.00001 in the iterative algorithms. To GJR model, the positive sum restriction is respected with coefficients. Not showed for symmetric models.

  • B?: coefficients for p order or dependency on former variance of errors. Maximum precision of 0.00001 in the iterative algorithms. Theses coefficients are always positive (minimum value of 0.00001), except for EGARCH.

Important: All coefficients are obtained through iterative numerical processes with restrictions imposed by the chosen model!

  • Indicators: for each coefficient the following indicators are presented in the results:

    • LR: likelihood ratio. Statistical value for each coefficient to be teste for significance with qui-square distribution with 1 degree of freedom.

      • restrito = restricted
        máx = maximum

        where LLFrestrito is the value of logarithmic probability function calculated with the coefficient equal to 0 (no significance). Except in EGARCH, A0 coefficient restrict value equals 1% of precision (1E-07) to respect A0 greater than 0 condition (conditional variance alway positive). In GJR model, when coefficients are lesser than 0 and to observe positive variance condition, tests for coefficients will be double, meaning expressed for coefficients equal to 0 and the respective coefficients also equal to 0.

    • p(qui-2): significance probability for the coefficients. Uses Microsoft Excel internal qui-square function to return all values.

Important: If LR is negative, no value will be returned for LR neither for p(qui-2). That is, there is no way to determine significance probability for the coefficient because LLF is maximized with the coefficient null! In these cases, results do not maximize LLF due to restrictions imposed by chosen model!


Important: If LR value is lesses than qui-square distribution with 1 degree of freedom, the coefficient is not significant.


Important: LR test may suffer some influence from missing values (initial values) in no-stationary models that are not robust.


Important: LR test and Student's t test (not used and not showed) have them same goal, that is, determine coefficient's significance. LR is more flexible, therefore being used. Unfortunately, it is commom to face some inconsistencies between these tests!


  • Cond. Vol.: conditional volatility. It is the value for volatility or standard deviation to the last time t. With log-operators for asset prices, conditional volatility reverses the operator internally. That is, informed value equals standard deviation of asset returns.

    • That is:

      dados = data
      retornos = returns

Important: If log-operator is used for asset prices, coefficients returned are for logarithmic conditional volatility. However, conditional volatility reverses log-operator and returns the standard deviation for asset returns!

  • Inc. Vol. or Unc. Vol.: unconditional volatility. This value equals the convergent standard deviation (or stationary). In case of asset prices with log-operator, the system reverses the log-operator and returns unconditional volatility of asset returns. Not showed for stationary models or asymmetric models.

    • Unconditional volatility
      dados = data
      retornos = returns
      nada = nothing, empty
      não-estacionários, assimétricos = not stationary, asymmetric

Important: Volatilities base (conditional and unconditional, if ever) are equal time series base. Daily data means daily volatilities. To change time base, square-root of time rule may be applied!

  • LLF: maximum value of logarithmic probability function. This is the result returned from MLE – maximum likelihood estimation. Assumes missing values equal to inconditional variance for stationary models or equal the mean of square of the series errors for non-stationary or asymmetric model.

    • Missing values: :

      estacionários = stationary
      não-estacionários, assimétricos = not stationary, asymmetric

    AIC: Akaike information criterion (version 1.0.5)
    • AIC: Akaike
  • AICc: Corrected Akaike information criterion (version 1.0.5)
    • AICc: Akaikec
  • BIC: Bayesian of Schwarz (version 1.0.5)
    • BIC: Schwarz

    where k = p + q + l +1 (dependency order), LLF is the log-likelihood function and N is sample size.


  • Chart: conditional volatility chart. It depends on selection to be showed and plots a maximum of 250 points (last points). For stationary models, 7% of plotted points represent projected volatility. Unconditional volatility is also showed for stationary models (convergenct value). For asset prices with log-operators, all volatilities showed already reverse the log-operator (internally done). Historical returns will be also ploted.

Important: If log-operator is used for asset prices, chart will plot reversed values, including asset return values!


Important: Stationary models make possible to check the convergence from conditional volatility to unconditional volatility!



Database for all examples below:

All examples to follow have used the same time series, that represents R$/U$ (Real/Dollar) quotations from 08/01/00 to 07/31/01. Despite theses data are close to reality, they must be considered hypothetical here.

1.78801.86031.95782.05992.3062
1.79161.87641.96082.05522.3427
1.80791.87041.95542.06222.3494
1.79191.86671.95542.07632.3403
1.79611.87951.93842.08642.3265
1.79921.87141.94222.12172.3425
1.79501.87961.93572.12772.3596
1.79621.89181.94842.09292.3600
1.79591.89811.95242.10002.3833
1.80211.92821.94412.14192.3629
1.80561.93401.94292.15862.3895
1.80701.92401.94632.13732.3821
1.80961.91841.95082.12362.3880
1.81741.90901.94752.11702.3619
1.81991.90991.95162.13692.3722
1.81691.92861.95012.16162.3906
1.81861.94621.95272.15842.4078
1.82041.95731.95532.17322.4079
1.82131.95031.95712.16322.4586
1.82771.96831.95862.15892.4675
1.83491.95661.95952.15212.4748
1.82591.95791.97382.16422.4054
1.82341.94411.97402.14222.3296
1.82181.94861.97532.13842.2997
1.82551.96091.97142.15732.3139
1.82941.93651.97112.18252.3236
1.82071.91001.97392.18882.2923
1.82241.93221.99342.17502.3049
1.81991.94131.99452.18822.3249
1.82791.94131.99802.23642.3395
1.83201.95712.00452.25862.3907
1.83171.97781.99592.25382.4113
1.84381.96101.98842.30112.4943
1.85581.95961.98132.25412.4548
1.85381.97951.98032.21802.4802
1.85461.98471.98942.18472.5300
1.85171.96481.98122.22392.5423
1.85941.96571.99402.23532.5538
1.84201.96982.00272.21872.5979
1.85061.96952.00632.19572.5304
1.84921.96482.02402.23192.4696
1.84791.96762.03682.25862.5032
1.84371.96232.04362.26952.4573
1.84831.96352.04522.28632.4108
1.84981.96782.04282.30622.4247
1.85291.95392.03552.33842.4914
1.85011.95562.02322.32192.4836
1.85201.95592.02082.30362.4971
1.85741.95782.03912.29412.4334
1.85411.95242.03852.32782.4313

Chart below plots log-return in time.


Retorno Log - PTAX venda = Log-return of Real/Dollar quotations
Data = date in dd/mm/yy format
Decimal separator in the picture = ","


For all examples, log-return will be used as a proxy for regression errors. As an option, a regression could be calculated and one error for each point could be determined, instead of return itself, being conditional volatility calculated over theses new errors series.


Usage example for ARCH(1):

Conditional variance for ARCH(1) model.
  • Data: range A2:J51
  • Order q (former errors) 1
  • Ordered by age, with older days first. 1.788 quotation is the oldest.
  • Log-return should be used
  • Show chart


Results:

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters2
ARCH(1) Parameter LR p(qui-2)
A0 0.00005 10926.163 0.000
A1 0.40667 58.272 0.000
Cond. Vol. 0.712%
Inc. Vol. 0.922%
LLF 839.719

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

249 returns were analyzed (250 prices) and 2 parameters estimated to ARCH(1) model. Both parameters are significant with 95% LR test (likelihood ratio).

Conditional volatility is now 0.721% (log-operator already reverted). Unconditional volatility is 0.922% (log-operator already reverted).

Model's equation is:



Chart plots historical returns (log-operator already reverted) and historical volatilities using ARCH(1) model. This is a stationary model and 7% of plotted data are projection of future. Convergence can be seen.


Volatilidade - Modelo ARCH(1) = volatility - ARCH(1) model
Projetada = projected
Incondicional = unconditional
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","

The next chart brings results for ARCH(3) model. A greater adherence of volatility can be seen with a greater order q (dependency order). This is one of shortfalls of ARCH models, that is, a large order.


Volatilidade - Modelo ARCH(3) = volatility - ARCH(3) model
Projetada = projected
Incondicional = unconditional
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","


Usage example for GARCH(1,1):

Conditional variance for GARCH(1,1) model. This is very suitable for financial series.
  • Data: range A2:J51
  • Order q (former errors) 1
  • Order p (former variance) 1
  • Ordered by age, with older days first.
  • Log-return should be used
  • Show chart


Results:

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters3
GARCH(1,1) Parameter LR p(qui-2)
A0 0.00001 192.805 0.000
A1 0.36013 420.053 0.000
B1 0.53949 325.033 0.000
Cond. Vol. 1.370%
Inc. Vol. 1.003%
LLF 872.289

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

All parameters have showed significance at 95% by LR test. Models have showed an unconditional volatility of 1.003%. Conditional volatlity is now 1.370%.

Model's equation is:



Plotting:


Volatilidade - Modelo GARCH(1,1) = volatility - GARCH(1,1) model
Projetada = projected
Incondicional = unconditional
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","

Once again, it is to check for convergence. Also ease to see how strong is conditional volatility adherence (historical).


Usage example for GARCH(2,3):

Conditional variance for GARCH(2,3) model. This model depends on third order from former conditional variance and second order from former square errors.
  • Data: range A2:J51
  • Order q (former errors) 2
  • Order p (former variance) 3
  • Ordered by age, with older days first.
  • Log-return should be used
  • Show chart


Results:

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters6
GARCH(2,3) Parameter LR p(qui-2)
A0 0.00001 195.089 0.000
A1
A2
0.13801
0.37192
19.146
127.705
0.000
0.000
B1
B2
B3
0.28127
0.10309
0.00525
59.095
7.304
0.024
0.000
0.007
0.876
Cond. Vol. 1,836%
Inc. Vol. 1.003%
LLF 878.842

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

GARCH(2,3) model shows the same unconditional volatility that GARCH(1,1), meaning a robust model (GARCH).

Probability test shows that third order of dependency is not significant because p(qui-2) is 12.4% (100% - 87.6%).

Model's equation is, disregarding low significance parameters:


Usage example for IGARCH(1,1):

Conditional variance for IGARCH(1,1) model. This models is not stationary adn have no unconditional volatility.
  • Data: range A2:J51
  • Order q (former errors) 1
  • Order p (former variance) 1
  • Ordered by age, with older days first.
  • Log-return should be used
  • Show chart


Results:

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters3
IGARCH(1,1) Parameter LR p(qui-2)
A0 0.00002 187.772 0.000
A1 0.64024 213.720 0.000
B1 0.35976 84.582 0.000
Cond. Vol. 1.414%
Inc. Vol.
LLF 859.737

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

IGARCH is not stationary and variance shocks tend to remain for a greater time.

Conditional volatility is now 1.414% and there is no value for unconditional volatility.

Model's equation is:



IGARCH chart. No projection plotted because no convergence could be seen without unconditional volatility.


Volatilidade - Modelo IGARCH(1,1) = volatility - IGARCH(1,1) model
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","


Usage example for EGARCH(1,1):

Conditional variance for EGARCH(1,1) model. This model is asymmetric and has no restrictions to estimated parameters.
  • Data: range A2:J51
  • Order q (former errors) 1
  • Order p (former variance) 1
  • Ordered by age, with older days first.
  • Log-return should be used
  • Show chart


Results:

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters4
EGARCH(1,1) Parameter LR p(qui-2)
A0 -0.58511 1996.702 0.000
A1 0.30791 850542.067 0.000
L1 0.37661 7.785 0.005
B1 0.96695 2081.340 0.000
Cond. Vol. 1.285%
Inc. Vol.
LLF 884.129

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

All EGARCH model parameters are significant at 95% by LR test. One can see that there are no restrictions for negative values of some parameters.

Positive value for L1 parameter shows no negative correlation between volatility and returns.

Conditional volatility is now 1.285%. No unconditional volatility is showed because model is asymmetric.

Model's equation is:




Volatilidade - Modelo EGARCH(1,1) = volatility - EGARCH(1,1) model
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","


Gráfico da volatilidade condicional e retornos com operação logarítmica revertida. Nota-se a aderência da volatilidade.


Usage example for EGARCH(2,2):

Conditional variance for EGARCH(2,2) model.
  • Data: range A2:J51
  • Order q (former errors) 2
  • Order p (former variance) 2
  • Ordered by age, with older days first.
  • Log-return should be used
  • Show chart
  • NO colors


Results:

This model do not converge and result are the last number of iteration algorithms.

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters7
EGARCH(2,2) Parameter LR p(qui-2)
A0 -0.88106 2071.568 0.000
A1
A2
0.14453
0.25378
52.297
683.645
0.000
0.000
L1
L2
-0.03459
0.71554
0.008
12.142
0.927
0.000
B1
B2
0.76294
0.18285
1958.485
1306.644
0.000
0.000
Cond. Vol. 1.253%
Inc. Vol.
LLF 885.192

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

The first L1 parameter is not significant at 95% (7.3% =100% - 92.7%).

Conditional volatility is now 1.285%.

Model's equation is, disregarding low significance parameters:



Despite the no convergence feature in this model, chart shows a high adherence of conditional volatility to returns (or errors).


Volatilidade - Modelo EGARCH(2,2) = volatility - EGARCH(2,2) model
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","


Usage example for GJR(1,1):

Conditinal variance for GJR(1,1) model. this model is asymmetric and allows to differentiate positive and negative variance shocks.
  • Data: range A2:J51
  • Order q (former errors) 1
  • Order p (former variance) 1
  • Ordered by age, with older days first.
  • Log-return should be used
  • Show chart


Results:

Using log-returns for asset prices
Order by age - older data appears first

Sample249
Parameters4
GJR(1,1) Parameter LR p(qui-2)
A0 0.00001 1136.126 0.000
A1 0.53309 461.482 0.000
L1 -0.28872 5.864 0.015
B1 0.51174 284.466 0.000
Cond. Vol. 1.189%
Inc. Vol.
LLF 873.833

From 1.0.5 version and latter, information criterions are also placed as a result for all models.

All parameters are significant at 95%. Conditional volatility is now 1.189%. As an asymmetric model, no unconditional volatility is presented.

Negative value of L1 parameters shows no negative correlation between volatility and returns (errors).

Model's equation is:



Plotting:


Volatilidade - Modelo GJR(1,1) = volatility - GJR(1,1) model
Condicional = conditonal
Retornos = returns
Decimal separator in the picture = ","

Topo


-> Content

Back: 2.2.13. Best Exponentially Weighting Volatility - EWV

Next: 3. FAQ

Home | Company information | Tools | CED | Forum | News | Links | Clients | Cases | Templates | Careers | Contact
©All rights reserved - Élin Duxus - Brazil - 2002 - 2008


Excel course, formulas, macros, sheets - Finance Mathematics, HP 12C - Options pricing and course, options Greeks analysis - VaR (Value at Risk) course - Equity, stocks, ADR and international arbitrage - Certified Professionals - Excel add-in for finance - Customized Excel add-in - System and application development, technology - C/C++, VBA, macros, models - Communication in Excel, RTD - Financial modeling - Financial consulting, corporate finance - Cash Flow Analysis - Brazilian PPP (Public-Private Partnership) - Excel Add-in Downloads - Templates - Duxus Risk System Élin Duxus Sitemap
Excel course, formulas, macros, sheets - Finance Mathematics, HP 12C - Options pricing and course, options Greeks analysis - VaR (Value at Risk) course - Equity, stocks, ADR and international arbitrage - Certified Professionals - Excel add-in for finance - Customized Excel add-in - System and application development, technology - C/C++, VBA, macros, models - ARCH, GARCH, TGARCH, ICARG - Communication in Excel, RTD - Financial modeling - Financial consulting, corporate finance - Cash Flow Analysis - Excel Add-in Downloads - Templates - Duxus Risk System - Value at Risk - VaR - ALM - Asset Liability Simulation