This crypto pair strategy trades BTC against ETH when BTC has a sufficiently strong intraday move and outperforms or underperforms ETH. It takes the stronger leg in the direction of BTC’s move and the weaker leg in the opposite direction, aiming to capture…
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 visible source describes a two-asset strategy framework that compares one instrument with a user-selected pair. It retrieves closing prices on a selected timeframe, fits a rolling linear regression, and calculates correlation and residual error. The code…
This calendar-spread style strategy trades the ratio between copper and aluminum futures. It multiplies each contract’s close by its volume multiplier, computes a rolling historical mean and standard deviation, and converts the current ratio to a z-score.…
This futures pairs strategy estimates a changing hedge ratio between two SHFE contracts with a Kalman filter. It updates the ratio from hourly closing prices, forms a spread by subtracting the hedged X price from Y, then standardizes that spread against a…
This execution system monitors matched near and far futures contracts across several assets and tracks the difference between their bid and ask prices. It builds a grid around the initial spread, adding levels as the spread moves beyond the current range.…
This document describes a JavaScript strategy for comparing futures prices across two exchanges and trading a spread when the observed difference reaches configured thresholds. It supports both directions: opening a short position on one venue and a long on…
This daily futures example constructs a synthetic steelmaking spread from rebar, iron ore, and coking coal prices, using weights of 1, 1.6, and 0.5. It calculates a 15-day moving average and a standard deviation, then places bands half a standard deviation…
This intraday pairs strategy trades native futures calendar spreads using quote data. It forward-fills bid and ask observations, calculates midpoint prices, and compares the spread with rolling Bollinger Bands. It enters long when the ask falls below the…
The document describes a breakout strategy that uses Bollinger Bands calculated from a moving average and closing-price standard deviation. A close crossing above the upper band prompts a long position in MCL and a short position in YG; a cross below the…
This article presents a pairs trading method that selects stocks using correlations between their returns. In a formation period, it calculates monthly returns, finds each stock’s most correlated peers, and forms an equal-weighted peer portfolio. Regression…
The article explains a stochastic control framework for convergence trades between cointegrated assets. Earlier approaches constrain positions to be delta-neutral and fix the relative stock weights; the generalized approach allows individual asset weights to…
This lecture series surveys advanced pairs and statistical arbitrage methods. Topics include distance-based pair selection and dependence measures, cointegration with mean first-passage time for choosing trading boundaries, PCA strategies, machine learning…
The document presents an analytical approach to choosing entry and exit thresholds for mean-reversion trading. It models a tradable process with an Ornstein–Uhlenbeck dynamic and uses first-passage-time calculations to derive the expected duration and…
The document explains a mean-reversion strategy that uses a C-vine copula to model dependence among a cohort of stocks. It converts returns into empirical quantiles, fits candidate vine structures and bivariate copulas, then uses conditional probabilities to…
This article explains how stock selection should be matched to the trading strategy that uses copula-based signals. Copulas transform asset returns into conditional probability or cumulative mispricing series, but do not specify a trading rule on their own.…
This introduction describes how copulas can model the dependence between two assets separately from the distribution of each asset. Marginal returns may each appear normally distributed without their joint behavior being normal; a Gaussian model can also…
This technical article explains how to sample from and fit bivariate copulas, which model dependence between two variables separately from their marginal distributions. Sampling from a fitted copula can help compare simulated quantile pairs with historical…
This article presents an unsupervised learning framework for narrowing the search for equity pairs that may exhibit mean reversion. It first applies principal component analysis to asset returns to represent shared risk exposures, then uses density-based…
This article describes a basic distance approach to pairs trading. During a formation period, asset price series are normalized so their scales are comparable, then candidate pairs are selected using squared Euclidean distance. The spread’s historical…
This broad introduction defines pairs trading as taking opposing positions in co-moving assets when their relative prices depart from an equilibrium, with the expectation that the relationship will persist and prices will converge. It distinguishes pairs…
This article explains how stochastic control models can set dynamic positions in a mean-reverting spread. It outlines two investor preference models: constant relative risk aversion over terminal wealth, and Epstein–Zin recursive utility, which can account…
This document describes a pairs trading method that uses a two-state Markov regime-switching model to assess whether spread deviations may reflect a persistent change rather than temporary mean reversion. The proposed signal combines the estimated regime and…
This article explains why a multi-asset mean-reverting portfolio may be easier to trade when it uses a small number of assets. Sparse baskets can improve interpretability and reduce trading costs; they also avoid the ambiguity that can arise when combining…
The article presents a pairs-trading framework that uses Renko- or Kagi-style constructions to identify turning points in a spread. From those points, it derives H-statistics: H-inversion counts directional changes, H-distance summarizes turning-point moves,…