Economic Cycle Synchronization with Dynamic Time Warping

-

 — periods of expansion and contraction in output or financial markets — lie at the guts of macroeconomic evaluation. When countries share a typical currency, as within the eurozone, synchronized cycles are essential for a one-size-fits-all monetary policy to work. This concept was first put forth by Robert Mundell (1961), the daddy of Optimum Currency Area theory. If, for instance, Germany is in crisis and Spain is booming, as was the case after the turn of the millennium, the European Central Bank (ECB) cannot set the fitting rate of interest for each countries. A lower rate of interest would result in overheating the economy in Spain, and the next rate of interest would exacerbate the crisis in Germany.

Traditional measures of cycle synchronization often depend on easy correlations. But what happens if two economies are following very similar business or financial patterns, but one is just “ahead” or “behind” the opposite by a number of quarters?

Enter Dynamic Time Warping (DTW), a way originally developed for speech recognition but increasingly popular in data science for comparing time series with similar shapes yet different timings. In our paper, “Warpings in Time: Business and Financial Cycle Synchronization within the Euro Area” (Bugdalle & Pfeifer, 2025), we construct composite indices of euro-area business and financial cycles after which use DTW to measure how closely these cycles align across countries. Our Optimal Currency Area (OCA) monitor that makes it possible to trace cycle divergence in real time — and to identify phase lags without penalizing them as harshly as traditional metrics would.

Capturing phase shifts and amplitude differences

Most existing studies of cycle synchronization do three things that might be problematic:

  1. Static treatment of cycles: For instance, trend-extraction methods (just like the HP filter) remove the cyclical components from the info. Even in additional complex frameworks — comparable to state-space models that do allow for cyclicality — the cycle frequency itself often stays fixed.
  2. Use of the mean: Standard dispersion indicators like variance or standard deviation all the time misinterpret the common because the “optimum”. In other words, distances aren’t measured between pairs of cycles, but relative to a mean or reference cycle. This obscures multimodality. As an illustration, if our cycles actually fall into two (or more) well-separated clusters, the centroid will lie between them — in a region where no real data exist — and all of the cycle-to-mean distances will look moderate, though cycles from different clusters are literally extremely distant.
  3. Phase shifts: Most distance measures are Euclidean. For instance, two cycles could also be barely shifted in time yet still perfectly synchronized. This point could also be particularly necessary for monetary policy. Many OCA indicators find yourself overstating divergence, especially in periods when economies are “nearly” in sync but offset by a number of months or quarters.

Dynamic Time Warping (DTW) for cycle synchronization

DTW is a non-parametric algorithm that finds the optimal alignment (or “warping”) between two time series by allowing one series to stretch or compress in time to match the opposite. In our case, DTW is applied to every form of the smoothed cycle indices, meaning one measure of similarity is estimated for every form of cycle. Inside each cycle category, DTW computes the alignment path for every pair of nations and that minimizes the cumulative distance between two cycles:

[D(mathbf{x}_i, mathbf{x}_j) = min{pi_{ij}} sum_{(t, s) in pi_{ij}} left| mathbf{x}_{i,t} – mathbf{x}_{j,s} right|^2,]

where xi and xj is the smoothed cycle values at time and for countries and , respectively. The resulting distance (xi, xj) captures the degree of similarity, with smaller values indicating closer alignment of the 2 cycles. To be sure that the DTW comparison reflects the timing of cyclical movements, the alignment is performed over an area window (Sakoe-Chiba Band) defined by the common cycle duration. Finally, to aggregate all pairwise DTW distances into one euro‐area indicator, we compute a GDP‐weighted mean of (xi, xj). This weighted average is the divergence index shown below (Figure 3).

Key advantages of DTW with Sakoe-Chiba Bands in an economic-cycle context:

  • Phase-invariance. Small lags or leads don’t mechanically trigger large divergence scores. A one-quarter shift won’t severely penalize the space if the underlying patterns remain almost an identical.
  • Shape sensitivity. DTW preserves details about amplitude, trend reversals, and the relative “shape” of booms and busts. Two countries that each experience a pointy credit boom — even when one is ahead by 1 / 4 — will still be deemed highly similar.
  • Time-varying flexibility. By applying DTW over a rolling window (e.g., an area band of ±5 quarters for business cycles, ±6 quarters for financial cycles), the tactic adapts to changing cycle durations without imposing a hard and fast frequency.

