Skip to content
All library documents

Ranking Candidate Pairs with Rank Correlation and Price Distance

Code Stratmill research code

Summary

The module describes a first-stage screening method for pairs trading strategies built around copulas. It compares every two-asset combination in a supplied price panel and ranks the pairs using Spearman rank correlation, Kendall rank correlation, or the negative Euclidean distance between normalized price series. The distance score is negated so pairs with smaller distances rank higher. Users can retain a limited number of top-ranked pairs.

The documentation notes that Spearman's method is faster but more sensitive to outliers and tied ranks than Kendall's, while the two correlation measures can still select pairs whose normalized prices diverge. Missing observations need treatment: forward filling is recommended to reduce look-ahead risk, whereas linear interpolation can introduce it. This is a candidate-selection utility, not a complete trading system; it provides no evidence of profitability, and the ranking scores alone do not establish cointegration, stable dependence, or profitable entry and exit rules.

Key ideas

  • The selector ranks all asset combinations by Spearman correlation, Kendall correlation, or normalized-price distance.
  • Negating Euclidean distance puts the closest normalized price paths near the top of the ranking.
  • Spearman is faster, while Kendall is described as less affected by outliers and tied ranks.
  • Forward filling missing values is recommended to avoid the look-ahead risk of linear interpolation.
  • A high ranking alone does not establish a profitable pairs trading relationship.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.