[WITH CODE] Data transformations: Data shape and predictive features
Alternative data shape transformation
Before you begin, remember that you have an index with the newsletter content organized by clicking on “Read the newsletter index” in this image.
From raw price paths to structurally aligned features
Data-shape transformation represents the first structural choice in model construction rather than a routine cleanup step. Every transformation operator selects specific variations in a market path while suppressing others, determining whether a model observes genuine economic signals or sample-specific noise. Aligning these operators with the strategy’s target holding period prevents false statistical stability and preserves the underlying alpha.
What’s inside:
Reframing data transformations: Treating transformations as active structural choices ensures the mathematical shape of the input feature matches the economic mechanism behind the trade.
Recognizing transformation risks: Indiscriminate differencing or scaling can amputate trend signals, introduce causality leakage through full-sample parameters, or distort high-dimensional distance geometry.
Extracting state-space surprises: Applying local linear trend models yields one-step-ahead forecast errors, isolating orthogonal price surprises from predictable local drift.
Neutralizing dynamic benchmarks: Rolling regression residuals project asset returns into the null space of a benchmark, stripping out market beta to expose pure relative-value dislocations.
Eliminating stochastic drift via cointegration: Engle-Granger equilibrium spreads remove shared unit-root trends between paired assets, producing stationary inputs designed for mean-reversion models.
Isolating multiscale wavelet details: Discrete Haar wavelet filter banks decouple overlapping frequency bands, targeting scale-specific shocks while filtering out macro drift and microstructural noise.
Encoding bounded state ranges: Rolling min-max positions compress nominal prices into a [0, 1] interval, removing cross-sectional scale disparities and allowing tree algorithms to process boundary rejections.





