Skip to content
All library documents

H-Construction Statistics for Pair Selection and Trading Signals

Code Stratmill research code

Summary

The document implements an H-construction approach for analyzing price series, based on a cited study of statistical variability in spreads. It converts a series into Kagi-like turning points or Renko-like threshold steps. The H-inversion statistic counts confirmed direction changes, while H-distance sums powered vertical moves between turning points; H-volatility divides that distance by the inversion count. At confirmation points, the implementation can emit either contrarian or momentum signals.

For pair selection, it forms log-price differences for every asset pair, uses each spread's standard deviation as the construction threshold, and ranks pairs by inversion count. It can return highest- or lowest-ranked pairs and optionally avoid reusing assets. The code describes a method, not evidence of profitability: it provides no empirical results, transaction costs, or risk controls. Pair selection also depends on the chosen sample and threshold, and the implementation excludes pairs with missing observations or nonpositive prices.

Key ideas

  • H-construction represents a price series using Kagi-style reversals or Renko-style threshold steps.
  • H-inversion counts confirmed changes in direction, while H-volatility scales powered turning-point distances by that count.
  • Confirmed turning points can produce contrarian or momentum signals.
  • The pair selector ranks log-price spreads by inversion count using spread standard deviation as the threshold.
  • The implementation provides no evidence of profitability or accounting for trading costs.

Tags

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