## 1 Introduction  
Measuring similarities of time series possesses a long tradition in literature as well as in practice. Particularly in the fields of economics and finance, research aims at identifying sequences of data points that show a strong relationship over a historical period. The vast majority of existing studies utilize classic approaches to achieve this goal [1; 2; 3; 4; 5; 6]. Concretely, these manuscripts quantify the similarity between two time series \(x=(x(1),...,x(N))\in\mathbb{R}^{N}\) and \(y=(y(1),...,y(N))\in\mathbb{R}^{N}\) by the distance  
\[d(x,y)=\sum_{i=1}^{N}d(x(i),y(i)), \tag{1}\]  
where \(d(x(i),y(i))\) specifies the distance at fixed time \(i\) (\(i\in\{1,\ldots,N\}\)). Due to the definition, the measure outlined in Equation (1) is very sensitive to time shifts and misalignments--it is impossible to determine the dependency of two time series with a time delay [7]. This major disadvantage is eliminated by a model that allows an elastic adjustment of the time axis to identify similar but phase-shifted sequences. For this purpose, the co-moving between the time series \(x=(x(1),...,x(N))\in\mathbb{R}^{N}\) and \(y=(y(1),...,y(M))\in\mathbb{R}^{M}\) is quantified by the cost measure  
\[c(x,y)=\sum_{i=1}^{l}c(x(n_{i}),y(m_{i})), \tag{2}\]where \(c\) defines the local cost and \(I\in\{\max(N,M),\ldots,N+M-1\}\). The concept of dynamic time warping represents an efficient technique for determining the most appropriate non-linear mapping by minimizing the measure outlined in Equation (2). Following [8; 9], this technique is able to handle time series of different lengths as well as being robust against migration, amplitude changes, and noise in the data. Due to its outstanding flexibility and adaptability, research studies use dynamic time warping in a wide range of application areas. Initially, it is employed in speech recognition to eliminate non-linear time shifts between two speech patterns as a result of different pronunciation [10; 11; 12]. Recently, dynamic time warping is used mainly in the field of gesture recognition [13; 14], chemistry [15; 16], medicine [17; 18; 19], and finance [9; 20; 21]. Surprisingly, there exists only one academic study that provides a non-parametric methodology to avoid the criticism of arbitrariness and data sniffing: ref. [9] determines the optimal lead-lag structure between two time series under the assumption that there is no structural break in the data set. Following [22; 23; 24; 25; 26], regime switching models become increasingly important because they allow structural changes to be taken into account--this procedure leads to lower prediction errors due to more stable parameters. In recent years, there has been a rapid development in similar fields of dynamic time warping. Measuring the impact of high frequency data on low frequency by a class of mixed frequency VAR models is presented by [27]. The manuscript of [28] compares mixed-data sampling and mixed frequency VAR approaches to model specification in the presence of mixed-frequency data. In the context of model selection and combination, the study of [29] considers the properties of weighted linear combinations of several prediction models, or linear pools, which are evaluated using the conventional log predictive scoring rule. In similar context, ref. [30] estimate time-varying weights in linear prediction pools and use it to investigate the relative forecasting performance with and without financial frictions. Finally, dynamic Bayesian predictive synthesis in time series forecasting is provided by developing a novel class of dynamic latent factor model [31; 32]. This manuscript extends the existing research in several aspects. First, we introduce a new algorithm, which captures time-varying lead-lag structures between two time series. Therefore, we enlarge [9] by allowing structural breaks. In contrast to the existing literature, e.g., polynomial time algorithms, we use a parameter-free procedure.