| Title: | ARMA-GARCH/APARCH Models with Stable, GEV and GAt Innovations |
|---|---|
| Description: | Simulation, estimation and forecasting of autoregressive moving average (ARMA) models with generalized autoregressive conditional heteroskedasticity (GARCH) or asymmetric power ARCH (APARCH, with ARCH the autoregressive conditional heteroskedasticity model) errors, with stable (S0 parametrization), generalized extreme value (GEV) and generalized asymmetric t (GAt) innovations. The innovation distribution is a pluggable object, so user defined densities get the same fitting, simulation, stationarity and forecasting machinery. |
| Authors: | Thiago do Rego Sousa [aut, cre], Cira Otiniano [ctb], Silvia Lopes [ctb], Diethelm Wuertz [ctb, cph] (filter and model structure adapted from fGarch) |
| Maintainer: | Thiago do Rego Sousa <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.0.0 |
| Built: | 2026-11-03 23:44:47 UTC |
| Source: | https://github.com/cran/GEVStableGarch |
Functions to compute the density, distribution function, quantile function, and to generate random variates for the Generalized Asymmetric t (GAT) distribution.
dgat(x, mean = 0, sd = 1, nu = 2, d = 3, xi = 1, log = FALSE) pgat(q, mean = 0, sd = 1, nu = 2, d = 3, xi = 1) qgat(p, mean = 0, sd = 1, nu = 2, d = 3, xi = 1) rgat(n, mean = 0, sd = 1, nu = 2, d = 3, xi = 1)dgat(x, mean = 0, sd = 1, nu = 2, d = 3, xi = 1, log = FALSE) pgat(q, mean = 0, sd = 1, nu = 2, d = 3, xi = 1) qgat(p, mean = 0, sd = 1, nu = 2, d = 3, xi = 1) rgat(n, mean = 0, sd = 1, nu = 2, d = 3, xi = 1)
x |
Numeric vector of values for calculating density. |
mean |
Location parameter. |
sd |
Scale parameter (must be > 0). |
nu |
Tail (shape) parameter (must be > 0). |
d |
Second shape parameter (must be > 0). |
xi |
Asymmetry parameter (must be > 0; |
log |
Logical; if |
q |
Numeric vector of quantiles. |
p |
Numeric vector of probabilities. |
n |
Number of observations for random generation. |
This distribution corresponds to the t3 distribution described in
Paolella (1997) and Mittnik and Paolella (2000). The GAT family includes
the Student's t, Laplace, Cauchy, and normal distributions as special cases.
In particular, as the distribution approaches normality.
dgat |
density values |
pgat |
distribution function values |
qgat |
quantile function values |
rgat |
random variates |
Thiago do Rego Sousa
Mittnik, S., Paolella, M. S. (2000). Prediction of Financial Downside-Risk with Heavy-Tailed Conditional Distributions.
Paolella, M. (1997). Tail Estimation and Conditional Modeling of Heteroskedastic Time-Series. PhD Thesis, Institute of Statistics and Econometrics, Christian Albrechts University of Kiel.
Bertocchi, M., Giacometti, R., Ortobelli, S., & Rachev, S. T. (2005). The impact of different distributional hypothesis on returns in asset allocation. Finance Letters, 3(1), 17-27.
oldpar <- par(mfrow = c(2, 2)) set.seed(1000) r <- rgat(n = 1000) plot(r, type = "l", main = "GAt Random Values") hist(r, probability = TRUE, border = "white") x <- seq(min(r), max(r), length = 201) lines(x, dgat(x), lwd = 2) plot(sort(r), (1:1000)/1000, main = "Probability", ylab = "Probability") lines(x, pgat(x), lwd = 2) par(oldpar) round(qgat(pgat(q = seq(-10, 10, by = 0.5))), 6)oldpar <- par(mfrow = c(2, 2)) set.seed(1000) r <- rgat(n = 1000) plot(r, type = "l", main = "GAt Random Values") hist(r, probability = TRUE, border = "white") x <- seq(min(r), max(r), length = 201) lines(x, dgat(x), lwd = 2) plot(sort(r), (1:1000)/1000, main = "Probability", ylab = "Probability") lines(x, pgat(x), lwd = 2) par(oldpar) round(qgat(pgat(q = seq(-10, 10, by = 0.5))), 6)
Computes for standardized
innovations , the quantity that enters the APARCH stationarity
condition and the multi step scale forecast. A closed form is used when the
distribution provides one, otherwise numerical integration.
gs_aparch_moment(dist, par, gamma, delta)gs_aparch_moment(dist, par, gamma, delta)
dist |
A |
par |
Distribution parameters, named by |
gamma |
Asymmetry parameter in (-1, 1). |
delta |
Power, positive. |
, or Inf when is not below
dist$max_power(par).
Ding, Z., Granger, C. W. J. and Engle, R. F. (1993). A long memory property of stock market returns and a new model. Journal of Empirical Finance, 1, 83-106.
Mittnik, S., Paolella, M. S. and Rachev, S. T. (2002). Stationarity of stable power-GARCH processes. Journal of Econometrics, 106, 97-107.
gs_aparch_moment(gs_stable(), c(stable_alpha = 1.7, stable_beta = 0), gamma = 0.3, delta = 1)gs_aparch_moment(gs_stable(), c(stable_alpha = 1.7, stable_beta = 0), gamma = 0.3, delta = 1)
Simulates n_boot series of the same length from the fitted model, refits
each one, and summarizes the resulting sampling distribution of the
estimates. This is the recommended alternative to the Hessian standard
errors of gs_fit() when the asymptotic normal approximation is unreliable:
near a boundary (stable tail index near 2, GEV shape near ,
APARCH asymmetry near ) or, for GEV innovations, because the
support depends on the shape parameter and the usual regularity conditions
do not hold (Efron, 1979).
gs_bootstrap(fit, n_boot = 199, level = 0.95, seed = NULL, ...)gs_bootstrap(fit, n_boot = 199, level = 0.95, seed = NULL, ...)
fit |
A |
n_boot |
Number of bootstrap replications. |
level |
Confidence level of the percentile intervals. |
seed |
Optional seed for reproducibility. |
... |
Passed to |
Each replication is refit with hessian = FALSE; replications whose fit
fails are dropped and counted in n_fail.
A list with se (named vector of bootstrap standard errors), ci
(a matrix with lower and upper percentile limits), replicates (the
n_boot by number-of-parameters matrix of estimates, failed fits as NA
rows), n_fail and level.
Efron, B. (1979). Bootstrap methods: another look at the jackknife. The Annals of Statistics, 7(1), 1-26.
spec <- gs_spec(garch = c(1, 1), dist = gs_gev()) model <- gs_model(spec, mu = 0, omega = 0.1, alpha = 0.1, beta = 0.8, dist_par = c(xi = 0.2)) x <- gs_sim(model, n = 800, seed = 1)$y fit <- gs_fit(x, spec) gs_bootstrap(fit, n_boot = 99, seed = 1)spec <- gs_spec(garch = c(1, 1), dist = gs_gev()) model <- gs_model(spec, mu = 0, omega = 0.1, alpha = 0.1, beta = 0.8, dist_par = c(xi = 0.2)) x <- gs_sim(model, n = 800, seed = 1)$y fit <- gs_fit(x, spec) gs_bootstrap(fit, n_boot = 99, seed = 1)
Verifies that the pieces of a gs_dist() object are consistent at a
parameter value: names and bounds, finite and vectorized log density,
density integrating to one, quantile inverting cdf, cdf matching the
density, random matching cdf (Kolmogorov-Smirnov), moment conditions
(max_power above default_delta, mean and aparch_moment against
numerical integration). It stops with an error naming the failing field.
gs_check_dist(dist, par = dist$start, tol = 0.001)gs_check_dist(dist, par = dist$start, tol = 0.001)
dist |
A |
par |
Parameter value where the checks are done (default |
tol |
Tolerance for the numerical comparisons. |
dist, invisibly.
Builds the object that describes the innovation distribution of
the model. The built in families gs_stable(), gs_gev() and gs_gat()
are created with this constructor, and a user defined distribution gets
exactly the same fitting, simulation, stationarity and forecasting
machinery.
gs_dist( name, log_density, random, cdf, quantile, par_names, lower, upper, start, default_delta, max_power, mean, valid = NULL, aparch_moment = NULL, start_fun = NULL, check = TRUE )gs_dist( name, log_density, random, cdf, quantile, par_names, lower, upper, start, default_delta, max_power, mean, valid = NULL, aparch_moment = NULL, start_fun = NULL, check = TRUE )
name |
Character, name of the distribution. |
log_density |
|
random |
|
cdf |
|
quantile |
|
par_names |
Character vector with the parameter names. They must not
clash with model parameter names ( |
lower, upper, start
|
Numeric vectors named by |
default_delta |
Power |
max_power |
|
mean |
|
valid |
Optional |
aparch_moment |
Optional |
start_fun |
Optional |
check |
Logical, run |
All functions work on the standardized innovation (location 0, scale 1).
z is a numeric vector and par a numeric vector named by par_names.
Every field is required except valid, aparch_moment and start_fun,
which have well defined fallbacks. In particular max_power and mean
have no defaults: the user must state when moments exist, so that fitting
never fails silently. Unless check = FALSE, gs_check_dist() runs a
self check at start and stops with an error naming the failing field.
An object of class gs_dist.
gs_check_dist(), gs_stable(), gs_gev(), gs_gat()
# Normal innovations written as a user defined distribution norm <- gs_dist( name = "norm", log_density = function(z, par) dnorm(z, log = TRUE), random = function(n, par) rnorm(n), cdf = function(q, par) pnorm(q), quantile = function(p, par) qnorm(p), par_names = character(0), lower = numeric(0), upper = numeric(0), start = numeric(0), default_delta = 2, max_power = function(par) Inf, mean = function(par) 0) norm# Normal innovations written as a user defined distribution norm <- gs_dist( name = "norm", log_density = function(z, par) dnorm(z, log = TRUE), random = function(n, par) rnorm(n), cdf = function(q, par) pnorm(q), quantile = function(p, par) qnorm(p), par_names = character(0), lower = numeric(0), upper = numeric(0), start = numeric(0), default_delta = 2, max_power = function(par) Inf, mean = function(par) 0) norm
Estimates the model of gs_spec() by conditional maximum likelihood. The
data is rescaled internally to unit standard deviation (as in fGarch) and
the estimates are transformed back. Parameters move in plain intervals;
stationarity is not imposed but reported after fitting (see
gs_stationarity()), with a warning when the persistence is 1 or more.
gs_fit( data, spec, algorithm = c("sqp", "nlminb"), start = NULL, hessian = TRUE, restarts = 0L, control = list() )gs_fit( data, spec, algorithm = c("sqp", "nlminb"), start = NULL, hessian = TRUE, restarts = 0L, control = list() )
data |
Numeric vector, the time series (for example log returns). |
spec |
A |
algorithm |
|
start |
Optional named vector of start values on the original scale,
for example |
hessian |
Logical, compute standard errors. Set |
restarts |
Integer, number of additional optimizer runs from perturbed start values; the fit with the highest log likelihood is kept. A few restarts (for example 3 to 5) make the estimate robust to the local optima of multimodal surfaces, such as ARMA-GARCH models with heavy-tailed innovations, at a proportional increase in time. The default 0 keeps the single run from the data-driven start. |
control |
List passed to the optimizer. |
Standard errors come from a numerical Hessian (central differences
with steps adapted to the curvature). When a parameter sits on a bound, or a
differentiation step leaves the parameter space, the affected standard
errors are NA and a warning explains why.
These Hessian standard errors are asymptotic and rely on the usual
regularity conditions. They become unreliable near a boundary of the
parameter space, even when not exactly on it: the stable tail index
approaching 2 (where the skewness is no longer identified), the GEV shape
approaching , or an APARCH asymmetry approaching .
The GEV support depends on its shape parameter, so for GEV innovations the
usual maximum likelihood confidence intervals are not guaranteed valid;
prefer the parametric bootstrap of gs_bootstrap() there and in the
near-boundary cases above. The fit records convergence diagnostics in
$diagnostics (scaled gradient, Hessian reciprocal condition number and
definiteness, optimizer iterations), which flag these situations.
An object of class gs_fit with methods coef(), vcov(),
logLik(), residuals(), sigma(), fitted(), predict() and
print().
Galanos, A. and Ye, Y. (2025). Rsolnp: General Non-Linear Optimization. R package version 2.0.1. https://CRAN.R-project.org/package=Rsolnp
if (requireNamespace("fGarch", quietly = TRUE)) { data("dem2gbp", package = "fGarch") spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) fit <- gs_fit(dem2gbp[, 1], spec) fit }if (requireNamespace("fGarch", quietly = TRUE)) { data("dem2gbp", package = "fGarch") spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) fit <- gs_fit(dem2gbp[, 1], spec) fit }
Accessors for gs_fit objects. residuals() returns, by type:
"raw" the residuals , "standardized" the innovations
, "pit" their probability integral transform
under the fitted innovation distribution (uniform
under a correct model; the input of copula models and of KS diagnostics).
sigma() returns the conditional scale (not a standard
deviation when the innovation variance is infinite), fitted() the
conditional location .
## S3 method for class 'gs_fit' coef(object, ...) ## S3 method for class 'gs_fit' vcov(object, ...) ## S3 method for class 'gs_fit' logLik(object, ...) ## S3 method for class 'gs_fit' nobs(object, ...) ## S3 method for class 'gs_fit' residuals(object, type = c("raw", "standardized", "pit"), ...) ## S3 method for class 'gs_fit' sigma(object, ...) ## S3 method for class 'gs_fit' fitted(object, ...) ## S3 method for class 'gs_fit' print(x, ...) ## S3 method for class 'gs_fit' summary(object, ...)## S3 method for class 'gs_fit' coef(object, ...) ## S3 method for class 'gs_fit' vcov(object, ...) ## S3 method for class 'gs_fit' logLik(object, ...) ## S3 method for class 'gs_fit' nobs(object, ...) ## S3 method for class 'gs_fit' residuals(object, type = c("raw", "standardized", "pit"), ...) ## S3 method for class 'gs_fit' sigma(object, ...) ## S3 method for class 'gs_fit' fitted(object, ...) ## S3 method for class 'gs_fit' print(x, ...) ## S3 method for class 'gs_fit' summary(object, ...)
object, x
|
A |
... |
Unused. |
type |
Type of residuals. |
coef(): named numeric vector of the estimated parameters.
vcov(): numeric matrix, the estimated covariance matrix of the
parameters (rows and columns in the order of coef()).
logLik(): an object of class "logLik", the maximized log-likelihood,
with attributes df (number of parameters) and nobs.
nobs(): integer, the number of observations used in the fit.
residuals(): numeric vector with one value per observation, as
described by type.
sigma(), fitted(): numeric vectors with one value per observation,
the conditional scale and the conditional location.
print(), summary(): print the coefficient table (estimates, standard
errors, t and p values), information criteria, persistence and
convergence diagnostics, and return x (object) invisibly.
Generalized asymmetric t distribution of Paolella (1997) with location 0,
scale 1 and parameters nu (tail), d (peakedness) and xi (asymmetry,
1 is symmetric), see dgat(). Moments exist for
; the GARCH mode power is .
gs_gat( lower = c(nu = 0.05, d = 0.1, xi = 0.05), upper = c(nu = 100, d = 50, xi = 20), start = c(nu = 2, d = 4, xi = 1) )gs_gat( lower = c(nu = 0.05, d = 0.1, xi = 0.05), upper = c(nu = 100, d = 50, xi = 20), start = c(nu = 2, d = 4, xi = 1) )
lower, upper, start
|
Optional named vectors replacing the default bounds and start value. |
A gs_dist object.
d <- gs_gat() d$max_power(c(nu = 2, d = 4, xi = 1))d <- gs_gat() d$max_power(c(nu = 2, d = 4, xi = 1))
Generalized extreme value distribution with location 0, scale 1 and shape
xi, on
(Gumbel when ). The shape is restricted to (-0.5, 0.5):
above -0.5 for regular likelihood properties, below 0.5 for a finite
variance, which the GARCH mode power requires.
gs_gev(lower = c(xi = -0.49), upper = c(xi = 0.49), start = c(xi = 0.01))gs_gev(lower = c(xi = -0.49), upper = c(xi = 0.49), start = c(xi = 0.01))
lower, upper, start
|
Optional named vectors replacing the default bounds and start value. |
The innovations are not centered: , so
the model parameter mu is a location, not the conditional mean.
A gs_dist object.
d <- gs_gev() d$mean(c(xi = 0.1))d <- gs_gev() d$mean(c(xi = 0.1))
Attaches parameter values to a gs_spec(), checking lengths, admissible
ranges and moment conditions. Parameters can be given one by one or as a
named vector par (for example coef(fit)).
gs_model( spec, mu = NULL, ar = NULL, ma = NULL, omega = NULL, alpha = NULL, gamma = NULL, beta = NULL, delta = NULL, dist_par = NULL, par = NULL )gs_model( spec, mu = NULL, ar = NULL, ma = NULL, omega = NULL, alpha = NULL, gamma = NULL, beta = NULL, delta = NULL, dist_par = NULL, par = NULL )
spec |
A |
mu |
Intercept (only when |
ar, ma
|
AR and MA coefficients, lengths m and n. |
omega |
Positive constant of the scale recursion. |
alpha, beta
|
Nonnegative coefficients, lengths p and q. |
gamma |
Asymmetry coefficients in (-1, 1), length p (APARCH only). |
delta |
Positive power (APARCH only). |
dist_par |
Distribution parameters, named by |
par |
Alternatively, a named vector with all free parameters. |
An object of class gs_model.
spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) gs_model(spec, mu = 0, ar = 0.1, omega = 0.05, alpha = 0.1, beta = 0.85, dist_par = c(stable_alpha = 1.8, stable_beta = 0))spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) gs_model(spec, mu = 0, ar = 0.1, omega = 0.05, alpha = 0.1, beta = 0.85, dist_par = c(stable_alpha = 1.8, stable_beta = 0))
Simulates the model equations of gs_spec() with innovations drawn from
the model's distribution. The recursion starts at the unconditional
location and scale level and the first burnin values are discarded.
gs_sim(model, n = 1000, burnin = 1000, seed = NULL)gs_sim(model, n = 1000, burnin = 1000, seed = NULL)
model |
A |
n |
Length of the returned series. |
burnin |
Number of initial values discarded. |
seed |
Optional seed passed to |
A data frame with columns y (series), sigma (conditional scale)
and z (innovations).
spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) model <- gs_model(spec, mu = 0, ar = 0.1, omega = 0.05, alpha = 0.1, beta = 0.8, dist_par = c(stable_alpha = 1.8, stable_beta = 0)) x <- gs_sim(model, n = 500, seed = 1) plot(x$y, type = "l")spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) model <- gs_model(spec, mu = 0, ar = 0.1, omega = 0.05, alpha = 0.1, beta = 0.8, dist_par = c(stable_alpha = 1.8, stable_beta = 0)) x <- gs_sim(model, n = 500, seed = 1) plot(x$y, type = "l")
The model, in the intercept form of Wuertz et al. (2006) and fGarch, is
with i.i.d. from dist. In GARCH mode (aparch = FALSE) the
asymmetry is 0 and is fixed at
dist$default_delta (1 for stable, 2 otherwise). mu is an intercept:
the unconditional location is . Since the
innovations are location scale (not standardized), is a
conditional scale.
gs_spec( arma = c(0, 0), garch = c(1, 1), aparch = FALSE, include_mean = TRUE, dist = gs_stable() )gs_spec( arma = c(0, 0), garch = c(1, 1), aparch = FALSE, include_mean = TRUE, dist = gs_stable() )
arma |
Integer vector |
garch |
Integer vector |
aparch |
Logical, estimate the asymmetry |
include_mean |
Logical, include the intercept |
dist |
Innovation distribution, a |
An object of class gs_spec.
Wuertz, D., Chalabi, Y. and Luksan, L. (2006). Parameter estimation of ARMA models with GARCH/APARCH errors: an R and SPlus software implementation. Journal of Statistical Software.
gs_spec(arma = c(1, 0), garch = c(1, 1), aparch = TRUE, dist = gs_stable())gs_spec(arma = c(1, 0), garch = c(1, 1), aparch = TRUE, dist = gs_stable())
Standardized stable distribution in
Nolan's S0 parametrization, computed with libstable4u. Parameters:
stable_alpha (tail index, in (1, 2)) and stable_beta (skewness, in
(-1, 1)).
gs_stable( lower = c(stable_alpha = 1.01, stable_beta = -0.99), upper = c(stable_alpha = 1.99, stable_beta = 0.99), start = c(stable_alpha = 1.8, stable_beta = 0) )gs_stable( lower = c(stable_alpha = 1.01, stable_beta = -0.99), upper = c(stable_alpha = 1.99, stable_beta = 0.99), start = c(stable_alpha = 1.8, stable_beta = 0) )
lower, upper, start
|
Optional named vectors replacing the default bounds and start value. |
The variance is infinite, so is a conditional scale, not a
standard deviation. In GARCH mode the power is (absolute
value GARCH), since is finite only for
. The mean is .
A gs_dist object.
Nolan, J. P. (2020). Univariate Stable Distributions. Springer.
Royuela-del-Val, J., Simmross-Wattenberg, F. and Alberola-Lopez, C. (2017). libstable: Fast, Parallel, and High-Precision Computation of alpha-Stable Distributions in R, C/C++, and MATLAB. Journal of Statistical Software, 78(1), 1-25.
d <- gs_stable() d$log_density(c(-1, 0, 1), c(stable_alpha = 1.7, stable_beta = 0.2))d <- gs_stable() d$log_density(c(-1, 0, 1), c(stable_alpha = 1.7, stable_beta = 0.2))
Computes , with
from gs_aparch_moment(). A
value below 1 means is finite (Ding, Granger and
Engle, 1993; Mittnik, Paolella and Rachev, 2002). It is Inf when
is not below the moment bound of the innovations.
gs_stationarity(object)gs_stationarity(object)
object |
A |
The persistence, a single number.
spec <- gs_spec(garch = c(1, 1), dist = gs_stable()) m <- gs_model(spec, mu = 0, omega = 0.05, alpha = 0.1, beta = 0.8, dist_par = c(stable_alpha = 1.8, stable_beta = 0)) gs_stationarity(m)spec <- gs_spec(garch = c(1, 1), dist = gs_stable()) m <- gs_model(spec, mu = 0, omega = 0.05, alpha = 0.1, beta = 0.8, dist_par = c(stable_alpha = 1.8, stable_beta = 0)) gs_stationarity(m)
Forecasts from a fitted model (predict.gs_fit) or from a model with
given parameters and a data history (predict.gs_model, useful in rolling
windows with fixed parameters).
## S3 method for class 'gs_fit' predict( object, n_ahead = 1, level = c(0.01, 0.05), n_sim = 10000, seed = NULL, ... ) ## S3 method for class 'gs_model' predict( object, data, n_ahead = 1, level = c(0.01, 0.05), n_sim = 10000, seed = NULL, ... )## S3 method for class 'gs_fit' predict( object, n_ahead = 1, level = c(0.01, 0.05), n_sim = 10000, seed = NULL, ... ) ## S3 method for class 'gs_model' predict( object, data, n_ahead = 1, level = c(0.01, 0.05), n_sim = 10000, seed = NULL, ... )
object |
A |
n_ahead |
Forecast horizon. |
level |
Probabilities of the reported quantiles. |
n_sim |
Number of simulated paths used when |
seed |
Optional seed for the simulated paths. |
... |
Unused. |
data |
For |
One step ahead everything is exact: the conditional location
, the
conditional scale , and the quantiles
(the value at risk at level p is
minus the p quantile). For horizons :
sigma is from the APARCH
recursion with (as in fGarch);
quantiles come from n_sim simulated paths, since the predictive
distribution is a scale mixture and has no closed form;
mean is exact when or , otherwise it is
the average of the simulated paths (column mean_method).
With stable innovations there is no forecast variance; sigma is a scale.
mean is NA when the innovations have no mean.
A data frame with columns horizon, location (one step only),
mean, mean_method, sigma and one column per level named q_<level>.
spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) model <- gs_model(spec, mu = 0, ar = 0.1, omega = 0.05, alpha = 0.1, beta = 0.8, dist_par = c(stable_alpha = 1.8, stable_beta = 0)) x <- gs_sim(model, n = 500, seed = 1)$y predict(model, data = x, n_ahead = 5, n_sim = 2000, seed = 1)spec <- gs_spec(arma = c(1, 0), garch = c(1, 1), dist = gs_stable()) model <- gs_model(spec, mu = 0, ar = 0.1, omega = 0.05, alpha = 0.1, beta = 0.8, dist_par = c(stable_alpha = 1.8, stable_beta = 0)) x <- gs_sim(model, n = 500, seed = 1)$y predict(model, data = x, n_ahead = 5, n_sim = 2000, seed = 1)