soi_avg_exact: Exact Calculation of Average, Minimal, and Maximal Spillover...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SOI_avg_exact.r

Description

Calculates the Average, Minimal, and Maximal Spillover Index exactly.

Usage

1
soi_avg_exact(Sigma, A, ncores = 1)

Arguments

Sigma

Either a covariance matrix or a list thereof.

A

Either a 3-dimensional array with A[,,h] being MA coefficient matrices of the same dimension as Sigma or a list thereof.

ncores

Number of cores. Missing ncores or ncores=1 means no parallelization (just one core is used). ncores=0 means automatic detection of the number of available cores. Any other integer determines the maximal number of cores to be used.

Details

The spillover index introduced by Diebold and Yilmaz (2009) (see References) depends on the ordering of the model variables. While soi_avg_est provides an algorithm to estimate average, minimum, and maximum of the spillover index over all permutations, soi_avg_est calculates these quantities exactly. Notice, however, that for large dimensions N, this might be quite time- as well as memory-consuming. If only the exact average of the spillover index is wanted, soi_from_sot(sot_avg_exact(Sigma,A,ncores)$Average) should be used.

The typical application of the 'list' version of soi_avg_exact is a rolling windows approach when Sigma and A are lists representing the corresponding quantities at different points in time (rolling windows).

Value

The 'single' version returns a list containing the exact average, minimal, and maximal spillover index as well as permutations that generated the minimal and maximal value. The 'list' version returns a list consisting of three vectors (the average, minimal, and maximal spillover index values) and two matrices (the columns of which are the permutations generating the minima and maxima).

Author(s)

Stefan Kloessner (S.Kloessner@mx.uni-saarland.de),
with contributions by Sven Wagner (sven.wagner@mx.uni-saarland.de)

References

[1] Diebold, F. X. and Yilmaz, K. (2009): Measuring financial asset return and volatitliy spillovers, with application to global equity markets, Economic Journal 199(534): 158-171.

[2] Kloessner, S. and Wagner, S. (2012): Exploring All VAR Orderings for Calculating Spillovers? Yes, We Can! - A Note on Diebold and Yilmaz (2009), Journal of Applied Econometrics 29(1): 172-179

See Also

fastSOM-package, soi_avg_est

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# generate randomly positive definite matrix Sigma of dimension N 
N <- 10
Sigma <- crossprod(matrix(rnorm(N*N),nrow=N)) 
# generate randomly coefficient matrices
H <- 10 
A <- array(rnorm(N*N*H),dim=c(N,N,H)) 
# calculate the exact average, minimal, 
# and maximal spillover index and determine the corresponding ordering 
# of the model variables
soi_avg_exact(Sigma, A) 

Example output

$Average
[1] 90.28282

$Min
[1] 85.71269

$Max
[1] 94.6165

$permMin
 [1] 10  1  7  9  8  5  3  2  6  4

$permMax
 [1]  3  2  5  1  9  6  8 10  4  7

fastSOM documentation built on Nov. 19, 2019, 5:08 p.m.