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

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
Strategy library

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.…

FuturesCommoditiesPairs tradingMean reversion
Strategy library

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…

FuturesPairs tradingMean reversionStatistics
Strategy library

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.…

FuturesCryptoPairs tradingGrid trading
Strategy library

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…

FuturesArbitragePairs tradingExecution
Strategy library

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…

FuturesCommoditiesMean reversionPairs trading
Strategy library

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…

FuturesPairs tradingMean reversionTechnical indicators
Strategy library

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…

Pairs tradingBreakoutTechnical indicatorsPosition sizing
Hudson & Thames

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…

EquitiesPairs tradingMean reversionArbitrage
Hudson & Thames

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…

Pairs tradingArbitrageMean reversionPortfolio construction
Hudson & Thames

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…

Pairs tradingMean reversionArbitrageMachine learning
Hudson & Thames

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…

Mean reversionPairs tradingStatisticsRisk management
Hudson & Thames

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…

EquitiesMean reversionArbitrageStatistics
Hudson & Thames

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.…

EquitiesArbitragePairs tradingStatistics
Hudson & Thames

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…

Pairs tradingStatisticsArbitrage
Hudson & Thames

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…

Pairs tradingStatisticsArbitrage
Hudson & Thames

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…

EquitiesPairs tradingMean reversionMachine learning
Hudson & Thames

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…

Pairs tradingMean reversionStatisticsTechnical indicators
Hudson & Thames

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…

Pairs tradingArbitrageMean reversionPortfolio construction
Hudson & Thames

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…

Pairs tradingMean reversionArbitragePortfolio construction
Hudson & Thames

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…

Pairs tradingMean reversionMachine learningRisk management
Hudson & Thames

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…

Mean reversionPairs tradingPortfolio constructionStatistics
Hudson & Thames

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,…

Pairs tradingMean reversionVolatilityBacktesting