Given a collection of MTS, the function returns the pairwise distance matrix,
where the distance between two MTS \(\boldsymbol X_T\) and \(\boldsymbol Y_T\) is defined as
$$d_{QCF}(\boldsymbol X_T, \boldsymbol Y_T)=\Bigg[\sum_{j_1=1}^{d}\sum_{j_2=1}^{d}\sum_{i=1}^{r}
\sum_{i'=1}^{r}\sum_{k=1}^{K}\Big(\Re\big({\widehat G_{j_1,j_2}^{\boldsymbol X_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}\big)
-\Re\big({\widehat G_{j_1,j_2}^{\boldsymbol Y_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})\big)}\Big)^2+$$
$$\sum_{j_1=1}^{d}\sum_{j_2=1}^{d}\sum_{i=1}^{r}\sum_{i'=1}^{r}\sum_{k=1}^{K}\Big(\Im\big({\widehat G_{j_1,j_2}
^{\boldsymbol X_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}\big)
-\Im\big({\widehat G_{j_1,j_2}^{\boldsymbol Y_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})\big)}\Big)^2\Bigg]^{1/2},$$
where \({\widehat G_{j_1,j_2}^{\boldsymbol X_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}\) and
\({\widehat G_{j_1,j_2}^{\boldsymbol Y_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}\)
are estimates of the quantile cross-spectral densities (so-called smoothed CCR-periodograms)
with respect to the variables \(j_1\) and \(j_2\) and probability levels \(\tau_i\) and \(\tau_{i^\prime}\) for
series \(\boldsymbol X_T\) and \(\boldsymbol Y_T\), respectively, and \(\Re(\cdot)\) and \(\Im(\cdot)\)
denote the real part and imaginary part operators, respectively.