sot_avg_est: Estimation of the Average, Minimal, and Maximal Entries of a...

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

View source: R/SOT_avg_est.r

Description

Calculates estimates of the average, minimal, and maximal entries of a spillover.

Usage

1
sot_avg_est(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.

...

Further arguments, especially perms which is used to reorder variables. If perms is missing, then 10.000 randomly created permutations of 1:N will be used as reorderings of the model variables. If perms is defined, it has to be either a matrix with each column being a permutation of 1:N, or, alternatively, an integer value defining the number of randomly created permutations.

Details

The spillover tables introduced by Diebold and Yilmaz (2009) (see References) depend on the ordering of the model variables. While sot_avg_exact provides a fast algorithm for exact calculation of average, minimum, and maximum of the spillover table over all permutations, there might be reasons to prefer to estimate these quantities using a limited number of permutations (mainly to save time when N is large). This is exactly what sot_avg_est does.

The typical application of the 'list' version of sot_avg_est 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 values for the spillover table. The 'list' version returns a list with three elements (Average, Minimum, Maximum) which themselves are lists of the corresponding tables.

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, sot_avg_exact

Examples

1
2
3
4
5
6
7
8
9
# 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 estimates of the average, minimal, 
# and maximal entries within a spillover table
sot_avg_est(Sigma, A) 

Example output

$Average
           [,1]      [,2]      [,3]      [,4]      [,5]     [,6]      [,7]
 [1,]  7.131997  8.897803 17.245368 10.397286 10.991637 5.843408 10.843590
 [2,]  8.038402 11.500587 19.541735 10.237624  9.798683 5.059133  6.582334
 [3,] 10.072653  6.955790 10.598900  8.275744 12.943754 8.533310  8.697913
 [4,]  8.003082  8.850227 12.810166 14.357366  7.014036 5.956343  5.347114
 [5,]  9.631501 11.191684 15.216506 16.205363  7.551046 5.895983  7.144176
 [6,]  7.207944  6.174229  7.566137 13.371050  6.983226 7.627972  8.736131
 [7,]  7.029431  9.302315 14.486940 16.099417  7.838716 6.049322 10.893869
 [8,]  5.918039  5.308164 14.166931 16.184790 13.232499 9.287747  7.657417
 [9,]  5.790895  7.271241  7.473196 15.811504  8.788704 7.101323  8.837881
[10,]  8.570422  7.244235 11.115416 12.885737  5.590094 4.664744 17.287179
           [,8]      [,9]     [,10]
 [1,]  8.299696  6.834690 13.514526
 [2,] 12.156352  5.812677 11.272472
 [3,] 13.075017  5.204096 15.642822
 [4,] 15.141027  9.361280 13.159358
 [5,]  9.442907  4.425776 13.295058
 [6,] 16.892506 13.377070 12.063736
 [7,]  9.686675  6.689223 11.924091
 [8,] 15.951135  7.258661  5.034617
 [9,] 16.544784  5.357407 17.023065
[10,]  6.909184 10.488408 15.244582

$Minimum
           [,1]      [,2]     [,3]      [,4]       [,5]       [,6]      [,7]
 [1,] 0.4673304 0.4151205 5.410451 2.0830415 0.16524263 0.11319808 0.5189424
 [2,] 0.3592046 0.9911296 9.598143 1.3789064 0.24796586 0.09911266 0.3271984
 [3,] 0.3852540 0.4955812 2.646801 0.9638923 0.22340811 0.19584446 0.2660236
 [4,] 0.5307983 0.2705718 5.945582 2.0706377 0.21269170 0.25144132 0.3075747
 [5,] 0.6781613 1.9627259 6.833386 3.7594013 0.32330013 0.20240132 0.5018526
 [6,] 0.4946423 0.3260234 3.135094 1.4442521 0.20645680 0.15617738 0.3423146
 [7,] 0.4018546 0.4620068 4.246922 2.9593389 0.08915397 0.15255695 0.5435998
 [8,] 0.3380741 0.3380228 3.530194 1.6824511 0.23059693 0.24026242 0.2960987
 [9,] 0.3235174 0.2422826 2.757036 1.9638615 0.23221277 0.24699103 0.2398075
[10,] 0.3967203 0.3837236 3.379292 1.9967195 0.18766869 0.10032525 0.7198117
           [,8]       [,9]     [,10]
 [1,] 0.1584963 0.51364327 0.5107980
 [2,] 0.1415514 0.26369650 0.1704962
 [3,] 0.1033629 0.08507321 0.3180113
 [4,] 0.1643471 0.69397807 0.3991289
 [5,] 0.1496938 0.85237172 0.4168935
 [6,] 0.1146758 1.02570380 0.3767656
 [7,] 0.1219063 0.39636624 0.1560601
 [8,] 0.2488951 0.53758330 0.1276999
 [9,] 0.1950756 0.53182377 0.3650258
[10,] 0.1704638 1.19712483 0.3431338

$Maximum
          [,1]     [,2]     [,3]     [,4]     [,5]     [,6]     [,7]     [,8]
 [1,] 16.61668 27.23263 34.78118 27.06430 30.26329 21.75680 25.61691 26.58111
 [2,] 17.06794 27.58838 31.55307 19.92698 24.49910 13.63015 15.81394 28.50312
 [3,] 33.39184 23.12629 26.31031 27.00091 33.93253 25.01891 22.47147 32.37130
 [4,] 17.10440 21.35314 17.97644 27.84256 22.08377 15.64404 12.51526 32.25882
 [5,] 21.35428 25.05039 24.45188 29.25133 16.55753 13.25312 15.97567 22.01181
 [6,] 22.69345 17.94661 16.38081 38.80468 32.60119 31.48382 20.72314 44.32670
 [7,] 17.68831 20.64192 28.17732 32.63992 20.52400 18.97128 23.04478 21.33491
 [8,] 14.57081 16.46649 30.64453 36.84082 33.83469 23.57101 20.05926 41.02052
 [9,] 18.86371 20.03592 15.15944 38.55596 23.58705 21.17369 23.95842 46.80301
[10,] 20.02812 15.17771 20.31619 25.21074 16.98341 12.12677 37.59045 18.07039
          [,9]    [,10]
 [1,] 18.78202 32.11117
 [2,] 13.72232 23.90242
 [3,] 25.04412 37.21760
 [4,] 20.02471 28.86471
 [5,] 16.12973 27.41948
 [6,] 32.14363 32.49904
 [7,] 17.47247 26.82632
 [8,] 17.58107 18.26457
 [9,] 17.37124 39.71934
[10,] 22.03250 38.71328

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