Skip to content

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.

Quant Q&A
20,364 documents
SuperMind
12,226 documents
OKX Learn
8,431 documents
Strategy library
7,910 documents
MQL5 code base
7,090 documents
BigQuant
3,481 documents
Bitget Academy
3,298 documents
MQL5 articles
3,012 documents
TradingView scripts
1,976 documents
ProRealCode
1,507 documents
Deribit Insights
1,232 documents
Machine Learning for Trading
1,124 documents
arXiv papers
1,033 documents
Amberdata research
766 documents
FMZ forum
682 documents
FMZ digest
662 documents
vn.py community
560 documents
QuantInsti blog
511 documents
Galaxy Research
340 documents
QuantStart
246 documents
Stratmill research code
219 documents
Robot Wealth
195 documents
NautilusTrader
191 documents
Hummingbot docs
181 documents
Paradigm research
175 documents
Lumibot
164 documents
Kraken Learn
163 documents
Quant course library
157 documents
OctoBot
152 documents
Cryptohopper blog
144 documents
Systematic trading blog (Rob Carver)
132 documents
Qlib
116 documents
Quantpedia
86 documents
TqSdk
86 documents
Hyperliquid docs
79 documents
Freqtrade
68 documents
Hudson & Thames
62 documents
Awesome Systematic Trading
61 documents
backtrader
54 documents
vn.py
50 documents
Quantopian lectures
45 documents
Binance API docs
45 documents
FMZ guides
38 documents
pysystemtrade
34 documents
Freqtrade docs
32 documents
quant-trading
31 documents
FinRL
28 documents
Zipline
22 documents
FMZ live strategies
21 documents
Jesse
17 documents
pyfolio
16 documents
Alphalens
14 documents
WonderTrader
14 documents
backtesting.py
11 documents
Technical Analysis
9 documents
QTPyLib
8 documents
QuantRocket
7 documents
Lumibot strategies
7 documents
Awesome Quant
1 documents

Search the library

765 documents

Stratmill research code

The method selects hedge ratios for a basket spread by minimizing the absolute estimated half-life of mean reversion. It treats one price series as the target and the remaining series as explanatory assets, forming the spread as the target minus their…

Mean reversionPairs tradingStatistics
vn.py community

A user reports that a VeighNa spread backtest loads no data after changing an example notebook from bar mode to tick mode. The database’s tick overview shows records for both futures legs, but debugging finds no rows when the SQLite query filters by a leg’s…

FuturesPairs tradingBacktesting
BigQuant

The document introduces stationarity and cointegration as the basis for pairs trading. It describes a stationary series as having a stable mean and variance, and presents a pair as cointegrated when the difference between their prices is stationary. Under…

FuturesPairs tradingMean reversionStatistics
FMZ forum

The article examines three futures strategies in China’s oilseed complex: soybean crush spreads, soybean oil versus palm oil substitution spreads, and soybean oil versus soybean meal companion spreads. It outlines the production and consumption logic behind…

CommoditiesFuturesArbitragePairs trading
Stratmill research code

The document explains a threshold-selection method for pairs trading when the modeled log price follows an Ornstein–Uhlenbeck process. It builds on earlier work by deriving expressions for the expected first-passage time with two-sided boundaries, then uses…

Pairs tradingMean reversionStatisticsRisk management
BigQuant

This overview contrasts efficient markets, where prices are assumed to incorporate available information, with inefficient markets, where prices may diverge from estimated value. It outlines the weak, semi-strong, and strong forms of the efficient market…

StatisticsArbitragePairs tradingSentiment
TqSdk

This example describes a mean-reversion strategy for two SHFE futures contracts. It uses a Kalman filter to update the hedge ratio between the instruments, calculates the resulting spread, and standardizes it against a rolling window to create a z-score. The…

FuturesPairs tradingMean reversionBacktesting
Stratmill research code

This document outlines a daily strategy for trading a set of assets using a cointegration vector estimated with the Johansen method on training data. It applies the vector to log prices to form a combined process, then sums its recent changes to determine…

Multi-assetPairs tradingArbitrageStatistics
vn.py community

A VeighNa forum discussion explains how to preserve variables in a spread trading strategy across restarts. The suggested approach is to implement JSON file loading and saving in the strategy lifecycle: load stored values when the strategy starts and write…