Constructing composite business and financial cycles

For example DTW’s power, we first construct two composite cycle indices for every euro-area country:

  1. Business Cycle Index: Quarterly real GDP growth, private consumption growth, gross fixed capital formation growth, and unemployment growth.
  2. Financial Cycle Index: Quarterly real credit growth (bank lending), house-price growth, stock-price growth, and government bond-price growth.

Using a non-parametric approach introduced by Schüler et al. (2020), we extract each country’s underlying cycle — an index that alternates between 0 and 1 to reflect expansionary versus contractionary phases, but with time-varying amplitude and duration. This avoids rigid detrending and keeps turning points intact.

Figures 1 and a pair of

Note: Indices of business cycle and financial cycles as deviations from their historical median growth — 0.5 corresponds to the long-term median growth rate of every index. The composite financial cycle combines quarter-on-quarter growth in credit, house prices, equity prices and bond prices — showing each the raw (unfiltered) series and the band-pass-filtered series using country-specific frequency bands. The filtered business cycle combines quarter-on-quarter growth in GDP, consumption, investment, and unemployment

From pairwise DTW distances to an aggregate divergence monitor

Once each country’s business and financial cycles are estimated, we compute pairwise DTW distances between every pair of nations (e.g., Germany vs. Spain, France vs. Italy, etc.). To form a single euro-area “divergence index,” they take a GDP-weighted average of all pairwise DTW distances. The next index value means greater divergence across national cycles; a lower value means tighter synchronization.

Figure 3

Note: The figure shows quarterly measures of cycle divergence within the euro area from 1985Q1–2023Q4. The dashed purple line plots the mean dynamic-time-warping (DTW) distance across all pairwise comparisons of national financial-cycle indices; the dashed blue line shows the equivalent for business-cycle indices. The solid black line is the GDP-weighted average of those two series, our composite Divergence Monitor. Shaded grey bands mark OECD recession periods for the eurozone. Higher values indicate greater divergence across member-state cycle

Once you plot this series (Figure 3), several patterns emerge:

  • Nineties convergence: Business-cycle divergence fell sharply as convergence criteria under Maastricht took hold.
  • Pre-2008 financial divergence: Financial cycles actually diverged well before the worldwide financial crisis — that peak in divergence is nearly invisible to correlation or amplitude-based metrics.
  • Post-2010 re-alignment: ECB unconventional monetary policy (OMT, QE) coincided with convergence in each business and financial cycles.
  • Late-2021 uptick: For the reason that COVID-19 shock, divergence has begun creeping back up, as some countries likely recovered faster than others.

Takeaways for data scientists and economists

  • Flexible pattern matching: When comparing economic (or any) time series which will share the identical “shape” but are out of phase, DTW is usually a greater similarity measure than Euclidean distance or straightforward correlation.
  • Handling non-stationary frequencies: Business and financial cycles don’t are available in neat, fixed-length packages. DTW’s ability to adapt to various cycle durations preserves real-world turning points.

Involved in exploring the code or following the live “Divergence Monitor” for the euro area? Take a look at https://github.com/Moritz-Pfeifer/Divergence_Monitor for data, Python notebooks, and https://moritz-pfeifer.github.io/eurozone-divergence-monitor/ for an interactive visualization that helps you to see how synchronization has evolved for the reason that Nineteen Eighties.

References:

Bugdalle, T., Pfeifer, M. (2025). Warpings in time: Business and financial cycle synchronization within the euro area. preprint. Link to working paper

Sakoe, H., Chiba, S. (1978). Dynamic programming algorithm optimization for spoken word recognition. (1), 43–49. Link to paper

Schüler, Y. S., P. P. Hiebert, and T. A. Peltonen (2020). Financial cycles: Characterisation and real-time measurement. Journal of International Money and Finance 100. Link to paper

Mundell, R. (1961). A theory of optimal currency areas. (4), 657–665. Link to paper

ASK ANA

What are your thoughts on this topic?
Let us know in the comments below.

0 0 votes
Article Rating
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Share this article

Recent posts

0
Would love your thoughts, please comment.x
()
x