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

765 documents

Quant Q&A

The document asks how to divide capital between the long and short legs of a pairs trade and whether using a hedge ratio implies equal dollar allocations. Its answer explains that the appropriate split depends on which exposures a trader wants the portfolio…

Pairs tradingEquitiesRisk managementPosition sizing
Quant Q&A

The discussion compares a price-based pairs trading framework with the statistical arbitrage approach described by Avellaneda and Lee. In the former, log prices are related through a fitted spread, cointegration tests such as Johansen's can identify…

Pairs tradingMean reversionStatisticsFactor investing
Quant Q&A

The document examines how cointegration residuals can generate pairs trading signals and why equal dollar positions do not guarantee a profitable convergence trade. The questioner estimates a linear relation between two asset prices with an intercept, then…

Pairs tradingStatisticsPosition sizingBacktesting
Quant Q&A

The document raises practical questions about testing whether two nonstationary stock prices share a long-run equilibrium. Its proposed Engle–Granger sequence first checks that each series is integrated of order one, estimates a long-run regression, and…

EquitiesPairs tradingStatistics
Quant Q&A

The document describes a pairs-trading screening problem: applying the Johansen test to pairs of daily log stock prices, selecting rank-one cointegration candidates from trace statistics, and then checking the resulting spreads with ADF and KPSS tests. The…

EquitiesPairs tradingStatistics
Quant Q&A

The document discusses cointegration among more than two assets, using yield curve rates as its main example. It describes principal component analysis of yields: the first components represent level, slope, and curvature, while a later component can capture…

Fixed incomeStatisticsMean reversionPairs trading
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