Type: | Package |
Title: | Search Best ARIMA, GARCH, and MS-GARCH Model |
Version: | 0.1.0 |
Maintainer: | Rajeev Ranjan Kumar <rrk.uasd@gmail.com> |
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>. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
Imports: | MSGARCH, forecast, rugarch |
Depends: | R (≥ 2.10) |
NeedsCompilation: | no |
Packaged: | 2020-10-20 07:23:43 UTC; Rajeev-PC |
Author: | Rajeev Ranjan Kumar [aut, cre], Girish Kumar Jha [aut, ths, ctb], Dwijesh C. Mishra [ctb], Neeraj Budhlakoti [ctb] |
Repository: | CRAN |
Date/Publication: | 2020-10-28 08:40:05 UTC |
Find the appropriate ARIMA model
Description
Computes the AIC values of all possible ARIMA models for the given value of autoregressive and moving average parameters.
Usage
ARIMAAIC(data, p=3, q=3, d=0, season=list(order=c(0,0,0),period=NA),
in.mean=TRUE)
Arguments
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. |
Details
Lower the AIC value better the model
Value
aic_mat |
AIC values of all possible ARIMA models |
References
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.
Examples
data("ReturnSeries")
ARIMAAIC(ReturnSeries)
Return Series Data
Description
Monthly return series of International Soyabean oil starting from January 1980
Usage
data("ReturnSeries")
Format
A data frame with 86 observations on the following variable.
return
a numeric vector
Details
Dataset contain 86 0bservations of monthly return series of International soyabean price. It is obtained from World Bank "Pink sheet"
Source
https://www.worldbank.org/en/research/commodity-markets
References
https://www.worldbank.org/en/research/commodity-markets
Examples
data(ReturnSeries)
Find the appropriate ARMA-GARCH model
Description
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.
Usage
appgarch(data, methods = c("sGARCH", "gjrGARCH"),
distributions = c("norm", "std", "snorm"), aorder = c(1, 0),
gorder = c(1, 1), algo = "gosolnp", stepahead = 5)
Arguments
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. |
Details
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.
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 |
References
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.
See Also
appmsgarch, ARIMAAIC
Examples
data("ReturnSeries")
appgarch(ReturnSeries)
Find the appropriate MS-GARCH model
Description
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.
Usage
appmsgarch(data, methods = c("sARCH", "sGARCH"),
distributions = c("norm", "std"), stepahead = 5)
Arguments
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. |
Details
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".
Value
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. |
References
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
Examples
data("ReturnSeries")
appmsgarch(ReturnSeries)