This document outlines a two-stock pairs strategy based on a presumed long-term cointegrating relationship. It fits a linear relationship between the stocks’ prices, calculates the residual, and standardizes that residual over a rolling history. When the…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
765 documents
The document proposes watching for divergences in the relationship between two currency pairs and taking opposing positions when a gap appears. It focuses on AUD/JPY, CAD/JPY, and NZD/JPY, and gives AUD/JPY versus NZD/JPY as an example. A pip-value…
The document describes three ways to refine spread trading signals. A threshold filter enters or maintains a long or short spread position only when the predicted spread change crosses a chosen boundary; an asymmetric version allows different boundaries for…
The document describes a forex cross-pair setup using a correlation calculator panel to compare a cross with its two component currency pairs. Its example considers EUR/JPY alongside EUR/USD and USD/JPY. The proposed signal is a change in which component…
This retrospective describes an early Bitcoin trading effort that began with cross-exchange price gaps and evolved into a statistical arbitrage strategy. Directly buying on one venue and transferring coins to another exposed traders to transfer delays and…
The document introduces the Ornstein–Uhlenbeck (OU) process as a continuous-time model for a variable that is pulled toward a long-run mean while exposed to random shocks. It explains the roles of the mean, reversion speed, and volatility, contrasts OU…
The document introduces copulas as a way to model how two stocks move together in pairs trading. Unlike distance and cointegration approaches, which focus on price gaps or long-run relationships, copulas combine each series’ marginal distribution with a…
This document explains how to model a mean-reverting portfolio with a Cox-Ingersoll-Ross (CIR) process, whose volatility scales with the square root of its value. It describes fitting the process by maximum likelihood and selecting portfolio weights to…
The introduction presents a machine-learning framework for selecting securities for pairs trading. It frames pair discovery as a search-space problem: limiting candidates to securities in the same sector may exclude useful relationships, while searching…
This short forum exchange addresses how to use a custom benchmark for a strategy such as pair trading, where a portfolio of two stocks may be a more relevant comparison than a broad market index. The suggested approach is to construct an index from the two…
The module implements a finite-horizon dynamic allocation approach for a mean-reverting arbitrage spread, drawing on a published model by Jurek and Yang. It constructs total-return indices from two price series, estimates cointegrating spread weights, and…
The document explains a correlation indicator for comparing price changes in two symbols. It describes values from positive one to negative one: positive values indicate prices tending to move together, negative values indicate movement in opposite…
The post describes a timing issue in a live spread engine for a two-leg arbitrage. At startup, each leg has zero bid and ask volume, so the engine waits until both have received data. Afterward, however, it may calculate a spread as soon as either leg…
This page presents a beginner-oriented quantitative trading curriculum for readers who may lack finance background. It points to introductory material on Python, Pandas, historical market data, financial data handling, and data visualization. It also lists…
This indicator overlays the price history of two currencies or other assets on one chart so a trader can inspect their relative movement. The example describes viewing USDCHF alongside EURUSD and presents the tool as potentially useful when studying…
This implementation describes a systematic filter for candidate equity pairs or larger baskets. It first constructs a spread using a chosen hedge-ratio method, including ordinary or total least squares, minimum half-life, minimum ADF, Johansen, or Box–Tiao…
A trader asks how to open two related futures spread positions only when both signals are valid: a forward arbitrage in one contract pair and a reverse arbitrage in another. If either condition is missing, neither position should be opened. The reply points…
This strategy tests whether two price series can support a mean-reverting spread. It applies augmented Dickey–Fuller tests to each series and their first differences, then uses a linear regression to estimate a hedge ratio and intercept when the series…
This strategy uses a fitted copula and marginal cumulative distribution functions to estimate conditional probabilities for two assets. During a formation period, the model is trained on historical prices. As new prices arrive, their marginal distributions…
This module describes a candidate-selection process for pairs trading based on dimensionality reduction and clustering. It starts from a panel of asset prices, converts prices to returns, standardizes them, and applies principal component analysis to create…
This event announcement introduces spread trading as a relative-value approach that focuses on price differences between related futures contracts or between futures and spot instruments. The idea is to trade whether a spread has moved outside a reasonable…
This document describes methods for selecting long-short portfolios that aim to mean-revert while holding only a small subset of assets. Sparsity can reduce trading costs and make portfolio exposures easier to interpret than dense portfolios that include the…
This note explains a long-short pairs strategy that uses a copula to model the dependence between two stocks. After selecting a pair, for example with a cointegration test, the method fits the copula and each stock’s empirical distribution on a formation…
This indicator measures whether two instruments that usually move together are beginning to diverge. It calculates rolling Pearson correlation between their returns and a rolling z-score for the log-price spread. A signal appears only when correlation falls…