ArmaToGarch: ArmaToGarch

Description Usage Arguments Value Examples

Description

This function takes an arima model, checks for arch effect, and fits a garch model if arch effects are present

Usage

1
ArmaToGarch(arimamodel, max_arch_terms = 15)

Arguments

arimamodel

The arima model to check for arch effects

max_arch_terms

Maximum number of ARCH terms. A higher value will allow for more accuracy, but slower operation

Value

A garch model fitted on the residuals of the input arima model

Examples

1
2
3
4
5
6
7
series1 <- c(1, 3, 2, 3, 4, 3, 4, 5, 6, 4, 5, 6, 5, 4, 7, 5, 4, 7, 8, 5, 7, 8, 9, 7, 9)
arimamodel <- forecast::auto.arima(series1)
ArmaToGarch(arimamodel)

series2 <- c(1, 3, 4, 1, 4, 1, 2, 5, 1, 4, 5, 8, 1, 4, 7, 5, 1, 7, 8, 5, 1, 8, 9, 7, 1)
arimamodel <- forecast::auto.arima(series2)
ArmaToGarch(arimamodel)

grieman/grieman documentation built on May 17, 2019, 8:36 a.m.