Learn R Programming

ExtremeRisks (version 0.0.4-1)

rtimeseries: Simulation of One-Dimensional Temporally Dependent Observations

Description

Simulates samples from parametric families of time series models.

Usage

rtimeseries(ndata, dist="studentT", type="AR", par, burnin=1e+03)

Value

A vector of \((1 \times n)\) observations simulated from a specified time series model.

Arguments

ndata

A positive interger specifying the number of observations to simulate.

dist

A string specifying the parametric family of the innovations distribution. By default dist="studentT" specifies a Student-t family of distributions. See Details.

type

A string specifying the type of time series. By default type="AR" specifies a linear Auto-Regressive time series. See Details.

par

A vector of \((1 \times p)\) parameters to be specified for the univariate time series parametric family. See Details.

burnin

A positive interger specifying the number of initial observations to discard from the simulated sample.

Details

For a time series class (type) with a parametric family (dist) for the innovations, a sample of size ndata is simulated. See for example Brockwell and Davis (2016).

  • The available categories of time series models are: Auto-Regressive (type="AR"), Auto-Regressive and Moving-Average (type="ARMA"), Generalized-Autoregressive-Conditional-Heteroskedasticity (type="GARCH") and Auto-Regressive and Moving-Maxima (type="ARMAX").

  • With AR(1) and ARMA(1,1) times series the available families of distributions for the innovations are:

    • Student-t (dist="studentT") with parameters: \(\phi\in(-1,1)\) (autoregressive coefficient), \(\nu>0\) (degrees of freedom) specified by par=c(corr, df);

    • symmetric Frechet (dist="double-Frechet") with parameters \(\phi\in(-1,1)\) (autoregressive coefficient), \(\sigma>0\) (scale), \(\alpha>0\) (shape), \(\theta\) (movingaverage coefficient), specified by par=c(corr, scale, shape, smooth);

    • symmetric Pareto (dist="double-Pareto") with parameters \(\phi\in(-1,1)\) (autoregressive coefficient), \(\sigma>0\) (scale), \(\alpha>0\) (shape), \(\theta\) (movingaverage coefficient), specified by par=c(corr, scale, shape, smooth).

    With ARCH(1)/GARCH(1,1) time series the Gaussian family of distributions is available for the innovations (dist="Gaussian") with parameters, \(\alpha_0\), \(\alpha_1\), \(\beta\) specified by par=c(alpha0, alpha1, beta). Finally, with ARMAX(1) times series the Frechet families of distributions is available for the innovations (dist="Frechet") with parameters, \(\phi\in(-1,1)\) (autoregressive coefficient), \(\sigma>0\) (scale), \(\alpha>0\) (shape) specified by par=c(corr, scale, shape).

References

Brockwell, Peter J., and Richard A. Davis. (2016). Introduction to time series and forecasting. Springer.

Anthony C. Davison, Simone A. Padoan and Gilles Stupfler (2023). Tail Risk Inference via Expectiles in Heavy-Tailed Time Series, Journal of Business & Economic Statistics, 41(3) 876-889.

See Also

expectiles

Examples

Run this code
# Data simulation from a 1-dimensional AR(1) with univariate Student-t
# distributed innovations

tsDist <- "studentT"
tsType <- "AR"

# parameter setting
corr <- 0.8
df <- 3
par <- c(corr, df)

# sample size
ndata <- 2500

# Simulates a sample from an AR(1) model with Student-t innovations
data <- rtimeseries(ndata, tsDist, tsType, par)

# Graphic representation
plot(data, type="l")
acf(data)

Run the code above in your browser using DataLab