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
WonderTrader
14 documents
Alphalens
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

121 documents

Stratmill research code

This module constructs a continuous futures series by identifying contract roll dates and calculating the price gap between the expiring contract and the next contract. It accumulates those gaps through time and can align the adjusted series at its end. A…

FuturesBacktestingCommoditiesStatistics
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
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
Stratmill research code

This implementation explains how a bivariate Gaussian copula represents dependence between two variables after their observations have been converted to uniform pseudo-observations. It estimates the dependence parameter by mapping those observations through…

StatisticsMulti-assetRisk management
Stratmill research code

This code implements a collection of cross-sectional and time-series equity alpha factors, mainly using close, open, high, low, volume, returns, and VWAP data. The factors combine operations such as rolling ranks, correlations, moving averages, extrema, and…

EquitiesFactor investingTechnical indicatorsStatistics
Stratmill research code

This code module outlines methods for constructing sparse portfolios intended to exhibit mean reversion. It includes Box–Tiao canonical decomposition, greedy support selection, semidefinite optimization under volatility constraints, and sparsity methods…

Mean reversionPortfolio constructionStatisticsMachine learning
Stratmill research code

The document describes a software implementation of the Johansen cointegration method for forming mean-reverting portfolios from asset prices. It computes cointegration vectors, orders them by eigenvalue, and converts each vector into hedge ratios normalized…

Mean reversionStatisticsPortfolio construction
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
Stratmill research code

This module implements analytical trading calculations for an Ornstein–Uhlenbeck mean-reverting process, following a published statistical-arbitrage model. Given an entry threshold, an exit threshold, and transaction costs, it computes expected trade length,…

Mean reversionArbitrageStatisticsRisk management
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
Stratmill research code

This document outlines a two-stage workflow for calculating Alpha101 factors. First, it reads daily stock data, derives base series such as returns and VWAP, and computes time-series intermediate variables for storage. Later, factor construction retrieves…

EquitiesFactor investingStatisticsBacktesting
Stratmill research code

This document is a historical price table for a broad set of country and regional exchange-traded funds. It lists dates alongside one price series for each ETF, with examples spanning markets such as Japan, Brazil, Germany, India, and the United Kingdom. The…

EquitiesMulti-assetStatistics
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
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
Stratmill research code

This implementation describes convergence trading for two cointegrated assets as a portfolio optimization problem. It estimates error-correction speeds and other model parameters from price data, then computes portfolio weights under both unconstrained and…

Pairs tradingArbitragePortfolio constructionStatistics
Stratmill research code

This document describes a trading rule that measures a spread’s latest value against its recent average and standard deviation. It uses separate lookback windows for the mean and standard deviation, then calculates a z-score to identify unusually high or low…

Mean reversionTechnical indicatorsStatisticsRisk management
Stratmill research code

The distance approach forms pairs by rescaling each asset’s training-period prices to a common range, calculating the sum of squared differences between each pair’s normalized series, and selecting the closest matches. In the cited original study, the…

Pairs tradingMean reversionArbitrageStatistics
Stratmill research code

This document describes helper calculations commonly used to construct quantitative signals from price or other tabular time series. Its functions cover rolling sums, averages, standard deviations, correlations, covariances, ranks, products, extrema,…

Technical indicatorsStatistics
Stratmill research code

This code sample implements parts of the Alpha101 factor set using historical equity fields such as open, high, low, close, volume, returns, and volume-weighted average price. The formulas combine rolling ranks, moving averages, correlations, price changes,…

EquitiesFactor investingTechnical indicatorsStatistics
Stratmill research code

This code excerpt implements neural-network components for a momentum forecasting model based on a temporal fusion transformer design. It includes feed-forward layers, gated linear units, gated residual networks with skip connections and normalization, and…

Machine learningMomentumStatisticsBacktesting
Stratmill research code

This module outlines an out-of-sample forecasting workflow built around Auto-ARIMA. It first applies an Augmented Dickey-Fuller test at a five percent significance level, repeatedly differencing the training series until the test indicates stationarity or a…

StatisticsMachine learningBacktesting
Stratmill research code

This module implements the bivariate Nelsen 13 copula, a tool for modeling dependence between two uniform variables. It provides the copula cumulative distribution and density, a conditional distribution, random pair generation, and a parameter estimator…

StatisticsDerivatives pricingRisk management
Stratmill research code

The document implements a threshold autoregressive model for testing whether a spread adjusts differently after positive and negative deviations. It first differences the input series to form changes, lags the spread by one period, and assigns each lagged…

StatisticsMean reversionPairs trading