The document introduces mean reversion as the tendency for prices or returns to move back toward a historical average after deviating from it. It outlines ways to define that average, detect deviations, and form signals using moving averages, RSI, and MACD.…
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
This webinar description introduces mean reversion as the idea that prices or returns may move back toward an average. Its outline signals several concepts relevant to assessing such strategies: time-series stationarity, the Augmented Dickey-Fuller test, and…
This article applies the Ornstein–Uhlenbeck (OU) process to mean-reverting spreads, including those used in pairs trading. It contrasts Euler–Maruyama simulation, which introduces discretization error, with Doob’s exact simulation method, which uses the…
This article develops a way to choose entry thresholds for a spread used in mean-reversion trading. A position is opened when the spread crosses an upper or lower boundary and closed when it returns to its mean. Tight boundaries create more trades with…
The article introduces cointegration as a way to find a stationary spread from non-stationary asset prices. If two price series share common long-run trends, a weighted combination may remove those trends; the resulting spread can fluctuate around a stable…
This overview unifies common copula-based pairs strategies around conditional probabilities, which estimate whether each asset appears relatively overvalued or undervalued given the other asset. Unlike spread-only signals, the two leg-specific estimates can…
This article explains how to build vectorized equity curves while distinguishing long-only return calculations from long-short pair-trading P&L. For a single asset or a long-only portfolio with positive value, it recommends calculating portfolio returns and…
This article applies optimal stopping theory to a mean-reverting spread formed from two co-moving assets. It models the spread with an Ornstein–Uhlenbeck process, estimates the process parameters and asset hedge ratio by maximizing average log-likelihood,…
Vine copulas extend copula-based dependence modeling beyond pairs by decomposing a high-dimensional joint density into marginal densities and conditional bivariate copulas. The article explains how conditional probabilities support this decomposition and…
The article explains structural breaks as unexpected changes in regression relationships that can undermine a pairs or basket strategy. It distinguishes gradual relationship decay, which rolling-window eigenvector comparison and in-sample/out-of-sample ADF…
This article explains how the ALGLIB port available to MQL5 developers can support numerical work needed for dynamic hedging and multi-asset strategies. It contrasts single-window correlation indicators and hand-built calculations with tools for matrix…
The article explains how to use a MetaTrader indicator to compare seasonal price behavior for individual instruments and weighted spreads. It defines a spread as the difference between two instruments’ opening prices, with configurable multipliers, and…
The article describes an MQL5 canvas tool for plotting paired symbol prices as scatter points, fitting a linear regression line, and displaying slope, intercept, correlation, and R-squared. It explains correlation as a measure of direction and strength of…
This article outlines a screening funnel for building a market-neutral mean-reversion portfolio of Nasdaq stocks cointegrated with Nvidia. It begins with a broad broker symbol universe, applies sector and industry filters to focus on companies with plausible…
The article describes a market-neutral forex pair-trading approach that buys one instrument and sells another when their spread moves unusually far from its typical level, then exits as the spread contracts. It discusses using correlation to select related…
This installment extends a scoring framework for stock baskets used in statistical arbitrage. In addition to liquidity and cointegration strength, it adds stability of the Johansen cointegrating weights and the spread's mean-reversion half-life. The…
The article proposes a workflow for ranking stock baskets considered for statistical arbitrage. It separates criteria into eliminatory filters, ranking criteria, and strategic choices. Liquidity and transaction costs can disqualify a basket; cointegration…
The article develops Rolling Windows Eigenvector Comparison (RWEC) to monitor whether the portfolio weights of a cointegrated stock basket remain stable. It contrasts RWEC with In-Sample/Out-of-Sample ADF validation, which estimates a cointegration vector on…
This article introduces copulas as a way to model dependence between two assets after separating that dependence from their individual distributions. It reviews probability density and cumulative distribution functions, marginal and joint distributions, and…
The article proposes a workaround for testing a multi-symbol hedge Expert Advisor in a platform tester that cannot open orders on another symbol. Its method separates the process into data collection, simulated trading, and performance visualization. An EA…
This introductory article explains simple linear regression as a straight-line model relating one predictor to a target. It presents the slope and intercept, then uses Pearson correlation to assess linear association before choosing predictors. Its worked…
This installment explains how to update a cointegrated stock portfolio’s weights while an Expert Advisor is running. It uses a database as the interface between Python analysis and MQL5 trading: a strategy table stores basket symbols, weights, and timeframe,…
The article develops a spread between Si currency futures and RTS index futures, which it describes as usually moving in opposite directions. It fits a linear regression between the instruments, treats the difference from the resulting synthetic series as…
This article describes combining copula families to represent dependence patterns that a single family may miss. It outlines mixtures of Clayton, Frank, Gumbel, and Student-t copulas, whose differing tail behavior can capture joint extremes as well as…