sot: Calculation of Spillover Tables

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

View source: R/SOT.r

Description

This function calculates an N x N-dimensional spillover table.

Usage

1
sot(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, only relevant if Sigma is a list of matrices. 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.

...

Further arguments, especially perm which is used to reorder variables. If perm is missing, then the original ordering of the model variables will be used. If perm is a permutation of 1:N, then the spillover index for the model with variables reordered according to perm will be calculated.

Details

The (i,j)-entry of a spillover table represents the relative contribution of shocks in variable j (the column variable) to the forecasting error variance of variable i (the row variable). Hence, off-diagonal values are interpreted as spillovers, while the own variance shares appear on the diagonal. An overall spillover measure is given by soi.

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

Value

Matrix, or a list thereof, of dimensions N x N with non-negative entries summing up to 100 for each row.

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

Examples

1
2
3
4
5
6
7
8
# 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 spillover table
sot(Sigma,A) 

Example output

           [,1]      [,2]      [,3]      [,4]     [,5]      [,6]     [,7]
 [1,] 18.915409 14.184858 29.258080  8.258164 16.57829 0.6661211 1.755242
 [2,]  8.897847 27.294585 14.823875 12.343218 19.91803 1.7969673 3.793685
 [3,] 16.295001  6.887772 12.891883 26.264061 19.88341 3.7771772 4.413958
 [4,]  9.373237 17.860568  6.185859 21.348165 18.45220 2.5383888 4.544329
 [5,] 11.546376 15.258103 12.230321 18.042556 18.57567 6.0355437 3.804944
 [6,] 25.759894 20.302076 15.365797  7.696433 18.23100 2.4550278 3.866994
 [7,] 15.672801 14.510699 12.455939 13.134457 12.41851 7.1296521 8.283437
 [8,] 20.343156 14.253634 19.241102  5.024431 26.79897 4.1073422 1.838905
 [9,] 12.529240 17.672566 12.023970 16.703313 11.66731 4.4407025 9.426009
[10,] 16.056556 25.298747 11.650923 10.342496 14.45280 3.9918513 3.444975
           [,8]     [,9]     [,10]
 [1,]  6.253558 3.542602 0.5876784
 [2,]  7.870390 2.435124 0.8262785
 [3,]  6.095698 2.597658 0.8933871
 [4,] 10.941404 8.163717 0.5921358
 [5,]  7.114272 6.548045 0.8441689
 [6,]  4.033011 1.620872 0.6688987
 [7,]  8.973458 6.800364 0.6206869
 [8,]  6.611847 1.471714 0.3088956
 [9,]  9.993926 5.130686 0.4122762
[10,]  9.020641 5.152109 0.5889024

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