Understanding Kendall Correlation in Time Series Analysis
Mastering a Key Concept in Correlation Analysis
When analyzing relationships in time series data, correlation is often the first thing we reach for. While Pearson correlation is the most common, it’s not always the best choice—especially when your data isn’t normally distributed or contains outliers. That’s where Kendall correlation comes in.
What Is Kendall Correlation?
Kendall correlation (specifically, Kendall’s Tau) measures the strength and direction of association between two variables. Unlike Pearson, which looks at linear relationships and assumes normality, Kendall's Tau is a rank-based correlation. It evaluates how well the order of values in one variable aligns with the order in another.
In simple terms:
If both variables increase together (or decrease together), Kendall Tau is positive.
If one increases while the other decreases, it’s negative.
If there’s no consistent pattern, it’s close to zero.
Kendall’s Tau ranges from -1 (perfect inverse agreement) to +1 (perfect agreement), with 0 meaning no association. Time series data often violate assumptions that traditional correlation methods rely on:
They may contain non-linear trends.
They often include outliers.
They can be non-stationary, meaning their statistical properties change over time.
Kendall correlation is robust to outliers and doesn’t assume a specific distribution. It’s a solid choice when you care more about directional trends than precise values.
For example, suppose you’re analyzing two financial assets over time. Even if their prices don't follow the same linear path, Kendall Tau can reveal whether they tend to move in the same direction.
Here’s a simple example in Python to calculate the Kendall correlation between two time series ts1 and ts2.
import pandas as pd
from scipy.stats import kendalltau
# Create two synthetic time series
ts1 = pd.Series([10, 15, 14, 18, 20])
ts2 = pd.Series([8, 12, 11, 16, 18])
tau, p_value = kendalltau(ts1, ts2)
print(f"Kendall Tau: {tau:.3f}, p-value: {p_value:.3f}")
Kendall correlation, like all correlation measures, doesn’t account for temporal dependencies—meaning it ignores the order of observations in time. It simply compares rankings between two time series as a whole. This is fine if you’re looking at overall comovement, but not if you're interested in lead-lag relationships, causality, or delayed effects.
Also, if your data has autocorrelation (which most time series do), the significance of Kendall’s Tau might be overstated unless you adjust for that. Bootstrapping or using block permutation methods can help correct this.
When to Use Kendall (vs. Spearman or Pearson)
I generally use Pearson when data is linear and normally distributed.
I typically use Spearman if I’m interested in monotonic relationships but the data may have outliers or non-linearities.
I occasionally use Kendall when I want a more conservative, rank-based estimate of correlation—especially in small samples or noisy data.
Kendall correlation is a useful tool for measuring association in time series data, especially when robustness and simplicity are priorities. It’s not a silver bullet—it won’t detect time-lagged relationships or handle autocorrelation on its own—but it can give you a solid read on whether two variables tend to move together over time.
Check out my newsletter that sends weekly directional views every weekend to highlight the important trading opportunities using a mix between sentiment analysis (COT report, put-call ratio, etc.) and rules-based technical analysis.