Abstract
Complex systems in biology, climatology, medicine, and economy hold emergent properties such as nonlinearity, adaptation, and selforganization. These emergent attributes can derive from largescale relationships, connections, and interactive behavior despite not being apparent from their isolated components. It is possible to better comprehend complex systems by analyzing crosscorrelations between time series. However, the accumulation of nonlinear processes induces multiscale structures, therefore, a spectrum of powerlaw exponents (the fractal dimension) and distinct cyclical patterns. We propose the Multifractal detrended crosscorrelation heatmaps (MFDCCHM) based on the DCCA crosscorrelation coefficients with sliding boxes, a systematic approach capable of mapping the relationships between fluctuations of signals on different scales and regimes. The MFDCCHM uses the integrated series of magnitudes, sliding boxes with sizes of up to 5% of the entire series, and an average of DCCA coefficients on top of the heatmaps for the local analysis. The heatmaps have shown the same cyclical frequencies from the spectral analysis across different multifractal regimes. Our dataset is composed of sales and inventory from the Brazilian automotive sector and macroeconomic descriptors, namely the Gross Domestic Product (GDP) per capita, Nominal Exchange Rate (NER), and the Nominal Interest Rate (NIR) from the Central Bank of Brazil. Our results indicate crosscorrelated patterns that can be directly compared with the powerlaw spectra for multiple regimes. We have also identified cyclical patterns of high intensities that coincide with the Brazilian presidential elections. The MFDCCHM uncovers nonexplicit cyclic patterns, quantifies the relations of two nonstationary signals (noise effect removed), and has outstanding potential for mapping crossregime patterns in multiple domains.
Similar content being viewed by others
Introduction
Economic scenarios are complex^{1,2,3}, and their mechanisms are challenging^{4,5,6,7}. According to Hidalgo^{8}, the study of economic complexity has accelerated in recent decades not only focused on traditional approaches to aggregate outputs such as gross domestic product (GDP), capital, labor, and knowledge. Complexity metrics can provide robust descriptors of diversification and indications of potential development for diverse economies and markets^{9}. The study of economic complexity has also grown with the revival of industrial policy^{10,11}, endogenous growth theory^{12,13,14,15,16,17}, and quantitative studies of complex economic structures in numerous countries^{18,19,20,21,22,23,24}. According to Arthur^{25}, the neoclassical^{26} theory assumes rational agents with welldefined problems arriving at optimal behavior in equilibrium with the overall outcome, which can be unrealistic for markets^{27} since it does not take into account possible anomalies, market phenomena, bubbles, crashes, and random periods of volatility. However, complexity economics assumes that agents differ from each other, explore, react and change actions in response to mutual outcomes. Consequently, patterns and emergent phenomena can be displayed out of equilibrium. These systems can generally exhibit complexity^{28,29,30,31,32,33,34,35}, adaptive and nonlinear dynamic behavior^{36,37}. Therefore, their overall properties cannot be easily inferred from isolated components^{38,39}. Complex systems can also present emergent properties^{40,41,42} from largescale exchanges, dependencies, and connections that only emerge when the system is alltogether. The concept of spontaneous order and selforganization economy dates back to the founder of the Austrian School, Carl Menger, in his work regarding spontaneous emergence of money transactions in primitive economies^{43}. Hayek^{44} extended the concept to selforganization phenomenon with emergence and complexity^{45,46}, followed by the support of Koppl^{47,48}, Rosser^{49} and Lewis^{50}.
Attributes such as market competitiveness^{51}, continuous variations of exchange currency rates^{52}, Gross domestic product^{53} (GDP), interest rates (IR), disposable incomes^{54} (DI), and global consumer demands can significantly impact one’s organization. These dynamic aspects always lead to internal and external implications since actors should consider costeffective strategies to mitigate financial risks^{55}, maximize profits, and encourage growth^{56}. However, elements of individual actions can generally propagate through economic networks with critical topologies for the stability of economies^{57}, selforganization^{58}, and risk propagation. These economic networks can cause a cascade of events^{59} with longtailed distributions characterized by power laws. These power laws are expected in economies, and markets due to volatilities and fluctuations in prices^{60,61,62}. Therefore, comprehending the relationship between internal and external signals and fluctuations can be critical for appropriate planning since disruptive economic scenarios can lead to unstable institutions.
The time series analysis of pairs of signals and fluctuations can assess possible datadriven persistences (the tendency of a system to remain in the same trending state), antipersistences (the tendency of a system to remain in opposing trending states), general trends and its cyclical patterns. Institutions can use these tools to improve efficiency and productivity throughout their supply chain by planning and executing short, medium, and longterm strategies to avoid disruptions. For instance, measuring the cyclical fluctuations of sales and inventory could help prevent the underproduction of a particular product during a period. However, the common bottleneck is how to effectively track seasonal (up to 1 year) trends and cyclical patterns from timeevolving fluctuations. Previous studies have shown the potential of crosscorrelation analysis for decisionmaking across multiple fields. The detrended crosscorrelation analysis (DCCA) has been used to investigate possible power laws over prices and volume changes in the stock market^{63,64}. The methods section clarifies that the DCCA generalizes the standard covariance to consider the longrange memories of two nonstationary signals. Besides, the DCCA has also been used in climatology to track the influence of seasonal patterns^{65,66}.
The signals can have scale invariance when an internal structure repeats on subintervals of the same signal. Therefore conventional methods such as the moving averages cannot capture invariant signatures. For instance, given a timeevolving signal \(X(ct)=c^{\alpha } X(t)\), we can estimate the power law exponent \(\alpha \) using fractal analyses to define the kind of scaleinvariant structure it possesses. These scaleinvariant structures are also widely found in biomedical signal processing. They can support the prognostic and diagnostic of patients since any alteration of exponents could reflect the adaptability and success of a treatment to improve pathological conditions and health^{67,68}. A single power law exponent assumes that the scale invariance is independent of time and space. However, spatial and temporal variations indicate a multifractal structure, which means a spectrum with multiple power law exponents. These scaling factors (exponents) can provide information about hidden cyclical regimes ranging from months to years. Multifractals are widely used in Finance to investigate financial time series across different markets and assets^{69,70}. The multifractal detrended fluctuation analysis (MFDFA)^{71} has been used to investigate the hedging effectiveness of Chinese treasury bonds and interest rate risk^{72}. Furthermore, the multifractal detrended crosscorrelation analysis (MFDCCA) can analyze selfsimilarities levels between Shanghai and Hong Kong Stock markets^{73}. There have been multiple advances in the domain with new tools such as the DCCA\(\textit{l}(n)\)^{74}, random matrixbased DCCA for timedelay crosscorrelation^{75}, and combinations with Support Vector Machines (SVM) to forecast financial returns^{76,77}. Additionally, Graphs using DCCA (crosscorrelation between nodes) have been used to model financial networks, analyze stock exchanges, market hubs, cluster community centrality, and connection between networks^{78}. Therefore, an extension of the MFDCCA capable of mapping crosscorrelations for multiple regimes in a single heatmap can be highly advantageous for decisionmaking across multiple domains.
We propose the multifractal detrended crosscorrelation heatmaps (MFDCCHM) based on the DCCA crosscorrelation coefficients with sliding boxes accounting for 5% of the entire series. It is crucial to use the integrated series of magnitudes and averages of DCCA coefficients on top of the heatmaps for the local analysis. This systematic approach can map the overall relationships between fluctuations of signals on different time scales and multifractal regimes (different fractal dimensions). This method uncovers nonexplicit cyclic patterns, quantifies the relations of two nonstationary signals, and can stand out as a potential approach for applications in multiple domains. For the present work, we have used time series of inventory and sales extracted from the National Federation of the Distribution of Motor Vehicles (FENABRAVE) database registered from 1995 to 2020 extracted from the Central Bank of Brazil^{79}. Forecasting sales and stocks in the automobile sector are of utmost importance to decisionmakers engaged in resource allocation on the supply side. The Brazilian Automotive sector held a share of 22% of industrial production and 4% of the total GDP in 2018. The sector is also responsible for 1.6 million employees and pays around 40 billion dollars yearly in taxes. The Brazilian Automotive Industry was also classified in the same group as the USA and South Korea regarding market structure^{80}. The latter elucidates the size of the economic impact and the importance of accurate models and systematic approaches to forecasting sales in an economic context. Time series analysis and data mining algorithms^{81,82,83} along with neural networks, fuzzy analysis, and multiple linear regressions^{84} have been used to forecast sales. However, only linear regression models^{85} were used to find elasticities for sales in the Brazilian Automotive sector. Therefore, we have explored the analysis of the crosscorrelation between sales and inventory from the Brazilian Automotive sector and growth descriptors such as the gross domestic product (GDP) per capita, the nominal exchange rate (NER), and the nominal interest rate (NIR) equivalent to the Special Settlement and Custody System (Selic). The following approaches were used for the analysis: (i) the detrended fluctuation analysis (DFA) for autocorrelation and detrended crosscorrelation analysis (DCCA) to estimate possible trends and concurrent events that might affect decisionmaking processes, (ii) the crosscorrelation coefficients (CCC) to verify the level of correlation for different periods, (iii) Discrete Fourier analysis to identify, distinguish, and characterize the various cycles, and (iv) MFDCCHM to evaluate cyclic patterns from a pair of timeevolving signals. Our global analysis has shown anticorrelated patterns from fluctuations in sales and inventory, which can help identify scenarios for the automotive sector. We have also assessed cyclical patterns on time series using the MFDCCHM method. This technique indicates positively correlated patterns from our dataset that can be directly compared with the amplitude and powerlaw spectra. We also show critical cyclical patterns and regimes of high intensities that coincide with the Brazilian presidential elections. This work presents the advantages of employing the MFDCCHM method for capturing cyclical trends to guide decisionmaking processes. The existing methods DFA and DCCA^{63,86} only present a global estimate based on scaling exponents to the level of autocorrelation and crosscorrelation between the series. It is only possible to access information on a series of fluctuations for its entire length since there is no sliding box, and the crosscorrelation coefficients are only functions of window size^{65}. The novelty of our work relies on local analysis. The local analysis (MFDCCHM) can uncover cyclical patterns, anomalies, persistences, and antipersistences of signals for small intervals of the series in different multifractal regimes (exponent factor). This systematic approach is more effective using a series of magnitudes^{87}. The analysis is carried out by choosing a subseries (short interval) of the signal (sliding box with size up to 5%), which is swept (similar to a Moving Average) for the full extension of the series and fluctuations. Therefore, the mapping considers all scales/periods of the fluctuations. Hence, unlike existing techniques, which depend only on scale variation, our systematic approach computes the crosscorrelation coefficient considering scale variation and temporal/spatial variation. The use of DCCA crosscorrelations with sliding boxes to build heatmaps was first introduced by Marinho et al.^{88}. Recent works^{89,90} use a similar approach for mapping the DCCA crosscorrelation coefficients considering integrated series and sliding boxes with a size of 50% of the entire series. However, our work takes advantage of an integrated series of magnitudes with nonlinear properties that amplify the signals. This step is crucial for uncovering anomalies and cyclical patterns across multifractal regimes in the maps. Furthermore, the maps will not uncover patterns from multiple multifractal regimes if the size of the sliding box is significantly large, for instance, 50% of the entire series, as highlighted by the references^{89,90}. Our contribution also relies on the fact that depending on the sampling, the sliding box must have a size of up to 5% of the entire series. The spectral analysis confirms this fact since we found the same cyclical frequencies across different multifractal regimes in our heatmaps. We cannot find the same results by considering only the integrated series with a sliding box accounting for 50% of the entire series. Furthermore, it is also possible to use the approach with a configurational space that is not dependent on time, which is highly beneficial and efficient for pattern recognition in numerous domains. The methods section details on stochastic methods and spectral analysis underlying our fluctuation analysis.
Results
Global analysis to estimate multifractal exponents
In the preprocessing phase, each time series correspond to signals composed of short to longrange stationary intervals. Therefore, the first step was statistically mapping nonstationary time series into stationary ones. The procedure is to establish the successive differences of the original series until its convergence to stationarity, as shown in Fig. S1 (Supporting Information). Additionally, we have computed the cumulative sum of the series of increments by considering consecutive differences of discrete points to reach the fully integrated series. Figure S2a,b (Supporting Information) shows a time series of sales in units (Brazilian Automotive sector) and their successive differences, respectively. Figure S2c (Supporting Information) shows a step series derived from the magnitude. The integratedtime series \(y_k^M\) defined by \(M =  x_i \)^{91,92} was computed from Eq. (5), as shown in Fig. S2d (Supporting Information). We compute the decomposition of \(y_k\) into a series of magnitudes as a useful strategy to characterize fluctuations and patterns obtained from the original series after computing \(F_X\) from Eq. (4). Using the series of magnitudes and sliding boxes, we have performed a local analysis by computing the coefficients \(DFA_1\) and \(DCCA_1\). As shown in Fig. S3a (Supporting Information), we have chosen one box s (a subset of the series) of a given size \(N'\) to compute \(\sigma _{DCCA_1}\). The box s is divided into \(M_v\) windows, each with size v, as shown in Fig. S3b (Supporting Information). We have also obtained the autocorrelation and crosscorrelations of \(y_k\), and \(y_k'\) in the interval \(N'\), and \(F_X\) to solve Eq. (12). After computing these coefficients, the sliding boxes move forward while keeping the same number of windows (\(M_v\)) to extract the new coefficients \(\sigma _{DCCA_1}\)^{87,88}. We repeat this procedure multiple times for sampling the time series of size N with the same box s. Finally, the box of size \(N'\) returns to the starting point for different windows of size v. The goal is to map the fluctuations with different windows of size v to obtain the coefficients \(\sigma _{DCCA_1}\) as a function of the scaling factor v and time using the correlation heating maps. This mapping is crucial because it sweeps across multiple regimes and unveils invariant structures across different multifractal exponents. We will now refer to the new multifractal detrended crosscorrelation heatmaps as the MFDCCHM method.
Figure 1a and Table 1 shows a linear trend, and both exponents from the autocorrelation and crosscorrelation are lower than 0.5. These characteristics indicate that fluctuations around the average tend to reverse in the future. Therefore, in the time interval from 1995 to 2010, the exponents reveal that Brazilian car sales and inventory fluctuations will reverse their growth direction. We have observed a similar scenario from the crosscorrelation exponent, where the fluctuations of sales and inventory follow different directions. From 1995 to 2016, we can observe the highest positive fluctuations from the first 15 years, followed by a downward trend as the sales dropped drastically. Figure 1b and the exponents in Table 2 show a qMultifractal (q = 2) with two regimes and a crossover pattern on the threshold \(\log {(v)}=1.15\), where \(v\approx 14\) months. Region I shows that the exponent for the autocorrelation of sales and inventory are antipersistent and persistent, respectively. However, Region II shows that all exponents have lower values than 0.5, indicating that future fluctuations will reverse direction. Additionally, Fig. 5b shows that for periods greater than \(v = 14\) months, the pattern of fluctuation around the linear trend is very similar to the fluctuations around the mean from Fig. 1a.
Local analysis to estimate the coefficients DFA\(_1\) and DCCA\(_1\)
Figure 2a shows the MFDCCHM sampled over multiple windows of size v and times. This heatmap has distinct colors assigned according to the magnitude of the detrended crosscorrelation coefficients, namely \(\sigma \). On top of each map, we have also plotted an average of \(\sigma \) (yaxis) for each time. Figure 2a show several multifractal regimes captured by distinct coefficients within the interval \(0<\sigma <1\) as a function of the window v. The fluctuations of the two series have shown a positive crosscorrelation with periodic highintensity patterns. We can distinguish intermittent anomaly levels with greater intensities associated with major concurrent events, particularly for \( \sigma > 0.6\). We have also found a cycle with an average of approximately three to four years for \(\sigma > 0.85\). During this period, the Brazilian automotive sector retained high incentives, subsidies, investments, and a compelling sales season throughout the automotive industry. Additionally, the intensity of positive crosscorrelations increases across multiple governments during the same cycle, with a maximum threshold between 2003 and 2004. Figure 2b confirms our previous assumptions of a three to 4year cyclic pattern (Presidential Elections). This periodicity shows that the fluctuations for the two series have high degrees of similarity.
Our results suggest that the automotive sector was optimized with neither underproduction nor overproduction. Figure 2b confirms our previous three to fouryear cycle assumptions. To conclude, visualizing a heating map sweeping \(\sigma \) for multiple window sizes for different years can unveil hidden patterns, such as the rate and variability between twotime series. We can also detect softtostrong trends and possible impacts on one’s companies’ production lines, as optimized sales and inventories can lead to higher revenues. Therefore, this approach can be of interest to strategic planning and decisionmaking.
Analysis of the amplitude and power spectra
The time series were sampled with the annual interval to obtain the amplitude and spectra of frequency from 1995 to 2010 from the following equation:
Figure 2c,d shows the amplitude and power spectra for the sales and inventory time series. In Fig. 2c we observe two outstanding seasonal peaks with annual periodicity (f = 1 cycle/year) and semiannual periodicity (f = 2 cycles/year). The latter represents an annual cycle of higher demands for vehicles and periods with lowerorder intensity, respectively. The frequency peak in the proximity of f = 0.25 cycles/year corresponds to approximately 4 years. Additionally, Fig. 2d presents the power spectra where we can identify the same peaks from Fig. 2c. The coefficients b for sales (\(1.7 \pm 0.2\)) and inventory (\(1.6 \pm 0.1\)) are in the range \(1<b <3\), which indicates a strong crosscorrelation. For instance, the peak over the frequency f = 0.25 cycles/year coincides with the MFDCCHM shown in Fig. 2a for regimes where \(\sigma > 0.85\). Suppose \(b = 0\), the series of increments would be equivalent to random series. However, our results suggest important events with distinct periodic demands. This technique can also detect seasonal anomalies and larger cycles to support strategic planning and higher decisionmaking confidence at multiple levels.
MFDCCHM analysis
We have also investigated if growth descriptors would show cyclical patterns when crosscorrelated with the fluctuations in sales of the Brazilian automotive sector. Figure 3 shows the value and its respective Moving Average (M.A.) for national (a) sales and (b) inventory of automotive vehicles in units, (c) Gross Domestic Product per capita (GDP per capita), (d) Nominal Interest Rate (NIR), and (e) Nominal Exchange Rate (NER) obtained from the Brazilian Central Bank^{79}. We have used the Brazilian GDP per capita, a metric of economic activity and output by its total population, and consider the monetary worth of goods and services per month, an essential variable indicative of a country’s living standard. The analysis of M.A. shows expected growth for the sales and inventory when the GDP per capita increases and the NIR reduces.
After the introduction of the Real in 1994, Brazil had a substantial influx of international capital leading to a gain in the value of the Real against the U.S. dollar leading to reasonable economic stability. From 1996 to 1998, Fig. 3 shows that the moving average of NIR decreased while NER smoothly increased due to the reduction of the tight control of the exchange rates by the Central Bank of Brazil^{79}. Furthermore, from 1998 to 2002, Brazil faced high inflation and the prospect of political risk due to upcoming elections led to an outflow of capital, high volatility of NIR, and a peak of NER around 2002. These aspects are essential instruments for decisionmaking management. However, the moving average is insufficient to capture trends regarding the cyclic patterns and fluctuations between macroeconomic time series. Therefore, we have developed the MFDCCHM method and employed it as an alternative to understanding the variability, trends, persistences and antipersistences, and dependencies among these macroeconomic indicators and their possible effects on the Brazilian automotive sector.
Figure 4 shows the fluctuation analysis for each pair of time series as a function of the period \(\nu \). We can observe a multifractal regime with a crossover of three regions with different exponents (scaling factors) characteristics of softtostrong variability rates over time. The breaking of the first regime from Region I to Region II, occurs in approximately 15 months and from Region II to Region III in nearly 67 months. These regimes can be crucial to forecast the persistence of autocorrelation and crosscorrelation trends for the pair of time series. The exponents derived from the global analysis for each pair of time series are shown in Tables 3, 4, 5, 6, 7 and 8. We have found positive persistence for the autocorrelation (DFA) of NER in Region I, GDP for Region II, and NER and GDP for Region III. This result is crucial for planning and an efficient decisionmaking process, given that persistence of NER and GPD for seasonal regimes can directly impact sales. The DCCA exponent increases from Region I (antipersistent) to Region III (persistent), except for the DCCA exponent from NER and NIR (Table 8), which decreases from Region I (persistent) to Region III (antipersistent). The latter means a direct relationship exists between the period value \(\nu \) and the detrended crosscorrelation exponent.
Figure 5 shows a local analysis of the raw time series’s fluctuations with the MFDCCHM for six different time series mentioned at the beginning of this section. We have observed that all the maps have shown coefficients with intensities oscillating between − 1 and + 1, besides offering an averaged temporal periodicity that varies according to the adopted scale. Figure 5a shows two possible regimes where credit conditions can be relevant to sales with positive persistence between Sales and NIR from 2008 and periods where it can be irrelevant because the average intensity of \(\sigma \) is closer to 0. We have confirmed the reliability of our approach since the GDP per capita, and Sales in the Brazilian automotive sector, as well as the GPD and NIR, have strong persistence, as shown in Fig. 5b,c. The average intensity of \(\sigma \) on top of Fig. 5d,e shows cyclical patterns of 3 years with stable oscillations and persistence peaks around 2007, 2010, and 2013. Figure 5f shows an overall antipersistence pattern compatible with the argument that unfavorable fluctuations in the NER tend to decrease the prices and possibly increase sales of automotive vehicles in Brazil.
Discussion
We have developed a systematic methodology, namely the Multifractal detrended crosscorrelation heatmaps (MFDCCHM), to expose nonexplicit patterns from timeseries fluctuations with multiple regimes. Our study case explores crosscorrelations between the sales and inventory derived from the Brazilian Automotive sector and growth descriptors such as the gross domestic product (GDP) per capita, the nominal exchange rate (NER), and the nominal interest rate (NIR) equivalent to the Special Settlement and Custody System (Selic). In the first part of this work, we obtained crosscorrelation exponents using a global analysis to estimate the most probable scenarios in the Brazilian automotive sector after 2010. For the local analysis, it was possible to establish periodic intervals where the statistical variables sale and inventory have a substantial positive (window sizes \(0<v<1\)) crosscorrelation. This approach has shown a cyclical pattern of high intensity with approximately three to four years, which coincides with periods near the presidential elections. We have also found cyclical frequencies over several periods through the application of Fourier analysis, where three primary seasonal cycles were identified: (i) semester, (ii) annual, and (iii) 4 years. We have shown that the fluctuations from later periods of 1995 to 2010 provide short to longterm predictability in demand over production lines, which stimulated an adequate performance during the highest and lowest sales season.
The MFDCCHM detect nonlinearities between macroeconomic time series and their effects on sales. The MFDCCHM was able to bring insights into the persistence between the fluctuations. The trend in the correlation between GDP and NIR has a turning point around the year 2000 from a negative to positive persistence in the entire interval of window sizes. The positive persistence coincides with the high stability of the Brazilian economy. We observed a degrading effect around 2008 connected to the global financial crisis. For GDP and NER, we observe negative and positive persistence cycles, which can be interpreted as the link between the commodities prices since de growth of GDP is substantially dependent on the exports that impact the NER. The heatmaps show similar behavior for the NER and NIR correlation. Each time series has significant effects when analyzed with sales, and it can be aimed at examining and validating the results for forecasting sales. The method has also uncovered multifractal regimes with three different exponents (scaling factors) for analyzing pair of macroeconomic time series. In this case, the regimes defined from Region II occur in approximately 15 months, and Region III in nearly 67 months. The exponents derived from the global analysis show positive persistence for NER’s DFA in Region I, GDP for Region II, and NER and GDP for Region III. These persistences show that seasonal regimes can directly impact Brazilian automotive sales. Additionally, the DCCA scaling factor grows from Region I (antipersistent) to Region III (persistent), except for the DCCA exponent from NER and NIR, which decreases from Region I (persistent) to Region III (antipersistent). We have also computed the average intensity of \(\sigma \) as a function of time. The average \(\sigma \) has shown cyclical patterns of 3 years and peaks of positive persistence around 2007, 2010, and 2013. Furthermore, we have found an overall antipersistence pattern compatible with the argument that unfavorable fluctuations in the NER tend to decrease the prices and possibly increase sales of automotive vehicles in Brazil. Therefore, we have confirmed the reliability of the MFDCCHM to study cyclic patterns of time series fluctuations across multiple regimes.
Methods
Detrended fluctuation analysis
We have employed the detrended fluctuation analysis (DFA)^{86,93} to obtain longrange correlations between time series. The signals are mapped to integrated time series \(y_k = \sum _{i=1}^{k} x_i\) and increments \(x_i=y_{k+1} y_k\) with \(i,k ~\epsilon ~\{1,2,...,N\}\), where N represents the total number of records. The procedure is to split the series into \(M_v\) sliding boxes of size v represented by the pair (m,v) where \( 1 \le m \le M_v\). The timeseries fluctuations are computed from the averages and linear trends over boxes m of size v, as shown in Fig. S1a,b (Supporting Information). Additionally, the covariance f(m, v) is computed by subtracting \(y_k\) from the average for each box m according to the following equations:
Finally, we computed the average over the fluctuations \(F_X^2\) considering all mith sliding boxes of size v, where:
where X represent the methods \(X=DFA_0\) and \(X=DFA_1\). These equations are computed recurrently with sliding boxes of different sizes v. We assume the powerlaw \(F_X \approx v^{\alpha }\), where v represent the box size and the scaling factor \(\alpha \) is obtained by linearization \(\log (F_X) X \log (v)\). As a result, we can classify antipersistent and persistent behavior based on the scaling factor \(\alpha \). The tendency can reverse shortly if \(0<\alpha <0.5\). However, due to random effects such as white noise, the integrated series has no autocorrelation if the scaling factor \(\alpha = 0.5\). The tendency remains persistent for \(0.5< \alpha <1.0\), which means the integrated signal continues its prior trend. It is often difficult to determine whether the interference comes from external or internal sources. Therefore, data processing and refactoring are critical to eliminating possible biases, random trends, and masked signals.
Detrended cross correlation analysis
The detrended crosscorrelation analysis (DCCA)^{94} is a generalization of the DFA technique since it takes the longrange crosscorrelation memories of two nonstationary signals with the same size N. Consider two signals \(y_k\) and \({y'_k}\) with N records, and its respective increments \(x_i\) and \({x'_i}\), such that:
where \(k = \{1,2,...,N\}\). First, the integrated series splits into \(M_v\) sliding boxes of size v, where each box is described as (m, v), where \( 1 \le m \le M_v\). The fluctuations f(m, v) are computed with the following equations:
The fluctuations \(F_X\) are derived from the Eq. (4), where the subindex X refers to the methods \(X=DCCA_0,~DCCA_1\) or \(DCCA_1\). The procedure is to compute these averages by varying the size of the boxes for the integrated series. In Eq. (2), the parameter \(\overline{y}_k(m,v)\) represents the average of \(y_k\), where the box (m, v) is constrained to the interval from \(I_{min} (m,v)\) to \(I_{max} (m,v)\). Equation (3), \(p_k (m,v) = a(m,v) z_k + b(m,v)\) is a firstorder polynomial function where the parameters are determined by the method of least squares. This equation represents a linear trend for a specific box represented by the pair of parameters (m, v). The Eqs. (6)–(8), \(\overline{y}_k\) and \(\overline{y}'_k\) represent averages over \(y_k\) and \(y_k'\) by considering a box inside the interval from \(I_{min}(m,v)\) to \(I_{max}(m,v)\). Furthermore, \(p_k(m,v) = a(m,v)z_k + b(m,v)\) and \(p_k'(m,v) = a'(m,v)z_k' + b'(m,v)\) is a first degree polynomial, and the notation \(DCCA_1\) in Eq. (8) represents the absolute value for the local fluctuations of each time series. The fluctuations are represented by the powerlaw \(F_X(v)=v^\lambda \) where the scaling factor \(\lambda \) measures the crosscorrelations between two signals.
Spectral analysis
The Discrete Fourier Transform (DFT), considering N terms, is given by:
where \(0 \le n \le N\) and \(0 \le m \le N\) with increments n and m which are associated with the changes in the interval \(\Delta {m}=\frac{1}{N\Delta {n}}\). The DFT is a powerful technique to assess frequency anomalies. We have used the amplitude and power spectrum with the following equation:
The power spectrum of a random time series does not show any spectral structure because it is constant. When analyzing the spectra of any time series, our primary focus is to detect and interpret the peaks or anomalies that may exist and their respective frequencies. Additionally, we can use specific cases of the power spectrum to model attributes and obtain a proportionality factor of the power spectrum with the following equation:
where \(y=\log [P(f)]\), \(x = \log (f)\), and the coefficients are associated with the spectral exponent.
Multifractal detrended crosscorrelation heatmaps
The crosscorrelation coefficient (CCC) is a critical factor that quantifies the crosscorrelation between two nonstationary signals^{87}. The CCC is defined for each window of size v with the following ratio:
where \(\sigma _{DCCA_1}(v)\) is a dimensionless quantity that varies in the interval \(1 \le \sigma _{DCCA_1} \le 1\). Similar to the standard correlation coefficient, the threshold \( \sigma _{DCCA_1} = 1\) represent the maximum crosscorrelation, \( \sigma _{DCCA_1} = 0\) indicates nocorrelation, while \( \sigma _{DCCA_1} = 1\) characterizes the maximum anticrosscorrelation. The MFDCCHM relies on computing the DCCA coefficient for multiple windows of size v using a subseries of sliding boxes with size of up to 5% of the entire series, similar to moving average, to observe crosscorrelation patterns between the time series for different temporal scales in one single map. This map can also be constructed for a configurational space (spatial/temporal scale). For instance, we can calculate whether a high crosscorrelation is valid for all scales or if any intensity change exists for any given scale. The overall sampling of DCCA for multiple time steps and windows of size v can help unveil potential cyclical patterns and their consistency. We have also estimated and plotted the average sampling of DCCA over all possible windows of size v on top of each crosscorrelation heatmap to visualize the trends better.
Data availability
The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.
References
Beinhocker, E. D. The Origin of Wealth: Evolution, Complexity, and the Radical Remaking of Economics (Harvard Business Press, 2006).
Holland, J. H. & Miller, J. H. Artificial adaptive agents in economic theory. Am. Econ. Rev. 81, 365–370 (1991).
Page, S. & Miller, J. H. Complex Adaptive Systems: An Introduction to Computational Models of Social Life (Princeton University Press, 2009).
Kauffman, S. A. et al. The Origins of Order: Selforganization and Selection in Evolution (Oxford University Press, 1993).
Krugman, P. How the economy organizes itself in space: A survey of the new economic geography. In The Economy as an Evolving Complex System II (ed. Arthur, W. B.) 239–262 (CRC Press, 2018).
Krugman, P. Complex landscapes in economic geography. Am. Econ. Rev. 84, 412–416 (1994).
Schelling, T. C. Micromotives and Macrobehavior (WW Norton & Company, 2006).
Hidalgo, C. A. Economic complexity theory and applications. Nat. Rev. Phys. 3, 92–113 (2021).
Zunino, L., Bariviera, A. F., Guercio, M. B., Martinez, L. B. & Rosso, O. A. On the efficiency of sovereign bond markets. Physica A 391, 4342–4349 (2012).
Rodrik, D. Where are we in the economics of industrial policies? Front. Econ. China 14, 3 (2019).
Mazzucato, M. The entrepreneurial state. Soundings 49, 131–142 (2011).
Romer, P. M. Endogenous technological change. J. Polit. Econ. 98, S71–S102 (1990).
Warsh, D. Knowledge and the Wealth of Nations: A Story of Economic Discovery (WW Norton & Company, 2006).
Aghion, P. et al. Endogenous Growth Theory (MIT Press, 1998).
Howitt, P. Endogenous growth theory. In Economic Growth (ed. Howitt, P.) 68–73 (Springer, 2010).
Kitt, R. Complex endogenous growth model and its applications. Res. Econ. Bus. Central Eastern Eur. 8, 1 (2016).
Sequeira, T. N., Gil, P. M. & Afonso, O. Endogenous growth and entropy. J. Econ. Behav. Organ. 154, 100–120 (2018).
Gao, J. & Zhou, T. Quantifying china’s regional economic complexity. Physica A 492, 1591–1603 (2018).
Poncet, S. & de Waldemar, F. S. Product relatedness and firm exports in China1. World Bank Econ. Rev. 29, 579–605 (2013).
Chen, Z., Poncet, S. & Xiong, R. Interindustry relatedness and industrialpolicy efficiency: Evidence from China’s export processing zones. J. Comp. Econ. 45, 809–826 (2017).
Dordmond, G., de Oliveira, H. C., Silva, I. R. & Swart, J. The complexity of green job creation: An analysis of green job development in Brazil. Environ. Dev. Sustain. 23, 723–746 (2021).
Erkan, B. & Yildirimci, E. Economic complexity and export competitiveness: The case of Turkey. Procedia Soc. Behav. Sci. 195, 524–533 (2015).
Gonzalez, A., Ortigoza, E., Llamosas, C., Blanco, G. & Amarilla, R. Multicriteria analysis of economic complexity transition in emerging economies: The case of Paraguay. Socioecon. Plann. Sci. 68, 100617 (2019).
Bishop, A. & MateosGarcia, J. Exploring the link between economic complexity and emergent economic activities. Natl. Inst. Econ. Rev. 249, R47–R58 (2019).
Arthur, W. B. Foundations of complexity economics. Nat. Rev. Phys. 3, 136–145 (2021).
Lucas, R. E. Jr. Asset prices in an exchange economy. Econometrica 46, 1429–1445 (1978).
Brock, W., Lakonishok, J. & LeBaron, B. Simple technical trading rules and the stochastic properties of stock returns. J. Financ. 47, 1731–1764 (1992).
Waldrop, M. M. Complexity: The Emerging Science at the Edge of Order and Chaos (Simon and Schuster, 1993).
Holland, J. H. Complexity: A Very Short Introduction (Oxford University Press, 2014).
Thurner, S., Hanel, R. & Klimek, P. Introduction to the Theory of Complex Systems (Oxford University Press, 2018).
Arthur, W. B. Complexity and the economy. In Handbook of Research on Complexity (ed. Rosser, B.) (Edward Elgar Publishing, 2009).
Arthur, W. B., Durlauf, S. N. & Lane, D. A. Process and emergence in the economy. In Complexity and the Economy (ed. Arthur, W. B.) 89–102 (Springer, 2015).
Arthur, W. B., Beinhocker, E. & Stranger, A. Complexity economics: An introduction. In Proc. Santa Fe Institute Fall Dialogue, 13–25 (2020).
Axtell, R. L. What economic agents do: How cognition and interaction lead to emergence and complexity. Rev. Austrian Econ. 20, 105–122 (2007).
Colander, D. The Complexity Vision and the Teaching of Economics (Edward Elgar Publishing, 2000).
Arthur, W. B. et al. Increasing Returns and Path Dependence in the Economy (University of Michigan Press, 1994).
Arthur, W. B. The Economy as an Evolving Complex System II (CRC Press, 2018).
Weaver, W. Complexity and science. Am. Sci. 36, 536 (1948).
PastorSatorras, R. & Vespignani, A. Patterns of complexity. Nat. Phys. 6, 480–481 (2010).
Rosser, J. B. Jr. Emergence and complexity in Austrian economics. J. Econ. Behav. Organ. 81, 122–128 (2012).
Albin, P. S. The metalogic of economic predictions, calculations and propositions. Math. Soc. Sci. 3, 329–358 (1982).
Rosser, J. B. Foundations and Applications of Complexity Economics (Springer, 2021).
Menger, K. On the origin of money. Econ. J. 2, 239–255 (1892).
Hayek, F. A. Individualism and Economic Order (University of Chicago Press, 1980).
Hayek, F. A. The Sensory Order: An Inquiry into the Foundations of Theoretical Psychology (University of Chicago Press, 2012).
Hayek, F. A. The theory of complex phenomena. In Critical Approaches to Science & Philosophy with a New Introduction (ed. Bunge, M.) 332–349 (Routledge, 2018).
Koppl, R. Austrian economics at the cutting edge. Rev. Austrian Econ. 19, 231–241 (2006).
Koppl, R. Complexity and Austrian economics. In Handbook of Research on Complexity (ed. Rosser, B.) (Edward Elgar Publishing, 2009).
Rosser, J. B. Computational and dynamic complexity in economics. In Handbook of Research on Complexity (ed. Rosser, B.) (Edward Elgar Publishing, 2009).
Lewis, P. Emergent properties in the work of Friedrich Hayek. J. Econ. Behav. Organ. 82, 368–378 (2012).
Stoyanova, T. & Angelova, M. Impact of the internal factors on the competitiveness of business organizations. In 2018 International Conference on High Technology for Sustainable Development (HiTech), 1–3 (IEEE, 2018).
Bartram, S. M. What lies beneath: Foreign exchange rate exposure, hedging and cash flows. J. Bank. Financ. 32, 1508–1521 (2008).
Tacchella, A., Mazzilli, D. & Pietronero, L. A dynamical systems approach to gross domestic product forecasting. Nat. Phys. 14, 861–865 (2018).
Voitchovsky, S. Does the profile of income inequality matter for economic growth? J. Econ. Growth 10, 273–296 (2005).
Tang, C. S. Robust strategies for mitigating supply chain disruptions. Int. J. Log Res. Appl. 9, 33–45 (2006).
Kumar, R. R., Stauvermann, P. J. & Wernitz, F. The capitalist spirit and endogenous growth. J. Risk Financ. Manag. 15, 27 (2022).
Scheffer, M. et al. Anticipating critical transitions. Science 338, 344–348 (2012).
Padgett, J. F. & Powell, W. W. (eds) The Emergence of Organizations and Markets (Princeton University Press, 2012).
Watts, D. J. A simple model of global cascades on random networks. Proc. Natl. Acad. Sci. 99, 5766–5771 (2002).
Bouchaud, J.P. The (unfortunate) complexity of the economy. Phys. World 22, 28 (2009).
LeBaron, B., Arthur, W. B. & Palmer, R. Time series properties of an artificial stock market. J. Econ. Dyn. Control 23, 1487–1516 (1999).
Cont, R. Empirical properties of asset returns: Stylized facts and statistical issues. Quant. Financ. 1, 223 (2001).
Podobnik, B., Horvatic, D., Petersen, A. M. & Stanley, H. E. Crosscorrelations between volume change and price change. Proc. Natl. Acad. Sci. 106, 22079–22084 (2009).
BenSalha, O. & Mokni, K. Detrended crosscorrelation analysis in quantiles between oil price and the US stock market. Energy 242, 122918 (2022).
Zebende, G. F. DCCA crosscorrelation coefficient: Quantifying level of crosscorrelation. Physica A 390, 614–618 (2011).
Brito, A. D. A., Araújo, H. A. D. & Zebende, G. F. Detrended multiple crosscorrelation coefficient applied to solar radiation, air temperature and relative humidity. Sci. Rep. 9, 1–10 (2019).
Peng, C.K. et al. Quantifying fractal dynamics of human respiration: Age and gender effects. Ann. Biomed. Eng. 30, 683–692 (2002).
França, L. G. S. et al. Fractal and multifractal properties of electrographic recordings of human brain activity: Toward its use as a signal feature for machine learning in clinical applications. Front. Physiol. 9, 1767 (2018).
Di Matteo, T. Multiscaling in finance. Quant. Financ. 7, 21–36 (2007).
Di Matteo, T., Aste, T. & Dacorogna, M. Longterm memories of developed and emerging markets: Using the scaling analysis to characterize their stage of development. J. Bank. Financ. 29, 827–851 (2005).
Kantelhardt, J. W. et al. Multifractal detrended fluctuation analysis of nonstationary time series. Physica A 316, 87–114 (2002).
Ruan, Q., Zhou, M., Yin, L. & Lv, D. Hedging effectiveness of Chinese treasury bond futures: New evidence based on nonlinear analysis. Physica A 565, 125553 (2021).
Ruan, Q., Zhang, S., Lv, D. & Lu, X. Financial liberalization and stock market crosscorrelation: MFDCCA analysis based on shanghaihong kong stock connect. Physica A 491, 779–791 (2018).
Horvatic, D., Stanley, H. E. & Podobnik, B. Detrended crosscorrelation analysis for nonstationary time series with periodic trends. Europhys. Lett. 94, 18007 (2011).
Wang, D., Podobnik, B., Horvatić, D. & Stanley, H. E. Quantifying and modeling longrange cross correlations in multiple time series with applications to world stock indices. Phys. Rev. E 83, 046121 (2011).
Kristoufek, L. Detrended fluctuation analysis as a regression framework: Estimating dependence at different scales. Phys. Rev. E 91, 022802 (2015).
Duan, W.Q. & Stanley, H. E. Crosscorrelation and the predictability of financial return series. Physica A 390, 290–296 (2011).
Pereira, E. J. D. A. L., Ferreira, P. J. S., da Silva, M. F., Miranda, J. G. V. & Pereira, H. Multiscale network for 20 stock markets using DCCA. Physica A 529, 121542 (2019).
Central Bank of Brazil. Sistema Gerenciador de Séries Temporais. https://www3.bcb.gov.br/sgspub.
Rolim, Z. E., de Oliveira, R. R. & de Oliveira, H. M. Industrial concentration of the Brazilian automobile market and positioning in the world market. Preprint at http://arxiv.org/abs/1908.09686 (2019).
Hülsmann, M., Borscheid, D., Friedrich, C. M. & Reith, D. General sales forecast models for automobile markets and their analysis. Trans. Mach. Learn. Data Min. 5, 65–86 (2012).
Subramanian, K., Othman, M. B., Sokkalingam, R. & Thangarasu, G. A new approach for forecast sales growth in automobile industry. Int. J. Sci. Technol. Res. 9, 2872–2875 (2020).
Shakti, S. P., Hassan, M. K., Zhenning, Y., Caytiles, R. D. & Iyenger, N. Annual automobile sales prediction using arima model. Int. J. Hybrid Inf. Technol. 10, 13–22 (2017).
Sharma, R. & Sinha, A. K. Sales forecast of an automobile industry. Int. J. Comput. Appl. 53, 12 (2012).
Vartanian, P. R. et al. Determinants of demand for automobiles in Brazil: An econometric analysis in the period 2012–2017. Int. J. Econ. Financ. 12, 1–1 (2020).
Peng, C.K. et al. Mosaic organization of DNA nucleotides. Phys. Rev. E 49, 1685 (1994).
Marinho, E., Bassrei, A. & Andrade, R. F. Extended methodology for DFA and DCCA: Application of automatic search procedure and correlation map to the WeierstrassMandelbrot functions. Anais da Acad. Bras. Ciências 93, 859 (2021).
Marinho, E., Sousa, A. & Andrade, R. F. S. Using detrended crosscorrelation analysis in geophysical data. Physica A 392, 2195–2201 (2013).
Guedes, E. & Zebende, G. Dcca crosscorrelation coefficient with sliding windows approach. Physica A 527, 121286 (2019).
Guedes, E., da Silva Filho, A. & Zebende, G. Detrended multiple crosscorrelation coefficient with sliding windows approach. Physica A 574, 125990 (2021).
Ashkenazy, Y. et al. Magnitude and sign correlations in heartbeat fluctuations. Phys. Rev. Lett. 86, 1900 (2001).
Matia, K., Ashkenazy, Y. & Stanley, H. E. Multifractal properties of price fluctuations of stocks and commodities. Europhys. Lett. 61, 422 (2003).
Hu, K., Ivanov, P. C., Chen, Z., Carpena, P. & Eugene Stanley, H. Effect of trends on detrended fluctuation analysis. Phys. Rev. E 64, 011114 (2001).
Podobnik, B. & Stanley, H. E. Detrended crosscorrelation analysis: A new method for analyzing two nonstationary time series. Phys. Rev. Lett. 100, 084102 (2008).
Acknowledgements
The calculations were performed with resources provided by the Swedish National Infrastructure for Computing (SNIC), Project SNIC 2022/22843, at the National Supercomputer Center at Linköping University (Tetralith).
Funding
Open access funding provided by Linköping University.
Author information
Authors and Affiliations
Contributions
All authors contributed to the ideas and designing the study. P.R.B.M.J., and K.B.L., E.B.S.M. and J.L.L.J.S. performed the study, E.B.S.M. and J.L.L.J.S. wrote the paper. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
de Melo Barros Junior, P.R., Bunge, K.L., Serravalle Reis Rodrigues, V.H. et al. Multifractal detrended crosscorrelation heatmaps for time series analysis. Sci Rep 12, 21655 (2022). https://doi.org/10.1038/s4159802226207w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s4159802226207w
This article is cited by

Wavelet gated multiformer for groundwater time series forecasting
Scientific Reports (2023)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.