tvGarchKalmanFit {tvGarchKF}R Documentation

Fit the time-varying (Tv) parameters of the GARCH model (tv-Garch) by using the Kalman Filter method. The tv-parameters are determined by deterministic functions of either linear or non-linear type.

Description

The tv-Garch(1,1) model, the parameters vary slowly over time according to linear or non-linear functions. These parameters are denoted by c(t), \alpha(t) and \beta(t) which correspond to the model \sigma_t = c(t) +\alpha(t) r^2_{t-1} +\beta(t)\sigma_{t-1}.

Usage

tvGarchKalmanFit(
  series,
  c,
  alpha,
  beta,
  type = c("polynomial", "NoLineal", "trigonometric"),
  exponentes,
  trig,
  arg,
  predict = 0,
  trace.log = FALSE
)

Arguments

series

Time series.

c

Vector containing coefficents of c.

alpha

Vector containing coefficents of alpha.

beta

Vector containing coefficents of beta.

type

Vector of function type for c, alpha and beta.

exponentes

Vector for exponenets in NoLineal.

trig

Type of trigonometric function.

arg

Value of argument for the trigonometric function.

predict

Value for time to generate predict.

trace.log

Variable to print names of coefficients.

Details

The types of functions for the tv-parameters are: linear, non-linear, trigonometric, and exponential. For the case of the linear model, the tv-parameters follow the following structure:

c(t) = c_0 + c_1u + c_2 u^2 + \ldots + c_p u^p,

\alpha(t) = a_0 + a_1u + a_2 u^2 + \ldots + a_p u^p,

\beta(t) = b_0 + b_1u + b_2 u^2 + \ldots + b_p u^p,

where u=t/T, with t=1, 2, \ldots, T. For the non-linear case, it is as follows:

c(t) = c_0 + \sum_{j=1}^k c_j u_{c,j},

\alpha(t) = a_0 + \sum_{j=1}^k a_j u_{\alpha,j},

\beta(t) = b_0 + \sum_{j=1}^k b_j u_{\beta,j},

where k it is positive value and u_{c,j}, u_{\alpha,j} and u_{\beta,j} are non linear function set. For the trigonometric case, it is as follows:

c(t) = c_0 + c_1 g(u),

\alpha(t) = a_0 + a_1 g(u),

\beta(t) = b_0 + b_1 g(u),

where g(u) it is a trigonometric function, cos or sin.

Value

Return fit values of omega, alpha and beta

Examples

ipsa<-diff(log(indipsa))
c <- c(0.05,0.05)
alpha <- c(0.05,0.05)
beta <- c(0.05,0.05)
type_fit <- c("trigonometric","trigonometric","trigonometric")
fit<-tvGarchKalmanFit(ipsa,c=c,alpha=alpha,beta=beta,type=type_fit,trig="cos",arg="3*(1-log(u))")

[Package tvGarchKF version 0.0.1 Index]