View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
ARMAX-GARCH-K-SK Toolbox (Estimation, Forecasting, Simulation and Value-at-Risk Applications)

4.9 | 14 ratings Rate this file 55 Downloads (last 30 days) File Size: 545 KB File ID: #32882 Version: 1.5
image thumbnail

ARMAX-GARCH-K-SK Toolbox (Estimation, Forecasting, Simulation and Value-at-Risk Applications)



13 Sep 2011 (Updated )


| Watch this File

File Information

ARMAX-GARCH-K-SK Toolbox (Estimation, Forecasting, Simulation and Value-at-Risk Applications)
Firstly, it allows the estimation, forecasting and simulation of the family of ARMAX-GARCH of any order of AR, MA, ARCH and GARCH terms of the GARCH, GJR-GARCH, EGARCH, NARCH (Nonlinear ARCH), NGARCH (Nonlinear GARCH), AGARCH (Asymmetric GARCH), APGARCH (Asymmetric Power GARCH), and NAGARCH (Nonlinear Asymmetric GARCH) with the Gaussian, Student-t, Generalized Error, Modified Cauchy, Hansen's Skew-t, Logistic, Laplace, Rayleigh, Centered Cauchy, Extreme Value Distribution Type 1, Generalized Exponential and Gram and Charlier expansion series with constant higher moments.
Secondly, the toolbox allows the estimation, forecasting and simulation of the Autoregressive Conditional Kurtosis Model proposed by Brooks, et al (2005).
Thirdly, the toolbox incorporates the Leon, A., Rubio, G., and Serna, G., (2004) "Autoregressive Conditional
 Volatility, Skewness and Kurtosis" model, allowing for the calculation of time-varying skewness and kurtosis at the same time.

Fourthly,, the toolbox allows the evaluation of volatility forecasts using a number of loss functions and the estimation of Value-at-Risk for a given confidence level and horizon period.

Finally, a number of examples are presented to illustrate the application of this toolbox in Market Risk and Financial Risk Management.

The main functions are:
1. garch.m, garchk.m & garchsk.m which estimates the ARMAX-GARCH-K-SK family of models.

2. garchfind.m, which finds the combination of models and distributions that better fits the data based on a set of criteria (i.e. largest log likelihood value and the smallest AIC and BIC criteria).

3. garchsim.m & garchksim.m, which simulates returns, conditional variances and kurtosis.

4.garchfor.m & garchfor2.m - garchkfor.m & garchkfor2.m - garchskfor.m & garchskfor2.m, which estimates mean, volatility, skewness and kurtosis forecasts given the model, distribution, and number of forecasts.

5. garchvar.m & garchvar2.m - garchkvar.m & garchkvar2.m - garchskvar.m & garchskvar2.m, which estimates Value-at-Risk for a given confidence level and horizon period for both long and short positions.

6. garchvolfor.m, which is an application in Volatility Forecasting & Value-at-Risk. It allows the comparison of volatility and Value-at-Risk estimates for a data vector and for a variety of GARCH models and distributions and at different forecast periods as well as sort the results according to only a sub-set of forecast periods.

1. With the help of the VFLF and VaRLR functions a number of volatility loss functions and the VaR unconditional, independence, conditional and regulatory tests are also estimated. The volatility loss functions are the following: MSE; MAD; MLAE; HMSE; HMAE; MAE; MAPE; R2LOG; QLIKE; SR. The VaR back-testing tests are: percentage of failures, TUFF; Likelihood Ratio Unconditional Coverage, Independence Coverage, and Conditional Coverage; Basel II Accord, Basel. For more information which tests are included please refer the VFLF and VaRLR functions.

2. For further information regarding the full functionality and a set of examples of the ARMAX-GARCH-K Toolbox please refer to the readme files.

3. Additional files for garchvar.m and garchvolfor.m can be found in:

I would like to thank you for your comments and your suggestions regarding additional features that should be included.

Please feel free to contact me with comments, suggestions, or bugfixes.

