**2. Methods**

The power law classification scheme (PLCS) is focused on correlations of trends [28]. The algorithm will be shortly described here for the clarity of presentation and convenience of the reader.

Let assume that there are two time series recorded simultaneously with the same length *N*. In the first step, the subseries from the initial point *k* are taken and the Manhattan distance between them calculated. The procedure is repeated for each *k* ∈ {1, ... , *<sup>N</sup>*}. At this point, the series of cumulative Manhattan distance is obtained. Each point of this series corresponds to a different "*k*". Finally, the power law function is fitted to the cumulative Manhattan distance series. The power of the fitted function diminished by one defines the correlation strength.

#### *Example of Application*

Let us assume that there are two time series that are generated by the linear functions:

$$f\_1(t) = a\_1 \cdot t, \quad f\_2(t) = a\_2 \cdot t.$$

The data are registered in equal intervals e.g., *t* = 1, 2, ... , *N*. The generated time series are denoted as *f*1 and *f*2. Subsequently, the cumulative series of the Manhattan distance between series *f*1 and *f*2 is equal to

$$MD(k) = \sum\_{i=1}^{k} |a\_1 - a\_2|i = |a\_1 - a\_2|\frac{(1+k)k}{2}$$

,

so

$$MD(k) = \frac{|a\_1 - a\_2|}{2}(k + k^2).$$

The last step is the fitting of the power law function. The most popular method is fitting the linear function to the log-log transformed data e.g., (*ln*(*k*), *ln*(*MD*(*k*))). Of course, the quality of the fit depends on the series length. In the case of the analysed functions *f*1 and *f*2, the fitted exponent for the first 100 data points is equal to 1.922, but, for 1000 data points, is equal to 1.982 and asymptotically approach 2. The observed uncertainity is the result of numerical limitations of the computer memory while calculating the logarithm. In order to obtain the correlation strength, one has to diminish the exponent of the fitted function by one and finally obtains 1. Of course, this result is in agreemen<sup>t</sup> with the linear relationship between the considered functions. Other examples and more detailed analysis can be found in [28–30].

The results of PLCS analysis can be classified into two categories:


The special case of *α* = 0 is observed when the time series are overlapping [28].

In the present study, the *time evolution* of correlation strength is analysed; therefore, the additional correlation window parameter is introduced *Tc*. The correlation strength is calculated in a moving time window, so the appropriate subseries of the length *Tc* are taken

and the correlation strength between them calculated; subsequently, the starting point is shifted by one day and the procedure is repeated.

The application of PLCS to a time series gives symmetrical correlation matrix with *N*2−*N* 2 unique elements ( *N*—is the number of time series elements considered). Therefore, to conclude, it should be further analysed. The popular strategy is to construct a network, e.g., Minimum Spanning Tree or others. However, PLCS allows for distinguishing two types of cross-correlation: convergen<sup>t</sup> and divergent time series. Therefore, in this paper, the following two networks are constructed:


Clearly, the first type of network is focused on the time series approaching each other, while the second on the time series increasing differences.

In the presented study, the grouping of currencies was analysed, particularly the clique and community formation were investigated. Therefore, the following network features were calculated: the clique size evolution, the community number, the frequency of the connection on the graph, the evolution of the network node rank distribution, and the rank node entropy.

*Clique size* evolution is obtained by calculating the size of the biggest clique for each of the generated networks. The clique size evolution illustrates a process of unification of the market. Indeed, if the giant clique is observed, then one type of correlation is dominating on the market and, on the contrary, if the size of the biggest cluster is small, then the correlation matrix consists of a variety of correlation type.

*Community number* is obtained by measuring the number of community structure partitions that group nodes, such that there is a higher density of edges within the community than between them. This parameter is weaker than the clique number, but still allows observing grouping on Forex market.

*The frequency of connection* on the graph is the measure where the frequency of being connected on the graph is analysed. The most important feature of this measure is the ability to distinguish the most stable connections in the considered period.

*Node rank distribution* is the analysis where the most detailed information regarding the graph is obtained. The rank of nodes is an important feature allowing for observing the hierarchy of a network and is often used to determine network type [49–51]. This measure gives very detailed information regarding the graph. It may be considered as a quick overview of the network main features, e.g., if it is densely connected or whether each node is only connected with a small number of links.

*Rank node entropy* is the Shannon entropy that is defined in the standard way (Equation (1)), where the evolution of the entropy of node rank is calculated.

$$S = \sum\_{i} -p\_i \ln p\_{i\prime} \tag{1}$$

where *pi* is the probability of i-th rank. A summation is done over all ranks of nodes present in the network.

Those analyses are performed for both types of networks (diverging and converging).
