## 3 Generalized Causality Algorithm
### Simulation Study
Since we have two time series with identical time period, the concept of causal paths, like any approach in this field of research, requires a burn-in period and a burn-out period. Summarizing, our algorithm performs very well for the simulated time series \(x\) and \(y\). Whenever simulated time series generate remarkable results it arouses the suspicion of data snooping. Therefore, we conduct a large-scaled simulations study to validate the robustness of our generalized causality algorithm. According to [9], this manuscript evaluates the performance of the generalized causality algorithm based on a two-stage procedure. First, the time series \(X\) and \(Y\) are generated whereby we vary ceteris paribus the sample size \(N\), the coefficient \(a\), and the noise level \(f\)--the other parameters remain the same because they do not directly influence the dependency between the two time series. Second, we apply our algorithm to identify the optimal causal path and to calculate the corresponding total cost. Following [63; 64; 65], we conduct 1000 repetitions for each parameter constellation. Figure 6 shows the resulting boxplots of the average total costs \(\overline{c}_{p^{*}}(x,y)\) for varying the parameters \(N\), \(a\), and \(f\). Figure 4: Local costs and optimal causal path (solid line) of time series \(x\) and \(y\). The large bars on the x-axis represent structural breaks with corresponding 95 percent confidence intervals (small bars). Figure 5: Estimated lag between time series \(x\) and \(y\). The estimated lag is the difference between the index of \(x\) and the index of \(y\). First of all, we notice that an increasing sample size \(N\) results in lower average total costs \(\bar{c}_{p^{*}}(x,y)\)--this fact is not surprising as outliers in the data set have less impact. At the same time, the total and interquartile ranges decrease towards zero, indicating predictive accuracy and robustness. As known from classical time series analysis, we achieve stable estimates from a data set of about 100 per lead-lag phase. In addition, average total costs \(\bar{c}_{p^{*}}(x,y)\) decline for ascending parameter \(a\) due to the fact that the dependency between both time series becomes stronger. The case \(a=0\) possesses only misjudgements since this parameter constellation does not imply a direct relationship between the time series \(x\) and \(y\). Finally, we observe that increasing \(f\) causes rising average total costs \(\bar{c}_{p^{*}}(x,y)\). Furthermore, the boxplots show larger differences both between maximum and minimum as well as between upper and lower quartile. If \(\sigma_{X}^{2}\) and \(\sigma_{Y}^{2}\) are at a similar level, we find a high precision of the estimations. In summary, the generalized causality algorithm outperforms in the vast majority of parameter constellations in terms of efficiency, robustness, and feasibility. Of course, the optimal causal algorithm is not always able to estimate relation between two time series perfectly. Figure 7 shows two extreme situations where the algorithm comes up against limits. On the left, we observe a step function that represents an unusual curve function. In this case, the algorithm does not identify plausible relationships between \(x\) and \(y\). On the right side, we get two optimal warping paths as a result of identical costs. Therefore, the concept does not provide an answer to the question of how two rank these optimal paths. Figure 6: Boxplots of the average total costs \(\bar{c}_{p^{*}}(x,y)\) for varying the length of the time series \(N\) (**first row**), the coefficient \(a\) (**second row**), and the amount of noise \(f\) (**third row**).