*2.2. The q-Dependent Detrended Correlation Coefficient*

Since the Pearson correlation coefficient as a measure has its drawbacks in the case of heavy tails, heteroskedasticity, and multi-scale nonstationarity (which are observed in the cryptocurrency market [9]) the cross-correlations will henceforth be determined using an alternative, better tailored method: the *q*-dependent detrended cross-correlation coefficient *ρq*(*s*) [63]. The detrended fluctuation analysis (DFA), which forms a basis for defining *ρq*(*s*), was developed with the intention to allow for detecting the long-range power-law auto- and cross-correlations that produce trends on different time horizons [64]. Therefore, unlike more traditional methods of trend removal, both DFA and its derivative measures like the coefficient *ρq*(*s*) can successfully deal with nonstationarity on all scales [65]. *ρq*(*s*) enables, thus, considering the cross-correlation strength on different time scales and, if used in parallel with the multiscale DFA itself, is able to detect scale-free correlations. Moreover, owing to the parameter *q*, the correlation analysis can be focused on a specific range of the fluctuation amplitudes.

The steps to calculate *ρq*(*s*) are as follows. Two possibly nonstationary time series {*x*(*i*)}*i*=1,...,*<sup>T</sup>* and {*y*(*i*)}*i*=1,...,*<sup>T</sup>* of length *T* are divided into *Ms* boxes of length *s* starting from its opposite ends and integrated. In each box, the polynomial trend is removed:

$$X\_{\nu}(\mathbf{s},i) = \sum\_{j=1}^{i} \mathbf{x}(\nu\mathbf{s}+j) - P\_{X,\mathbf{s},\nu}^{(m)}(i), \\ \boldsymbol{Y}\_{\nu}(\mathbf{s},i) = \sum\_{j=1}^{i} \mathbf{y}(\nu\mathbf{s}+j) - P\_{Y,\mathbf{s},\nu}^{(m)}(i), \tag{1}$$

where the polynomials *P*(*m*) of order *m* are applied. In this study *m* = 2 has been selected, which performs well for the financial time series [66]. After this step 2*Ms* boxes are obtained in total with detrended signals. The next step is to calculate the variance and covariance for each of the boxes *ν*:

*f* 2 ZZ(*s*, *<sup>ν</sup>*) = <sup>1</sup> *s s* ∑ *i*=1 (*Zν*(*s*, *i*))2, (2)

$$f\_{\rm XY}^2(s,\nu) = \frac{1}{s} \sum\_{i=1}^s X\_{\nu}(s,i) \times Y\_{\nu}(s,i),\tag{3}$$

where *Z* means *X* or *Y*. These quantities are used to calculate a family of the fluctuation functions of order *q*:

$$F\_{\rm ZZ}^{(q)}(s) = \frac{1}{2M\_s} \sum\_{\nu=0}^{2M\_s-1} \left[ f\_{\rm ZZ}^2(s,\nu) \right]^{q/2} \tag{4}$$

$$F\_{\rm XY}^{(q)}(s) = \frac{1}{2M\_s} \sum\_{\nu=0}^{2M\_s-1} \text{sign} \left[ f\_{\rm XY}^2(s,\nu) \right] |f\_{\rm XY}^2(s,\nu)|^{q/2},\tag{5}$$

where a sign function sign- *f* 2 XY(*s*, *ν*) is preserved in order to secure consistency of results for different *q*s.

The formula for the *q*-dependent detrended correlation coefficient is given as follows:

$$\rho\_q^{\chi\text{Y}}(s) = \frac{F\_{\chi\text{Y}}^{(q)}(s)}{\sqrt{F\_{\chi\text{X}}^{(q)}(s)F\_{\text{YY}}^{(q)}(s)}} \cdot \tag{6}$$

For *q* = 2 the above definition can be viewed as a detrended counterpart of the Pearson cross-correlation coefficient *C* [67]. The parameter *q* plays the role of a filter suppressing *q* < 2 or amplifying (*q* > 2) the fluctuation variance/covariance calculated in the boxes *ν* (see Equations (4) and (5)). For *q* < 2 boxes with small fluctuations contribute more to *ρq*(*s*), while for *q* > 2 the boxes with large fluctuations contribute more. Therefore, by using this measure, it is possible to distinguish the fluctuation size range that is a source of the observed correlations. In the numerical calculations below, we used our own software in which we implemented the algorithm described above.
