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

219 documents

Stratmill research code

This module describes a candidate-selection process for pairs trading based on dimensionality reduction and clustering. It starts from a panel of asset prices, converts prices to returns, standardizes them, and applies principal component analysis to create…

Pairs tradingMachine learningStatisticsEquities
Stratmill research code

This document describes methods for selecting long-short portfolios that aim to mean-revert while holding only a small subset of assets. Sparsity can reduce trading costs and make portfolio exposures easier to interpret than dense portfolios that include the…

Mean reversionPortfolio constructionStatisticsPairs trading
Stratmill research code

This note explains a long-short pairs strategy that uses a copula to model the dependence between two stocks. After selecting a pair, for example with a cointegration test, the method fits the copula and each stock’s empirical distribution on a formation…

Pairs tradingArbitrageStatisticsBacktesting
Stratmill research code

This utility reconstructs an order book from a supplied sequence of market-data files and returns the market-depth state at the end of that data. It configures a backtest asset with the relevant tick size and lot size, and can optionally seed reconstruction…

Market microstructureHigh-frequency tradingExecutionBacktesting
Stratmill research code

The method selects hedge ratios for a basket spread by minimizing the absolute estimated half-life of mean reversion. It treats one price series as the target and the remaining series as explanatory assets, forming the spread as the target minus their…

Mean reversionPairs tradingStatistics
Stratmill research code

This abstract copula framework provides shared methods for bivariate copula implementations, with named families including Archimedean, Gaussian, and Student forms. It evaluates copula density and cumulative joint probability, and calculates a conditional…

StatisticsMachine learningPortfolio construction
Stratmill research code

This Python class assembles a subset of Alpha101-style equity signals from price, volume, VWAP, returns, and precomputed factor series. Its methods apply operations such as cross-sectional ranking, rolling correlation, covariance, time-series ranking, decay,…

EquitiesFactor investingTechnical indicatorsStatistics
Stratmill research code

The document explains a threshold-selection method for pairs trading when the modeled log price follows an Ornstein–Uhlenbeck process. It builds on earlier work by deriving expressions for the expected first-passage time with two-sided boundaries, then uses…

Pairs tradingMean reversionStatisticsRisk management
Stratmill research code

This document defines a common interface for calculating trade amount and account equity, then supplies formulas for linear and inverse assets. For a linear contract, amount scales with contract size, execution price, and quantity; equity adds the marked…

Derivatives pricingFutures
Stratmill research code

This utility converts Binance historical order-book depth, snapshot, and trade files into an event format used by HftBacktest. It reads CSV data, identifies or infers column headers, maps records to depth, snapshot, or trade events, and assigns exchange and…

CryptoMarket microstructureBacktestingExecution
Stratmill research code

This Rust example shows how to wrap HftBacktest’s local processor to add custom handling around market events and order responses. The wrapper implements the local processor interface by forwarding order submission, modification, cancellation, state, depth,…

BacktestingHigh-frequency tradingExecutionMarket microstructure
Stratmill research code

This document outlines a daily strategy for trading a set of assets using a cointegration vector estimated with the Johansen method on training data. It applies the vector to log prices to form a combined process, then sums its recent changes to determine…

Multi-assetPairs tradingArbitrageStatistics
Stratmill research code

This proposed Chinese equity screen focuses on companies classified in the metaverse industry. It combines a market capitalization below 10 billion yuan, positive recent price return, and a profitability condition described as avoiding losses. The article…

EquitiesChina marketsFactor investingRisk management
Stratmill research code

This example generates order-latency records for a crypto trading backtest from historical feed data. It first keeps events that contain both exchange and local timestamps, then aggregates to one record per second using the last timestamps in each interval.…

CryptoHigh-frequency tradingExecutionMarket microstructure
Stratmill research code

This implementation describes a pairs strategy that estimates conditional probabilities from a fitted copula applied to each asset’s return ranks. It converts prices to returns, maps returns through marginal cumulative distribution functions, and uses the…

Pairs tradingStatisticsRisk managementPosition sizing
Stratmill research code

The method searches for hedge ratios that make a portfolio spread more stationary according to the Augmented Dickey–Fuller (ADF) test statistic. It defines the spread as the target asset’s price series minus a weighted sum of the other price series, then…

Pairs tradingStatisticsMean reversionArbitrage
Stratmill research code

The code implements a Cox–Ingersoll–Ross model for a mean-reverting portfolio, extending an Ornstein–Uhlenbeck model interface. It supports fitting the model to portfolio prices or to two assets, and estimates the long-run mean, reversion speed, and variance…

Mean reversionPairs tradingStatisticsRisk management
Stratmill research code

The code implements a statistical-arbitrage strategy that uses a fitted C-vine copula to estimate conditional probabilities for a target asset from a panel of returns. It transforms each asset’s returns through fitted cumulative distribution functions,…

EquitiesMean reversionArbitrageStatistics
Stratmill research code

The distance approach selects two instruments whose historical price series moved together, then trades when their price spread exceeds a chosen threshold during a later testing period. The strategy buys the instrument with the lower price and shorts the one…

Pairs tradingMean reversionArbitrageBacktesting
Stratmill research code

The document lays out a screening process for spreads used in pairs trading and statistical arbitrage. Candidate constituents are tested for cointegration, mean-reverting behavior, practical reversion speed, and frequent crossings of the spread’s mean. It…

Pairs tradingArbitrageMean reversionStatistics
Stratmill research code

This order manager handles exchange order updates arriving through separate REST and WebSocket channels, which may arrive late or out of sequence. It keeps each order’s state and applies an update only when its exchange timestamp is at least as recent as the…

ExecutionMarket microstructureRisk managementFutures
Stratmill research code

This document develops order book imbalance as an alpha input for a crypto market-making strategy. It defines static and standardized imbalance, then compares related measures: volume-adjusted mid-price (VAMP), weighted-depth order book price, and a hybrid…

CryptoMarket makingMarket microstructureHigh-frequency trading
Stratmill research code

This overview introduces neural networks as flexible models for financial prediction and describes multilayer perceptrons, recurrent networks with LSTM cells, and higher-order neural networks. It explains how input, hidden, and output layers combine…

Machine learningStatisticsEquitiesBacktesting
Stratmill research code

The document outlines an equities statistical arbitrage method that uses principal component analysis to estimate common return factors. Asset returns are standardized, PCA components provide factor weights, and regressions of returns on factor returns…

EquitiesMean reversionArbitragePortfolio construction