Jun 2, 2023
Hi Chao, thanks for your comment and nice call out! Taking a closer look at the code, there is indeed some "peaking ahead".
The W-distances plotted at time index i include information from time indexes (i-20 to i+21). This can be corrected by updating the code that generates the plot.