roll.spillover: Dynamic Spillover Index

roll.spilloverR Documentation

Dynamic Spillover Index

Description

Estimates the dynamic spillover index given a rolling window as described in Diebold and Yilmaz (2012). We recommend switching to dynamic.spillover.

Usage

roll.spillover(
  data,
  width,
  n.ahead = 10,
  index = c("orthogonalized", "generalized"),
  ortho.type = c("single", "partial", "total"),
  ...
)

Arguments

data

Object of class ‘zoo’.

width

An integer specifying the window width which is aligned to the original sample.

n.ahead

An integer indicating the how many steps ahead the spillover should be forecasted.

index

A character string indicating whether the orthogonalized or the generalized index is computed.

ortho.type

Applicable only if index="orthogonalized". A character string indicating the type of orthogonalized index is required. "single" takes the original ordering of variables in VAR model and applies Cholesky decomposition for the fevd. Whereas "partial" takes a random sample out of all the possible combinations generated for the Cholesky decomposition, while "total" uses all the combinations, therefore it takes more time to finish. Both, "partial" and "total" provide average results.

...

Further arguments to be passed to VAR function from vars package.

Value

A zoo object holding all the indeces.

Author(s)

Jilber Urbina

References

Diebold, F. X. & Yilmaz, K.(2012). Better to Give than to Receive: Predictive Directional Measurement of Volatility Spillovers. International Journal of Forecasting.

Examples

 
data(dy2012)
O_index <- roll.spillover(as.zoo(dy2012[1:300,c(2,3,4)]), width = 200, p=4)
# Orthogonalized rolling spillover index based on a VAR(4), single order
 O_index <- roll.spillover(as.zoo(dy2012[,-1]), width = 200, p=4)
# Generalized rolling spillover index based on a VAR(4)
 G_index<- roll.spillover(as.zoo(dy2012[,-1]), width = 200, index="generalized", p=4) 
# A comparison: (warning: It can take several minutes.)
 single <- roll.spillover(as.zoo(dy2012[1:1200,2:4]), width = 200, p=4)
 partial <- roll.spillover(as.zoo(dy2012[1:1200,2:4]), width = 200, p=4, ortho.type = "partial")
 total <- roll.spillover(as.zoo(dy2012[1:1200,2:4]), width = 200, p=4, ortho.type = "total")
 out <- cbind(single, partial, total)
 head(out)
 plot(out, col=1:3, main="Spillover index")


Spillover documentation built on June 22, 2024, 12:25 p.m.