View source: R/hypothesis_testing.R
compute_V_pT | R Documentation |
V_{pT}
Statistic for Covariance Time-Variation Hypothesis TestingThis function calculates the V_{pT}
statistic, which is part of the hypothesis
testing procedure to determine whether the covariance matrix of asset returns is time-varying.
It incorporates kernel-weighted factor interactions and residual correlations.
compute_V_pT(local_factors, residuals, h, iT, ip, kernel_func)
local_factors |
A list where each element is a numeric matrix representing the
local factor scores for a specific time period. Each matrix should have |
residuals |
A numeric matrix of residuals with |
h |
A numeric value indicating the bandwidth parameter for the kernel function. |
iT |
An integer specifying the number of time periods. |
ip |
An integer specifying the number of assets. |
kernel_func |
A function representing the kernel used for weighting. Typically, an Epanechnikov kernel or another boundary kernel function. |
The function performs the following steps:
Iterates over each pair of time periods (s, r)
where s < r
.
Computes the two-fold convolution kernel value \bar{K}_{sr}
using the
two_fold_convolution_kernel
function.
Calculates the squared dot product of local factors weighted by the factor covariance matrix.
Computes the squared dot product of residuals between time periods s
and r
.
Aggregates these values across all relevant time period pairs and scales by
\frac{2}{T^2 × p × h}
to obtain V_{pT}
.
A numeric scalar V_{pT}
representing the computed statistic based on
kernel-weighted factor interactions and residual correlations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.