compute_B_pT {TVMVP} | R Documentation |
Compute B_{pT}
Statistic for Covariance Time-Variation Hypothesis Testing
Description
This function calculates the B_{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 local and global factor interactions along with residuals.
Usage
compute_B_pT(local_factors, global_factors, residuals, h, iT, ip, kernel_func)
Arguments
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 |
global_factors |
A numeric matrix of global factor scores with |
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. |
Details
The function performs the following steps:
Computes the sum of squared residuals for each time period
s
.Constructs the kernel matrix
K[s,t]
by applying theboundary_kernel
function to each pair of time periods(s,t)
.Calculates the local dot-product matrix
L[s,t]
as the dot product between the local factors at times
andt
.Computes the global dot-product matrix
G[s,t]
as the dot product between the global factors at times
andt
.Computes the element-wise squared difference between
K * L
andG
, multiplies it by the residuals, and sums over alls,t
.Scales the aggregated value by
\frac{\sqrt{h}}{T^2 \sqrt{p}}
to obtainB_{pT}
.
Value
A numeric scalar B_{pT}
representing the computed statistic based on
kernel-weighted factor interactions and residuals.