| roll.spillover | R Documentation | 
Estimates the dynamic spillover index given a rolling window as described in Diebold and Yilmaz (2012). We recommend switching to dynamic.spillover.
roll.spillover(
  data,
  width,
  n.ahead = 10,
  index = c("orthogonalized", "generalized"),
  ortho.type = c("single", "partial", "total"),
  ...
)
| data | Object of class ‘ | 
| 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  | 
| ... | Further arguments to be passed to  | 
A zoo object holding all the indeces.
Jilber Urbina
Diebold, F. X. & Yilmaz, K.(2012). Better to Give than to Receive: Predictive Directional Measurement of Volatility Spillovers. International Journal of Forecasting.
 
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.