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

This code excerpt implements three filters intended to support spread trading and risk adjustment. The correlation filter calculates rolling correlation between the first two series, rescales it to a zero-to-one range, and uses changes in that measure to…

Pairs tradingVolatilityRisk managementBacktesting
Stratmill research code

This helper prepares spread changes and their lagged values as inputs for a regression model. It can expand the lag features with pairwise products, split a chosen in-sample period into ordered training and test sets, and keep a separate out-of-sample…

Machine learningStatisticsBacktestingPairs trading
MQL5 code base

The document describes an indicator for visualizing pair trading by overlaying one instrument’s price series on another. When the two series diverge, the example strategy sells the relatively higher pair and buys the lower one; both positions are closed when…

ForexPairs tradingMean reversionTechnical indicators
vn.py community

A forum user asks how to check whether enough funds are available before starting a spread-arbitrage order algorithm. The stated motivation is to avoid opening only one leg of a paired trade when the account cannot support both sides. A reply points to…

ArbitragePairs tradingRisk management
vn.py community

A forum exchange discusses why VeighNa’s StatisticalArbitrageStrategy example uses a ten-unit price offset when starting its spread-trading algorithm. The questioner describes the order logic: a leg order is sent when the spread order price would otherwise…

ArbitragePairs tradingExecution
Stratmill research code

This method estimates portfolio weights for a spread using the Box–Tiao canonical decomposition. It first reorders the price columns so the selected dependent asset comes first, demeans the data, and fits a first-order vector autoregression. It combines the…

Pairs tradingStatisticsPortfolio construction
TqSdk

This code describes a mean-reversion strategy for the spread between Dalian Commodity Exchange coke and coking coal futures. It calculates a weighted value spread using contract prices, contract multipliers, and a specified leg ratio, then estimates the…

FuturesCommoditiesPairs tradingMean reversion
vn.py community

A trading-system forum discussion explains why a conventional CTA strategy that works on outright futures may fail when applied directly to exchange-listed spread contracts. The reported symptoms include missing backtest data and occasional trades with…

FuturesArbitragePairs tradingExecution
quant-trading

This repository overview introduces a collection of systematic trading approaches, including moving-average momentum, cointegration-based pairs trading, candlestick signals, and an opening-range breakout. It also points to projects in options, portfolio…

Technical indicatorsMomentumPairs tradingBreakout
BigQuant

The document presents a pairs-trading question about two stocks believed to have a long-run cointegrating relationship. It describes fitting a linear relationship between their prices, then standardizing a series associated with that relationship using a…

Pairs tradingMean reversionStatisticsEquities
Stratmill research code

This implementation describes a threshold-based rule for a cointegrated pair. It opens a long-spread trade when the spread falls to or below a lower entry level, or a short-spread trade when it rises to or above an upper entry level. A trade closes when the…

Pairs tradingMean reversionRisk managementExecution
MQL5 code base

This indicator guide explains how to build a synthetic spread from two price series and use its deviations to identify possible pair-trading entries. Users choose the instruments, combine their series with an arithmetic operation, and can reverse,…

Pairs tradingForexTechnical indicatorsMean reversion
Stratmill research code

This strategy uses copulas to estimate conditional probabilities between two assets’ daily returns. It accumulates each probability’s deviation from 0.5 into a mispricing index flag, intended to translate return dependence into a measure of how prices have…

Pairs tradingStatisticsMean reversionBacktesting
BigQuant

This page organizes a beginner-oriented quantitative trading curriculum and links to lessons and example strategy projects. The listed foundations include Python, pandas analysis, historical and financial data access, visualization, and DataFrame plotting.…

EquitiesPairs tradingTechnical indicatorsFactor investing
MQL5 code base

The document describes a proposed dashboard indicator for monitoring active symbols and pairs in spread or equity trading. Its interface is meant to track changes in the selected symbols, retain settings during terminal changes, and let users set each pair's…

EquitiesPairs tradingMean reversionTechnical indicators
Stratmill research code

This tutorial develops bivariate copulas as a way to describe dependence separately from the marginal distributions of two variables. It defines tail dependence and the Fréchet–Hoeffding bounds, then explains how an empirical copula can be estimated from…

StatisticsRisk managementPairs tradingDerivatives pricing
MQL5 code base

This indicator is designed to compare two instruments for a convergence trade. It plots an averaged line for each instrument and a third line that represents the distance between them, with colors distinguishing divergence from convergence. The suggested…

Pairs tradingMean reversionPosition sizingVolatility
vn.py community

This Chinese-language forum exchange explains how to track execution information for a spread-trading algorithm. A participant asks how to obtain a spread’s opening average price and its fill prices and quantities. The reply recommends receiving algorithm…

ExecutionMarket microstructurePairs tradingRisk management
Stratmill research code

The document presents a framework for trading a mean-reverting portfolio, often formed by holding one asset and shorting another. It models portfolio value with an Ornstein–Uhlenbeck process, estimates the long-run mean, reversion speed, and volatility by…

Mean reversionPairs tradingStatisticsRisk management
Stratmill research code

The module implements the two-step Engle–Granger approach to constructing a portfolio intended to be mean reverting. It uses ordinary least squares to regress a chosen dependent asset’s price on the other price series, defaulting to the first input column as…

Pairs tradingMean reversionStatisticsPortfolio construction
SuperMind

This document explains how to trade a cointegrated pair using entry and exit levels produced by a minimum-profit optimization method. It defines a spread from the two asset prices and a hedge coefficient. When the spread falls below the buy threshold, the…

Pairs tradingArbitrageStatisticsExecution
MQL5 code base

This code excerpt describes two operations used in a cointegration-based statistical arbitrage workflow. The first multiplies each asset’s price series by the corresponding coefficient in a cointegration vector and sums across assets, producing a portfolio…

ArbitrageMean reversionPairs tradingPortfolio construction
Stratmill research code

This introduction explains how cointegration can help create a mean-reverting portfolio from price series that are not themselves mean-reverting. By combining multiple assets with suitable weights, a trader may construct a spread or portfolio whose value…

Mean reversionStatisticsPortfolio constructionPairs trading
quant-trading

The document outlines a mean-reversion strategy for two assets selected for cointegration. It uses the Engle–Granger two-step approach: regress one price series on the other, test whether the residuals are stationary, then fit an error-correction model and…

Pairs tradingMean reversionStatisticsBacktesting