FuturesPairs tradingExecution
Awesome Systematic Trading

The strategy tracks the daily price difference between continuous WTI and Brent crude futures and compares it with a 20-day simple moving average. When the spread is above its average, it takes positions intended to profit from a decline toward that…

FuturesCommoditiesMean reversionPairs trading
SuperMind

This module describes an interactive dashboard for examining two-asset pairs through cointegration tests and mean-reversion models. Its analytics include Engle–Granger and Johansen portfolio construction, augmented Dickey–Fuller results, cointegration…

Pairs tradingMean reversionStatisticsPortfolio construction
BigQuant

The article introduces time series concepts for financial analysis, including univariate and multivariate data, stationarity, autocorrelation, trend, seasonality, and decomposition. It describes using ACF and PACF to examine lag dependence, and outlines a…

StatisticsMean reversionPairs tradingFutures
Stratmill research code

This implementation describes a pairs strategy that estimates conditional probabilities from a fitted copula applied to each asset’s return ranks. It converts prices to returns, maps returns through marginal cumulative distribution functions, and uses the…

Pairs tradingStatisticsRisk managementPosition sizing
BigQuant

This example describes a two-stock pairs strategy based on the assumed long-term relationship between securities. It regresses one stock's price on the other's, then standardizes the regression residual using its recent mean and standard deviation. When the…

EquitiesPairs tradingMean reversionBacktesting
Stratmill research code

The method searches for hedge ratios that make a portfolio spread more stationary according to the Augmented Dickey–Fuller (ADF) test statistic. It defines the spread as the target asset’s price series minus a weighted sum of the other price series, then…

Pairs tradingStatisticsMean reversionArbitrage
MQL5 code base

The Spread Oscillator compares two selected symbols by first forming a normalized price ratio: the first symbol’s close divided by the second symbol’s close, scaled by one hundred. It then computes exponential moving averages of that ratio using configurable…

Technical indicatorsPairs trading
vn.py community

This forum exchange addresses why a spread-trading algorithm may submit orders marked as opening even when the strategy intends to close a position. A trader observes that closing a long spread appears to send orders in the opposite directions, which raises…

FuturesPairs tradingExecutionMarket microstructure
Stratmill research code

The code implements a Cox–Ingersoll–Ross model for a mean-reverting portfolio, extending an Ornstein–Uhlenbeck model interface. It supports fitting the model to portfolio prices or to two assets, and estimates the long-run mean, reversion speed, and variance…

Mean reversionPairs tradingStatisticsRisk management
Quant course library

This implementation models a spread as a collection of instrument legs, with separate multipliers for calculating its quoted price and translating spread quantities into leg quantities. It combines leg bid and ask prices, reversing which side is used for…

FuturesCryptoPairs tradingBacktesting
Quant course library

This document explains how to build a multi-contract strategy using synchronized bar data, per-leg targets, and order management. Its example computes the spread between two weighted contract prices, updates a rolling window, and uses Bollinger Bands to…

FuturesPairs tradingMean reversionTechnical indicators
Quant course library

The document describes a two-leg spread strategy built around Bollinger Bands. It calculates a weighted price difference between two contracts, samples the spread on a five-minute schedule, and compares it with a rolling mean and standard deviation. A move…

FuturesPairs tradingMean reversionTechnical indicators
Quant course library

This guide explains execution algorithms that divide large orders, react to market prices, and adjust positions on a grid or across a spread. It describes time-weighted execution, iceberg orders, a tick-driven sniper approach, conditional orders, and…

ExecutionMarket microstructureGrid tradingPairs trading
Quant course library

This document describes a graphical interface for defining and monitoring spread trades. Users can create standard or flexible spreads, specify leg instruments and directions, set a pricing formula, identify an active leg, and enter minimum trade volume. The…

Multi-assetPairs tradingExecutionMarket microstructure
Quant course library

This strategy forms a spread from two instruments’ bar closes, weighted by configurable leg ratios. It updates the spread at five-minute intervals, keeps a rolling history, and calculates a moving average with upper and lower bands based on the spread’s…

Pairs tradingMean reversionTechnical indicatorsFutures