File Exchange

image thumbnail

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

version 1.5.0.0 (545 KB) by Alexandros Gabrielsen
ARMAX-GARCH-K-SK Toolbox

26 Downloads

Updated 04 May 2016

View License

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.

Notes:
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:
http://www.mathworks.com/matlabcentral/fileexchange/29051-distributions
http://www.mathworks.com/matlabcentral/fileexchange/33414-volatility-loss-functions-and-var-conditional-indepedence-and-regulatory-backtests

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.

Comments and Ratings (32)

Hi, i want to issue forecast through rolling window with estimated model arma(1,1)-GARCH(1,1) combined model. So, tell me how we can define 'model' input function.

Sam Pybis

For the examples provided, is it possible to add in lagged X terms, in the example with the FTSE 100, BARC and BP, would it be possible to input lagged BARC and BP prices?

ding wei

Yongjie Li

I try to download but I can't. It opens another window but in white and nothing happen.

Benaissa

Great ! Thank you.

Just one doubt.
robust standard errors (robustSE in garch.m) are computed because the Hessian output of fmincon is inaccurate?
Or these robust standard errors are those robust to heterocedascity and autocorrelation ?
Thanks

ziwei Zhang

Great work!

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.

Thanks

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

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] =
garch(data(:,1),'GARCH','GAUSSIAN',0,0,data(:,2:3),0,0,0,[],options);

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

Da

Thanks for sharing!

Solution for the naming conflict issue:
http://www.mathworks.com/matlabcentral/answers/237078

Josh V

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?

Frank Chen

jiang hua

t3925

t3925

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.

Da w

Da w

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!!

Angela

Hello,
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.

paula roma

Hello,
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

Amol

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

pangyuteng

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'?

pangyuteng

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

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

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

Updates

1.5.0.0

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

1.4.0.0

additions:
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

1.3.0.0

more examples in the readme files are added

1.1.0.0

introduced garchvar and garchvolfor

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

ARMAX_GARCH_K_SK_Toolbox/