Required Products Optimization Toolbox
MATLAB release MATLAB 8.1 (R2013a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (23)
30 Nov 2016 filonat

It seems that there is an error in garchsk.m. It refers to an error in garchskcore (line 51):

sk(t,1) = parameters(3+p+q:5+p+q)'*[1;((data(t-(1:p)) - mu(t-1))./h(t-(1:p))).^3; sk(t-(1:q))];

Error using *
Inner matrix dimensions must agree.


Comment only
17 Nov 2016 Nhung Nguyen Hong

10 Sep 2016 Bilal Arif Sheikh

Hey can you please share where can I download GED distribution details as i need the GEDINV function for GARCH model. Thanks

Comment only
25 Jul 2016 halil ibrahim Gündüz

Warning: MATLAB has disabled some advanced graphics rendering features by switching to software OpenGL. For more
information, click here.
The constructor for class 'garch' must return only one output value.

Error in readme_armax_garch_applications (line 37)
[parameters, stderrors, LLF, ht, resids, summary] =

24 Oct 2015 Miss Independent

I ran your program and it appears that you have an error in your program readme_armax_garch_k_applications. The source of the error appears to be in your garchlik.m

Comment only
08 Oct 2015 Da

Da (view profile)

Thanks for sharing!

31 Aug 2015 Cam Salzberger

Solution for the naming conflict issue:

Comment only
27 Aug 2015 Josh V

Josh V (view profile)

Can anyone advise about using garchvar.m?

VaR = garchvar(data, model, distr, ar, ma, p, q, max_forecast, alpha)

So I try something like

garchvar(returns, 'GARCH', 'GAUSSIAN', 1, 1, 1, 1, 5, 0.99) and I get the error message

"The constructor for class 'garch' must return only one output value". Can anyone advise?

Comment only
31 May 2015 Frank Chen

25 May 2015 jiang hua

17 Apr 2015 t3925

t3925 (view profile)

17 Apr 2015 t3925

t3925 (view profile)

14 Apr 2014 Abdelrazzaq

I finally found what I want. Honestly, we cannot thank you enough. I just suggest to add:
1-the Range-GARCH (RGARCH) based models that use high, low, open, close and volume time series data.
2-Bench mark-based tests such as Diebold-Mariano.

15 May 2013 Da w

Da w (view profile)

I am using matlab 2013a. It is not working in matlab 2013a. while using function 'garch', it gets 'The constructor for class 'garch' must return only one output value.' Please fix it, Thanks!!

15 May 2013 Da w

Da w (view profile)

07 Dec 2012 Angela

Angela (view profile)

I am trying to use the GJR-GARCH specification with exogenous variables in variance equations. I found in garch.m, line_316, the column sequence of constraints matrix A (first: leverage, then, exogeneous y) is not the same as that of the starting values (0.5 for leverage, then 0 for y) and ublb. I guess they should match? Sorry if I am wrong. Could you please advice. Thanks very much.

31 Aug 2012 paula roma

I am trying to use garchfind to find the best model to my data but when I put arma (1,9) with garch(1,1) the program gives this output:

Error in ==> garchfind at 41
if nargin == 0

??? Output argument "LLF" (and maybe others) not assigned during call to

Error in ==> aEntrada_de_dados_garch at 179
[parameters, stderrors, LLF, ht, resids, summary] = garchfind(ret, models, distributions,
1, 9, 1, 1, options);

Could you help me?

Thank you a lot

Comment only
16 Aug 2012 Amol

Amol (view profile)

I am using Matlab R2010a. How can I install this toolbox? Please help.

16 Jun 2012 Iva Mihaylova

23 Oct 2011 ted p teng

ted p teng (view profile)

In garchsim.m, if distribution is set to 'GED', the 'gevrnd' requires inputting 'k', 'sigma' and 'mu'. Any suggestions on how the parameters could be determined... maybe with 'gevfit'?

Comment only
23 Oct 2011 ted p teng

ted p teng (view profile)

This is a BIG contribution to the FEX community. The examples provided is really helpful! Thank you!

30 Sep 2011 Alexandros Gabrielsen

Thanks for your comments Lurion. Currently, the toolbox estimates only univariate processes.

Comment only
27 Sep 2011 Lurion De Mello

A lot of hard work here!
Does this do multivariate version of the supported models?
Thanks a lot

Comment only
25 Oct 2011 1.1

introduced garchvar and garchvolfor

26 Oct 2011 1.3

more examples in the readme files are added

07 Dec 2011 1.4

1. distributions: Centered-Cauchy, Logistic, Laplace, Rayleigh, Extreme Value Distribution Type 1 & Generalized Exponential
2. Estimation, forecasting & simulation of the GARCH-K model.
3. Updates in the readme files

04 May 2016 1.5

Incorporation of the Leon, Rubio and Serna Autoregressive Conditional Volatility, Skewness and Kurtosis model which account for time varying higher moments

Contact us