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
TqSdk
86 documents
Quantpedia
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
Binance API docs
45 documents
Quantopian lectures
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

41 documents

Strategy library

The script trades a spread between Dalian Commodity Exchange coke and coking coal futures. It estimates the spread from each contract's close, volume multiplier, and a fixed contract ratio, then calculates a z-score from a rolling set of daily observations.…

CommoditiesFuturesPairs tradingMean reversion
Strategy library

This example trades a spread between continuous Light Sweet Crude Oil and RBOB Gasoline futures. It estimates a return relationship by regressing crude returns on gasoline returns over a rolling history, then measures the recent spread against its mean and…

FuturesCommoditiesPairs tradingMean reversion
Strategy library

This statistical-arbitrage demo tracks closing prices for two instruments, takes their logarithms, and uses the difference as a spread signal. When the spread crosses configured positive or negative thresholds, it opens opposing legs: short the first…

StatisticsPairs tradingMean reversionRisk management
Strategy library

This script presents a spread-style signal using continuous YM and NQ futures. It divides the YM close by the NQ close, smooths that ratio with a 200-period simple moving average, and uses it to scale NQ in a difference series. Bollinger Bands over that…

FuturesPairs tradingMean reversionTechnical indicators
Strategy library

This script describes a mean-reversion strategy for two related futures contracts. It collects daily closes over a rolling window, standardizes each contract’s prices separately, and defines the spread as the difference between those standardized series. It…

FuturesPairs tradingMean reversionBacktesting
Strategy library

This alpha model forms every eligible pair from the selected securities and tracks the ratio of the first asset’s price to the second’s. It smooths that ratio with an exponential moving average and sets upper and lower bands using a configurable percentage…

Pairs tradingMean reversionTechnical indicatorsPortfolio construction
Strategy library

The document introduces pair trading as a long-short approach that seeks to profit when two related assets’ prices move back toward their usual relationship. It discusses selecting correlated assets, using moving averages or other indicators to identify…

Pairs tradingMean reversionTechnical indicatorsRisk management
Strategy library

This strategy forms a spread from two instruments using hedge weights estimated with the Johansen cointegration procedure on a rolling lookback. It recalculates those weights daily, then measures the spread against its rolling mean and standard deviation. A…

Pairs tradingMean reversionStatisticsPortfolio construction
Strategy library

This framework trades the relative price of the PAXG and XAUT gold-linked tokens. It expresses their difference as a percentage, then estimates a rolling mean and standard deviation from minute closes. A spread beyond two standard deviations prompts a…

CryptoPairs tradingArbitrageMean reversion
Strategy library

This framework example wires a Pearson correlation pairs alpha model into a complete algorithm workflow. The model extends a base pairs model and ranks candidate pairs using Pearson correlation, then selects the top candidate to trade. The example uses a…

EquitiesPairs tradingStatisticsPortfolio construction
Strategy library

This Python strategy constructs a spread from two instrument prices weighted by configurable leg ratios. It updates the spread periodically and, after collecting enough observations, calculates a rolling mean and standard deviation over a 20-observation…

Pairs tradingMean reversionStatisticsExecution
Strategy library

This demonstration explores monitoring the relative price of Bitcoin and Ether as a possible cross-asset hedge or arbitrage signal. It computes a fee-adjusted ratio from the two markets’ mid-prices, aggregates observations into hourly values, and plots the…

CryptoPairs tradingArbitrageTechnical indicators
Strategy library

This example trades a soybean crush spread using soybean, soybean meal, and soybean oil futures. It estimates a weighted spread from the component prices and contract multipliers, using a 10:8:2 ratio to approximate processing yields. A rolling history…

CommoditiesFuturesPairs tradingMean reversion
Strategy library

This document provides a trading implementation for two crypto futures instruments on OKX, with an explicit requirement for one-way position mode. It calculates an average historical price ratio from hourly candles, then compares the live ratio with that…

CryptoFuturesPairs tradingMean reversion
Strategy library

This strategy models the relationship between Brent crude and the Norwegian krone with a rolling ordinary least squares regression. It fits the model on a recent window, accepts it only when its R-squared exceeds a chosen threshold, then estimates the…

CommoditiesForexMean reversionPairs trading
Strategy library

This script outlines a long-side statistical arbitrage approach for a pair of instruments. It retrieves the second instrument’s price series, standardizes each instrument’s price against its own rolling mean and standard deviation, and subtracts the…

Pairs tradingArbitrageStatisticsMean reversion
Strategy library

This example builds a relative-value spread from live hog futures and the estimated feed inputs of corn and soymeal. It scales each contract’s price by its contract multiplier and a production ratio, then defines the feeding margin as hog value minus feed…

FuturesCommoditiesMean reversionPairs trading
Strategy library

This charting tool compares two selected swap markets against a chosen base market. For each bar, it divides each instrument’s close by the base close, then divides those two normalized values to form a relative spread series. It plots that series alongside…

CryptoFuturesPairs tradingArbitrage
Strategy library

This intraday pairs strategy trades the spread between the front-month and next-month futures contracts. It builds separate buy-side and sell-side spread prices using the relevant bid and ask quotes, then calculates rolling Bollinger Bands over a 60-minute…

FuturesPairs tradingMean reversionCommodities
Strategy library

This document describes a two-asset crypto pairs strategy that compares each instrument’s price change over the current candle. When the difference exceeds a threshold, it opens a position in one direction on the second asset, aiming to profit as the…

CryptoPairs tradingMean reversionArbitrage
Strategy library

This Binance perpetual-futures strategy maintains short exposure across a selected altcoin basket and offsets it with long exposure in Bitcoin or other chosen assets. It repeatedly checks account positions and prices, then adjusts contracts when their values…

CryptoPerpetual futuresPairs tradingExecution
Strategy library

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…

CryptoPairs tradingStatisticsPosition sizing
Strategy library

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…

Pairs tradingStatisticsBacktestingMarket microstructure