This article describes a mean-reversion strategy trading the spread between TLT, a long-duration Treasury ETF, and IEI, an intermediate-duration Treasury ETF. A recursive Kalman filter estimates a time-varying linear relationship between the pair, along with…
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 article explains how a Kalman filter can estimate a changing linear relationship between two related assets. In a pairs trading setup, the regression intercept and slope define the spread and hedge ratio; treating them as hidden states allows the…
The document explains how cointegration can identify a mean reverting relationship between non-stationary asset price series. A linear combination of two series that share a stochastic trend may be stationary; deviations of that combination from its mean can…
The article evaluates whether an aluminum producer’s equity and a natural gas ETF could form a mean-reverting pair, based on the role of gas in aluminum production. It tests adjusted price series with a cointegrated Augmented Dickey-Fuller procedure,…
The article introduces the Johansen procedure for testing cointegration among multiple time series and estimating stationary linear combinations. It describes expressing a vector autoregressive model as a vector error correction model, then using the rank of…
This tutorial introduces the Ornstein-Uhlenbeck (OU) process as a continuous-time model for a variable that fluctuates around a long-term mean. It explains the roles of the mean, reversion speed, and volatility, and contrasts mean-reverting behavior with…
The document introduces linear state space models, where an underlying state evolves over time and observations provide noisy, indirect information about it. It defines the state and observation equations, their transition and measurement noise, and the…
The article presents the Cointegrated Augmented Dickey–Fuller procedure as a way to estimate a regression hedge ratio for two assets and then test whether the resulting spread is stationary. It fits a linear regression, treats its residuals as the candidate…
This article derives a batch Bayesian method for estimating the intercept and slope of a univariate linear regression. It assumes normally distributed observation noise with known variance and assigns the regression parameters a normal prior with a specified…
The article classifies common systematic fund approaches by trading style and instrument. It describes trend following as holding positions while trends persist, often accepting frequent small losses in exchange for occasional large moves, and countertrend…
The document describes an intraday pairs strategy that trades SPY against IWM. It estimates a changing hedge ratio with rolling linear regression, constructs a price spread, and standardizes that spread as a z-score. The strategy enters a long spread when…
The article defines algorithmic backtesting as applying a strategy to historical market data, producing signals and calculating trade and cumulative profit or loss. It describes its uses in screening ideas, modeling market conditions, optimizing parameters,…
The article explains how the Cointegrated Augmented Dickey-Fuller approach can assess whether a linear combination of two price series is stationary, a property that may support a mean-reversion pairs strategy. It contrasts this with applying an ordinary…
This article describes adding a switchable cyberpunk display mode to an existing MQL5 graph for pair analysis and linear regression. The presentation adds neon colors, glow effects, animated elements, a starry background, and a theme toggle while retaining a…
The article explains how to search for slower lead/follower behavior between related assets, where one instrument’s returns may precede another’s by minutes or longer. It frames the setup as a potential mean-reversion opportunity for cointegrated assets and…
This article proposes opening a daily hedge across GBP/JPY and EUR/JPY, using EUR/JPY as the base position and GBP/JPY as the offsetting position. A TD Sequential signal supplies the directional bias, and the author suggests requiring strong positive…
The article outlines a MetaTrader 5 Expert Advisor that accepts a configurable list of currency pairs and uses one designated pair as the signal source for trading the others. Its proposed relationship logic distinguishes pairs that share a selected base or…
The article explains how trading activity shifts across the Asian, European, and American sessions and how those shifts can shape intraday price movement, liquidity, and volatility. It introduces the ISI ProSpread SMA indicator as a way to study hourly…
This final installment in a retail statistical arbitrage series explains why larger cointegrated stock portfolios can strain a workflow built around SQLite. It distinguishes SQLite’s role in transactional tasks from an OLAP database’s role in analytical…
This article presents PairPlot, a graphical tool for examining relationships among multiple trading time series. It arranges a histogram for each series and scatter plots for each pair in a cross-table layout, with trend lines as visual aids. The design uses…
This installment explains how to simulate changing portfolio weights for a cointegrated stock basket in MetaTrader 5 backtests. Since the live Expert Advisor reads strategy parameters from a database but the Tester cannot access that database directly, the…
This article adapts angle-based analysis to trading indicators and trend estimation. For comparing two currency instruments, it scales prices into comparable point units and interprets their relative values as an angle, with the indicator intended to show…
This article outlines a forex pair-trading system that compares two instruments through their price ratio. It calculates a Z-score to measure how far the ratio has moved from its historical mean, then uses the sign of the score to choose which instrument to…
The document explains two statistical arbitrage approaches for trading related currency pairs: correlation and cointegration. In the correlation method, traders select historically related pairs, monitor changes in their correlation, and enter opposing…