Title: | Spectral Decomposition of Connectedness Measures |
---|---|
Description: | Accompanies a paper (Barunik, Krehlik (2018) <doi:10.1093/jjfinec/nby001>) dedicated to spectral decomposition of connectedness measures and their interpretation. We implement all the developed estimators as well as the historical counterparts. For more information, see the help or GitHub page (<https://github.com/tomaskrehlik/frequencyConnectedness>) for relevant information. |
Authors: | Tomas Krehlik [aut, cre] |
Maintainer: | Tomas Krehlik <[email protected]> |
License: | GPL-2 |
Version: | 0.2.4 |
Built: | 2024-11-02 04:12:25 UTC |
Source: | https://github.com/tomaskrehlik/frequencyconnectedness |
Method for for collapsing bound for frequency spillovers
collapseBounds(spillover_table, which)
collapseBounds(spillover_table, which)
spillover_table |
the output of spillover estimation function or rolling spillover estimation function |
which |
integer vector indicating which of the frequency bounds we want to have collapsed |
New spillover object with collapsed bounds
Tomas Krehlik <[email protected]>
Taking in list_of_spills, if the individual spillover_tables are frequency based, it allows you to collapse several frequency bands into one.
## S3 method for class 'list_of_spills' collapseBounds(spillover_table, which)
## S3 method for class 'list_of_spills' collapseBounds(spillover_table, which)
spillover_table |
a list_of_spills object, ideally from the provided estimation functions |
which |
which frequency bands to collapse. Should be a sequence like 1:2 or 1:5, etc. |
list_of_spills with less frequency bands.
Tomas Krehlik <[email protected]>
Taking in spillover_table, if the spillover_table is frequency based, it allows you to collapse several frequency bands into one.
## S3 method for class 'spillover_table' collapseBounds(spillover_table, which)
## S3 method for class 'spillover_table' collapseBounds(spillover_table, which)
spillover_table |
a spillover_table object, ideally from the provided estimation functions |
which |
which frequency bands to collapse. Should be a sequence like 1:2 or 1:5, etc. |
spillover_table with less frequency bands.
Tomas Krehlik <[email protected]>
The dataset includes three simulated processes with spillover dynamics.
Tomas Krehlik [email protected]
This function computes the standard forecast error vector decomposition given the estimate of the VAR.
fevd(est, n.ahead = 100, no.corr = F)
fevd(est, n.ahead = 100, no.corr = F)
est |
the VAR estimate from the vars package |
n.ahead |
how many periods ahead should be taken into account |
no.corr |
boolean if the off-diagonal elements should be set to 0. |
a matrix that corresponds to contribution of ith variable to jth variance of forecast
Tomas Krehlik [email protected]
This function computes the decomposition of standard forecast error vector decomposition given the estimate of the VAR. The decomposition is done according to the Stiassny (1996)
fftFEVD(est, n.ahead = 100, no.corr = F, range)
fftFEVD(est, n.ahead = 100, no.corr = F, range)
est |
the VAR estimate from the vars package |
n.ahead |
how many periods ahead should be taken into account |
no.corr |
boolean if the off-diagonal elements should be set to 0. |
range |
defines the frequency partitions to which the spillover should be decomposed |
a list of matrices that corresponds to contribution of ith variable to jth variance of forecast
Tomas Krehlik [email protected]
This function computes the decomposition of standard forecast error vector decomposition given the estimate of the VAR. The decomposition is done according to the Stiassny (1996)
fftGenFEVD(est, n.ahead = 100, no.corr = F, range)
fftGenFEVD(est, n.ahead = 100, no.corr = F, range)
est |
the VAR estimate from the vars package |
n.ahead |
how many periods ahead should be taken into account |
no.corr |
boolean if the off-diagonal elements should be set to 0. |
range |
defines the frequency partitions to which the spillover should be decomposed |
a list of matrices that corresponds to contribution of ith variable to jth variance of forecast
Tomas Krehlik [email protected]
Method for computing FROM spillovers
from(spillover_table, ...)
from(spillover_table, ...)
spillover_table |
the output of spillover estimation function or rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
Value for FROM spillover
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function computes the from spillovers for all the individual spillover_table.
## S3 method for class 'list_of_spills' from(spillover_table, within = F, ...)
## S3 method for class 'list_of_spills' from(spillover_table, within = F, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the from spillovers
Tomas Krehlik <[email protected]>
Taking in spillover_table, the function computes the from spillover.
## S3 method for class 'spillover_table' from(spillover_table, within = F, ...)
## S3 method for class 'spillover_table' from(spillover_table, within = F, ...)
spillover_table |
a spillover_table object, ideally from the provided estimation functions |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the from spillover
Tomas Krehlik <[email protected]>
This function computes the standard forecast error vector decomposition given the
estimate of the VAR.
There are common complaints and requests whether the computation is ok and why
it does not follow the original Pesaran Shin (1998) article. So let me clear two things
out. First, the in the equation on page 20 refers to elements of
, not standard
deviation. Second, the indexing is wrong, it should be
not
. Look, for example,
to Diebold and Yilmaz (2012) or ECB WP by Dees, Holly, Pesaran, and Smith (2007)
for the correct version.
genFEVD(est, n.ahead = 100, no.corr = F)
genFEVD(est, n.ahead = 100, no.corr = F)
est |
the VAR estimate from the vars package |
n.ahead |
how many periods ahead should be taken into account |
no.corr |
boolean if the off-diagonal elements should be set to 0. |
a matrix that corresponds to contribution of ith variable to jth variance of forecast
Tomas Krehlik [email protected]
This function returns the indeces of the vector coming from DFT of time series of length n.ahead that correspond to frequencies in the interval (up, down].
getIndeces(n.ahead, up, down)
getIndeces(n.ahead, up, down)
n.ahead |
the length of the vector coming out of the DFT |
up |
the upper boundary of the interval |
down |
the lower boundary of the interval |
Tomas Krehlik [email protected]
This function takes in a vector of numbers denoting the breaks in partition of an interval and returns a list of indeces that correspond to indeces that are contained within an individual intervals. The individual parts then contain (a,b] for all pairs in the interval. Hence if you want pi to be included, the partition should start with something slightly bigger than pi.
getPartition(partition, n.ahead)
getPartition(partition, n.ahead)
partition |
breaking points of partition of frequency interval, should be ordered decreasingly. |
n.ahead |
how many observations is the FFT done on. |
a list of vectors of indeces corresponding to individual partitions
Tomas Krehlik [email protected]
Method for computing NET spillovers
net(spillover_table, ...)
net(spillover_table, ...)
spillover_table |
the output of spillover estimation function or rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
Value for NET spillover
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function computes the net spillovers for all the individual spillover_table.
## S3 method for class 'list_of_spills' net(spillover_table, within = F, ...)
## S3 method for class 'list_of_spills' net(spillover_table, within = F, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the net spillovers
Tomas Krehlik <[email protected]>
Taking in spillover_table, the function computes the net spillover.
## S3 method for class 'spillover_table' net(spillover_table, within = F, ...)
## S3 method for class 'spillover_table' net(spillover_table, within = F, ...)
spillover_table |
a spillover_table object, ideally from the provided estimation functions |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the net spillover
Tomas Krehlik <[email protected]>
Method for computing overall spillovers
overall(spillover_table, ...)
overall(spillover_table, ...)
spillover_table |
the output of spillover estimation function or rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
Value for overall spillover
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function computes the overall spillovers for all the individual spillover_table.
## S3 method for class 'list_of_spills' overall(spillover_table, within = F, ...)
## S3 method for class 'list_of_spills' overall(spillover_table, within = F, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the overall spillovers
Tomas Krehlik <[email protected]>
Taking in spillover_table, the function computes the overall spillover.
## S3 method for class 'spillover_table' overall(spillover_table, within = F, ...)
## S3 method for class 'spillover_table' overall(spillover_table, within = F, ...)
spillover_table |
a spillover_table object, ideally from the provided estimation functions |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the overall spillover
Tomas Krehlik <[email protected]>
Method for computing PAIRWISE spillovers
pairwise(spillover_table, ...)
pairwise(spillover_table, ...)
spillover_table |
the output of spillover estimation function or rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
Value for PAIRWISE spillover
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function computes the pairwise spillovers for all the individual spillover_table.
## S3 method for class 'list_of_spills' pairwise(spillover_table, within = F, ...)
## S3 method for class 'list_of_spills' pairwise(spillover_table, within = F, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the pairwise spillovers
Tomas Krehlik <[email protected]>
Taking in spillover_table, the function computes the pairwise spillover.
## S3 method for class 'spillover_table' pairwise(spillover_table, within = F, ...)
## S3 method for class 'spillover_table' pairwise(spillover_table, within = F, ...)
spillover_table |
a spillover_table object, ideally from the provided estimation functions |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the pairwise spillover
Tomas Krehlik <[email protected]>
Method for ploting FROM spillovers
plotFrom(spillover_table, ...)
plotFrom(spillover_table, ...)
spillover_table |
the output of rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
The plot
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function plots the from spillovers using the zoo::plot.zoo function
## S3 method for class 'list_of_spills' plotFrom( spillover_table, within = F, which = 1:nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), ... )
## S3 method for class 'list_of_spills' plotFrom( spillover_table, within = F, which = 1:nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), ... )
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
which |
a vector with indices specifying which plots to plot. |
... |
for the sake of CRAN not to complain |
a plot of from spillovers
Tomas Krehlik <[email protected]>
Method for ploting NET spillovers
plotNet(spillover_table, ...)
plotNet(spillover_table, ...)
spillover_table |
the output of rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
The plot
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function plots the net spillovers using the zoo::plot.zoo function
## S3 method for class 'list_of_spills' plotNet( spillover_table, within = F, which = 1:nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), ... )
## S3 method for class 'list_of_spills' plotNet( spillover_table, within = F, which = 1:nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), ... )
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
which |
a vector with indices specifying which plots to plot. |
... |
for the sake of CRAN not to complain |
a plot of net spillovers
Tomas Krehlik <[email protected]>
Method for ploting overall spillovers
plotOverall(spillover_table, ...)
plotOverall(spillover_table, ...)
spillover_table |
the output of rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
The plot
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function plots the overall spillovers using the zoo::plot.zoo function
## S3 method for class 'list_of_spills' plotOverall(spillover_table, within = F, ...)
## S3 method for class 'list_of_spills' plotOverall(spillover_table, within = F, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a plot of overall spillovers
Tomas Krehlik <[email protected]>
Method for ploting PAIRWISE spillovers
plotPairwise(spillover_table, ...)
plotPairwise(spillover_table, ...)
spillover_table |
the output of rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
The plot
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function plots the pairwise spillovers using the zoo::plot.zoo function
## S3 method for class 'list_of_spills' plotPairwise( spillover_table, within = F, which = 1:ncol(utils::combn(nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), 2)), ... )
## S3 method for class 'list_of_spills' plotPairwise( spillover_table, within = F, which = 1:ncol(utils::combn(nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), 2)), ... )
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
which |
a vector with indices specifying which plots to plot. |
... |
for the sake of CRAN not to complain |
a plot of pairwise spillovers
Tomas Krehlik <[email protected]>
Method for ploting specific pair spillover
plotSpecific(spillover_table, ...)
plotSpecific(spillover_table, ...)
spillover_table |
the output of rolling spillover estimation function |
... |
other arguments like which specifi pair to plot. |
The plot
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function plots the spillover from i to j using the zoo::plot.zoo function
## S3 method for class 'list_of_spills' plotSpecific(spillover_table, i, j, ...)
## S3 method for class 'list_of_spills' plotSpecific(spillover_table, i, j, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
i |
from variable |
j |
to variable |
... |
for the sake of CRAN not to complain |
a plot of pairwise spillovers
Tomas Krehlik <[email protected]>
Method for ploting TO spillovers
plotTo(spillover_table, ...)
plotTo(spillover_table, ...)
spillover_table |
the output of rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
The plot
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function plots the to spillovers using the zoo::plot.zoo function
## S3 method for class 'list_of_spills' plotTo( spillover_table, within = F, which = 1:nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), ... )
## S3 method for class 'list_of_spills' plotTo( spillover_table, within = F, which = 1:nrow(spillover_table$list_of_tables[[1]]$tables[[1]]), ... )
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
which |
a vector with indices specifying which plots to plot. |
... |
for the sake of CRAN not to complain |
a plot of to spillovers
Tomas Krehlik <[email protected]>
Usually it is not a good idea to print the list_of_spills object, hence this function implements warning and shows how to print them individually if the user really wants to.
## S3 method for class 'list_of_spills' print(x, ...)
## S3 method for class 'list_of_spills' print(x, ...)
x |
a list_of_spills object, ideally from the provided estimation functions |
... |
for the sake of CRAN not to complain |
Tomas Krehlik <[email protected]>
The function takes as an argument the spillover_table object and prints it nicely to the console. While doing that it also computes all the neccessary measures.
## S3 method for class 'spillover_table' print(x, ...)
## S3 method for class 'spillover_table' print(x, ...)
x |
a spillover_table object, ideally from the provided estimation functions |
... |
for the sake of CRAN not to complain |
Tomas Krehlik <[email protected]>
This function is an internal implementation of the spillover. The spillover is in general defined as the contribution of the other variables to the fevd of the self variable. This function computes the spillover as the contribution of the diagonal elements of the fevd to the total sum of the matrix. The other functions are just wrappers around this function. In general, other spillovers could be implemented using this function.
spillover(func, est, n.ahead, no.corr = F)
spillover(func, est, n.ahead, no.corr = F)
func |
name of the function that returns FEVD for the estimtate est |
est |
the estimate of a system, typically VAR estimate in our case |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
spillover_table object
Tomas Krehlik <[email protected]>
This function is an internal implementation of the frequency spillover. We apply the identification scheme suggested by fevd to the frequency decomposition of the transfer functions from the estimate est.
spilloverBK09(est, n.ahead = 100, no.corr, partition)
spilloverBK09(est, n.ahead = 100, no.corr, partition)
est |
the estimate of a system, typically VAR estimate in our case |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
partition |
defines the frequency partitions to which the spillover should be decomposed |
spillover_table object
Tomas Krehlik <[email protected]>
This function is an internal implementation of the frequency spillover. We apply the identification scheme suggested by fevd to the frequency decomposition of the transfer functions from the estimate est.
spilloverBK12(est, n.ahead = 100, no.corr, partition)
spilloverBK12(est, n.ahead = 100, no.corr, partition)
est |
the estimate of a system, typically VAR estimate in our case |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
partition |
defines the frequency partitions to which the spillover should be decomposed |
spillover_table object
Tomas Krehlik <[email protected]>
This function is an internal implementation of the spillover. The spillover is in general defined as the contribution of the other variables to the fevd of the self variable. This function computes the spillover as the contribution of the diagonal elements of the fevd to the total sum of the matrix. The other functions are just wrappers around this function. In general, other spillovers could be implemented using this function.
spilloverDY09(est, n.ahead = 100, no.corr)
spilloverDY09(est, n.ahead = 100, no.corr)
est |
the estimate of a system, typically VAR estimate in our case |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
spillover_table object
Tomas Krehlik <[email protected]>
This function is an internal implementation of the spillover. The spillover is in general defined as the contribution of the other variables to the fevd of the self variable. This function computes the spillover as the contribution of the diagonal elements of the fevd to the total sum of the matrix. The other functions are just wrappers around this function. In general, other spillovers could be implemented using this function.
spilloverDY12(est, n.ahead = 100, no.corr)
spilloverDY12(est, n.ahead = 100, no.corr)
est |
the estimate of a system, typically VAR estimate in our case |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
spillover_table object
Tomas Krehlik <[email protected]>
This function is an internal implementation of the frequency spillover. We apply the identification scheme suggested by fevd to the frequency decomposition of the transfer functions from the estimate est.
spilloverFft(func, est, n.ahead, partition, no.corr = F)
spilloverFft(func, est, n.ahead, partition, no.corr = F)
func |
name of the function that returns FEVD for the estimtate est |
est |
the estimate of a system, typically VAR estimate in our case |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
partition |
defines the frequency partitions to which the spillover should be decomposed |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
spillover_table object
Tomas Krehlik <[email protected]>
This function computes the rolling spillover using the standard VAR estimate. We implement the parallel version for faster processing. The window is of fixed window and is rolled over the data. Interpretation of the other parameters is the same as in the standard computation of spillover. For usage, see how spilloverRollingDY09, etc. are implemented.
spilloverRolling( func_spill, params_spill, func_est, params_est, data, window, cluster = NULL, check_data = TRUE )
spilloverRolling( func_spill, params_spill, func_est, params_est, data, window, cluster = NULL, check_data = TRUE )
func_spill |
name of the function that returns FEVD for the estimtate est |
params_spill |
parameters from spillover estimation function as a list |
func_est |
name of the estimation function |
params_est |
parameters from the estimation function as a list |
data |
variable containing the dataset |
window |
length of the window to be rolled |
cluster |
either NULL for no parallel processing or the variable containing the cluster. |
check_data |
whether to check the data for NAs before starting estimation. Typically should be left true unless the underlying estimate is providing a way how to infer those NAs. |
A corresponding spillover value on a given freqeuncy band, ordering of bands corresponds to the ordering of original bounds.
Tomas Krehlik <[email protected]>
This function computes the rolling spillover using the standard VAR estimate. We implement the parallel version for faster processing. The window is of fixed window and is rolled over the data. Interpretation of the other parameters is the same as in the standard computation of spillover.
spilloverRollingBK09( data, n.ahead = 100, no.corr, partition, func_est, params_est, window, cluster = NULL )
spilloverRollingBK09( data, n.ahead = 100, no.corr, partition, func_est, params_est, window, cluster = NULL )
data |
variable containing the dataset |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
partition |
how to split up the estimated spillovers into frequency bands. Should be a vector of bound points that starts with 0 and ends with pi+0.00001. |
func_est |
estimation function, usually would be VAR or BigVAR function to estimate the multivariate system |
params_est |
parameters passed to the estimation function, as a list, for parameters refer to documentation of the estimating function |
window |
length of the window to be rolled |
cluster |
either NULL for no parallel processing or the variable containing the cluster. |
Tomas Krehlik <[email protected]>
This function computes the rolling spillover using the standard VAR estimate. We implement the parallel version for faster processing. The window is of fixed window and is rolled over the data. Interpretation of the other parameters is the same as in the standard computation of spillover.
spilloverRollingBK12( data, n.ahead = 100, no.corr, partition, func_est, params_est, window, cluster = NULL )
spilloverRollingBK12( data, n.ahead = 100, no.corr, partition, func_est, params_est, window, cluster = NULL )
data |
variable containing the dataset |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
partition |
defines the frequency partitions to which the spillover should be decomposed |
func_est |
a name of the function to estimate with, for example "var" for VAR from vars package |
params_est |
a list of the parameters to pass to the function besides the data that are passed as a first element. |
window |
length of the window to be rolled |
cluster |
either NULL for no parallel processing or the variable containing the cluster. |
Tomas Krehlik <[email protected]>
This function computes the rolling spillover using the standard VAR estimate. We implement the parallel version for faster processing. The window is of fixed window and is rolled over the data. Interpretation of the other parameters is the same as in the standard computation of spillover.
spilloverRollingDY09( data, n.ahead = 100, no.corr, func_est, params_est, window, cluster = NULL )
spilloverRollingDY09( data, n.ahead = 100, no.corr, func_est, params_est, window, cluster = NULL )
data |
variable containing the dataset |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
func_est |
estimation function, usually would be VAR or BigVAR function to estimate the multivariate system |
params_est |
parameters passed to the estimation function, as a list, for parameters refer to documentation of the estimating function |
window |
length of the window to be rolled |
cluster |
either NULL for no parallel processing or the variable containing the cluster. |
Tomas Krehlik <[email protected]>
This function computes the rolling spillover using the standard VAR estimate. We implement the parallel version for faster processing. The window is of fixed window and is rolled over the data. Interpretation of the other parameters is the same as in the standard computation of spillover.
spilloverRollingDY12( data, n.ahead = 100, no.corr, func_est, params_est, window, cluster = NULL )
spilloverRollingDY12( data, n.ahead = 100, no.corr, func_est, params_est, window, cluster = NULL )
data |
variable containing the dataset |
n.ahead |
how many periods ahead should the FEVD be computed, generally this number should be high enough so that it won't change with additional period |
no.corr |
boolean parameter whether the off-diagonal in the covariance matrix should be set to zero |
func_est |
estimation function, usually would be VAR or BigVAR function to estimate the multivariate system |
params_est |
parameters passed to the estimation function, as a list, for parameters refer to documentation of the estimating function |
window |
length of the window to be rolled |
cluster |
either NULL for no parallel processing or the variable containing the cluster. |
Tomas Krehlik <[email protected]>
Method for computing TO spillovers
to(spillover_table, ...)
to(spillover_table, ...)
spillover_table |
the output of spillover estimation function or rolling spillover estimation function |
... |
other arguments like whether it is within or absolute spillover in case of the frequency spillovers |
Value for TO spillover
Tomas Krehlik <[email protected]>
Taking in list_of_spillovers, the function computes the to spillovers for all the individual spillover_table.
## S3 method for class 'list_of_spills' to(spillover_table, within = F, ...)
## S3 method for class 'list_of_spills' to(spillover_table, within = F, ...)
spillover_table |
a list_of_spills object, ideally from rolling window estimation |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the to spillovers
Tomas Krehlik <[email protected]>
Taking in spillover_table, the function computes the to spillover.
## S3 method for class 'spillover_table' to(spillover_table, within = F, ...)
## S3 method for class 'spillover_table' to(spillover_table, within = F, ...)
spillover_table |
a spillover_table object, ideally from the provided estimation functions |
within |
whether to compute the within spillovers if the spillover tables are frequency based. |
... |
for the sake of CRAN not to complain |
a list containing the to spillover
Tomas Krehlik <[email protected]>
The dataset includes median realised volatilities of some financial indices
Tomas Krehlik [email protected]