Title: | Search Best ARIMA, GARCH, and MS-GARCH Model |
---|---|
Description: | Get the most appropriate autoregressive integrated moving average, generalized auto-regressive conditional heteroscedasticity and Markov switching GARCH model. For method details see Haas M, Mittnik S, Paolella MS (2004). <doi:10.1093/jjfinec/nbh020>, Bollerslev T (1986). <doi:10.1016/0304-4076(86)90063-1>. |
Authors: | Rajeev Ranjan Kumar [aut, cre], Girish Kumar Jha [aut, ths, ctb], Dwijesh C. Mishra [ctb], Neeraj Budhlakoti [ctb] |
Maintainer: | Rajeev Ranjan Kumar <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-21 04:15:20 UTC |
Source: | https://github.com/cran/SBAGM |
The appgarch function computes RMSE and MAE of the all possible combinations of GARCH type model and distribution, and forecast value. Based on the lowest RMSE and MAE, we can find the best model and distribution combinations of the particular data.
appgarch(data, methods = c("sGARCH", "gjrGARCH"), distributions = c("norm", "std", "snorm"), aorder = c(1, 0), gorder = c(1, 1), algo = "gosolnp", stepahead = 5)
appgarch(data, methods = c("sGARCH", "gjrGARCH"), distributions = c("norm", "std", "snorm"), aorder = c(1, 0), gorder = c(1, 1), algo = "gosolnp", stepahead = 5)
data |
Univariate time series data |
methods |
Volatility models. Valid models are “sGARCH”, “eGARCH”, “gjrGARCH and “csGARCH”. Default: methods= c("sGARCH", "gjrGARCH"). |
distributions |
The conditional density to use for the innovations. Valid choices are “norm” for the normal distibution, “snorm” for the skew-normal distribution, “std” for the student-t, “sstd” for the skew-student, “ged” for the generalized error distribution, “sged” for the skew-generalized error distribution, “nig” for the normal inverse gaussian distribution, “ghyp” for the Generalized Hyperbolic, and “jsu” for Johnson's SU distribution. Default: distributions= c("norm", "std", "snorm"). |
aorder |
ARMA order. Default: aorder=c(1, 0) |
gorder |
GARCH order. Default: gorder=c(1, 1) |
algo |
Solver. One of either “nlminb”, “solnp”, “lbfgs”, “gosolnp”, “nloptr” or “hybrid”. Default: algo = "gosolnp". (see documentation in the rugarch-package for details) |
stepahead |
The forecast horizon. |
It allows for a wide choice in univariate GARCH models, distributions, and mean equation modelling. If the user provides the model combinations like methods= c("sGARCH", “eGARCH", gjrGARCH") and distributions combination like distributions= c("norm", "std", "snorm") along with the other parameters, then get the RMSE and MAE value for all possible combinations of methods and distributions, which helps to find the best GARCH type model based on the lowest RMSE and MAE value.
rmse_mean |
Root Mean Square Error (RMSE) value of the mean forecast for all combinations |
mae_mean |
Mean Absolute Error (MAE) value of the mean forecast for all combinations |
forecast_mean |
Mean forecast for all combinations |
forecast_sigma |
Sigma value for all combinations |
Bollerslev, T. (1986). Generalized autoregressive conditional heteroscedasticity. Journal of Econometrics, 31, 307-327.
Engle, R. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation, Econometrica, 50, 987-1008.
appmsgarch, ARIMAAIC
data("ReturnSeries") appgarch(ReturnSeries)
data("ReturnSeries") appgarch(ReturnSeries)
The appmsgarch function computes the root mean square error (RMSE) and mean absolute error (MAE) of the different possible combinations of methods and distributions of the MS-GARCH model.
appmsgarch(data, methods = c("sARCH", "sGARCH"), distributions = c("norm", "std"), stepahead = 5)
appmsgarch(data, methods = c("sARCH", "sGARCH"), distributions = c("norm", "std"), stepahead = 5)
data |
Input time series (ts) or numerical univariate series. |
methods |
Combination of volatility models in two different regimes. Valid models are "sARCH", "sGARCH", "eGARCH", "gjrGARCH", and "tGARCH". Default: methods=c("sARCH", "sGARCH"). |
distributions |
List with element distribution. distribution is a character vector (of size 2) of conditional distributions. Valid distributions are "norm", "snorm", "std", "sstd", "ged", and "sged". Default: distribution = c("norm", "std"). |
stepahead |
The forecast horizon. |
Here Markov-Switching specification of the MS-GARCH model is based on the Haas et al. (2004a). For the methods, "sARCH" is the ARCH(1) model, "sGARCH" the GARCH(1,1) model, "eGARCH" the EGARCH(1,1) model, "gjrGARCH" the GJR(1,1) model (Glosten et al., 1993), and "tGARCH" the TGARCH(1,1) model (Zakoian, 1994).For the distributions, "norm" is the Normal distribution, "std" the Student-t distribution, and "ged" the GED distribution. Their skewed version, implemented via the Fernandez and & Steel (1998) transformation, are "snorm", "sstd" and "sged".
forecast_msgarch |
Forecasted value of all possible combinations of methods and combinations. |
rmse_mat |
Root mean square error (RMSE) value of all possible combinations of methods and combinations. |
mae_mat |
Mean absolute error (MAE) value of all possible combinations of methods and combinations. |
Ardia, D. Bluteau, K. Boudt, K. Catania, L. Trottier, D.-A. (2019). Markov-switching GARCH models in R: The MSGARCH package. Journal of Statistical Software, 91(4), 1-38. http://doi.org/10.18637/jss.v091.i04
Glosten, L. R. Jagannathan, R. & Runkle, D. E. (1993). On the relation between the expected value and the volatility of the nominal excess return on stocks. Journal of Finance, 48, 1779-1801. http://doi.org/10.1111/j.1540-6261.1993.tb05128.x
Fernandez, C. & Steel, M. F. (1998). On Bayesian modeling of fat tails and skewness. Journal of the American Statistical Association, 93, 359-371. http://doi.org/10.1080/01621459.1998.10474117
Haas, M. Mittnik, S. & Paolella, MS. (2004a). A new approach to Markov-switching GARCH models. Journal of Financial Econometrics, 2, 493-530. http://doi.org/10.1093/jjfinec/nbh020
data("ReturnSeries") appmsgarch(ReturnSeries)
data("ReturnSeries") appmsgarch(ReturnSeries)
Computes the AIC values of all possible ARIMA models for the given value of autoregressive and moving average parameters.
ARIMAAIC(data, p=3, q=3, d=0, season=list(order=c(0,0,0),period=NA), in.mean=TRUE)
ARIMAAIC(data, p=3, q=3, d=0, season=list(order=c(0,0,0),period=NA), in.mean=TRUE)
data |
Univariate time series data |
p |
Non-seasonal autoregressive order |
q |
Non-seasonal moving average order |
d |
Degree of differencing |
season |
A specification of the seasonal part of the ARIMA model, plus the period. This should be a list with components order and period. |
in.mean |
Should the ARMA model include a mean/intercept term? The default is TRUE for undifferenced series, and it is ignored for ARIMA models with differencing. |
Lower the AIC value better the model
aic_mat |
AIC values of all possible ARIMA models |
Box, G. and Jenkins, G. (1970). Time Series Analysis: Forecasting and Control. Holden-Day, San Francisco.
Brockwell, P. J. and Davis, R. A. (1996). Introduction to Time Series and Forecasting. Springer, New York. Sections 3.3 and 8.3.
data("ReturnSeries") ARIMAAIC(ReturnSeries)
data("ReturnSeries") ARIMAAIC(ReturnSeries)
Monthly return series of International Soyabean oil starting from January 1980
data("ReturnSeries")
data("ReturnSeries")
A data frame with 86 observations on the following variable.
return
a numeric vector
Dataset contain 86 0bservations of monthly return series of International soyabean price. It is obtained from World Bank "Pink sheet"
https://www.worldbank.org/en/research/commodity-markets
https://www.worldbank.org/en/research/commodity-markets
data(ReturnSeries)
data(ReturnSeries)