Long-Only Statistical Arbitrage Using a Modified Z-Score Spread
Summary
This script outlines a long-side statistical arbitrage approach for a pair of instruments. It retrieves the second instrument’s price series, standardizes each instrument’s price against its own rolling mean and standard deviation, and subtracts the resulting z-scores to form a spread. It then centers that spread using a rolling median and scales deviations by the median absolute deviation to calculate a modified z-score. A configurable threshold is intended to identify an unusually low spread as a potential long entry.
The available document ends during the plotting section, before showing the order conditions, exits, or any performance results. It therefore does not establish exactly how a trade is executed or closed, and the title’s long-only framing cannot be evaluated against full strategy logic. The method also does not show tests for whether the pair relationship is stable or mean-reverting. A trader would need to assess pair selection, synchronization, transaction costs, and out-of-sample behavior before drawing conclusions from this signal construction.
Key ideas
- The method compares rolling standardized prices for a main instrument and a paired instrument.
- It defines the spread as the difference between the instruments’ individual z-scores.
- A rolling median and median absolute deviation are used to calculate a robust modified z-score.
- A configurable negative threshold is intended to flag a potential long entry.
- The available text omits trade exits, complete execution logic, and performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.