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
Quantpedia
86 documents
TqSdk
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
Quantopian lectures
45 documents
Binance API docs
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
Lumibot strategies
7 documents
QuantRocket
7 documents
Awesome Quant
1 documents

Search the library

765 documents

Quant Q&A

The document raises a methodological question about how frequently stock pairs are cointegrated. The author reports testing pairs formed from a sample of 50 stocks using Engle–Granger and Johansen approaches. The reported cointegration rates differ sharply:…

EquitiesPairs tradingStatistics
Quant Q&A

The document clarifies how to read output from the Johansen cointegration procedure for two time series. It explains that candidate cointegrating vectors are ordered by maximum likelihood, while the associated loading weights describe their role in a vector…

StatisticsPairs tradingMean reversionBacktesting
Quant Q&A

The document asks how to quantify rolling divergence or convergence between financial series, using asset prices and a relative strength index as an example. Its answer redirects the problem toward pairs trading when the series are nonstationary and their…

Pairs tradingMean reversionStatistics
Quant Q&A

The document asks how to size two equity legs when a mean-reversion strategy trades their price ratio. Rolling estimates of the ratio’s mean and standard deviation produce a z-score, with entry beyond an outer threshold, exit near the mean, and a more…

EquitiesPairs tradingPosition sizingRisk management
Quant Q&A

The document presents a stock-pair strategy that selects highly correlated financial shares during a formation window, then trades a price-ratio z-score during a later period. It describes entering opposing long and short positions when the ratio moves…

EquitiesPairs tradingMean reversionPosition sizing
Quant Q&A

The document asks whether two price series that appear cointegrated at a daily frequency should also be expected to show cointegration or mean reversion intraday. The questioner reports finding cointegration in daily prices but not in intraday price levels,…

StatisticsMean reversionPairs trading
Quant Q&A

Cointegration describes nonstationary price series whose particular linear combination is stationary. The analogy of a person walking with a dog illustrates the idea: each can wander, but their separation remains bounded over the long run. A common…

StatisticsPairs tradingMean reversionEquities
Quant Q&A

The document considers whether cointegration between sovereign credit default swap spreads can guide a pairs trade, and how to interpret hedge weights derived from spread levels versus log spreads. Its main response warns that CDS positions do not behave…

Fixed incomeDerivatives pricingPairs tradingRisk management
Quant Q&A

The document explains why the labels “long the spread” and “short the spread” can be confusing in pairs trading: their meaning depends on how the spread is defined. In a distance-based convergence strategy, the trader sells whichever asset has outperformed…

Pairs tradingMean reversionStatistics
Quant Q&A

The document raises a fixed-income relative-value question about trading a deliverable bond that is not the cheapest to deliver (CTD) against a bond future. The proposed position is long the cash bond and short the future, with the expectation that the…

Fixed incomeFuturesArbitragePairs trading
Quant Q&A

The document asks how to interpret MATLAB output from a Johansen trace test applied to two series. It shows results for the hypotheses associated with cointegration rank zero and rank one, including trace statistics, critical values, p-values, and a decision…

StatisticsPairs tradingMean reversion
Quant Q&A

The document compares three ordinary least squares specifications for estimating a hedge ratio before applying an augmented Dickey–Fuller test to the residual spread: regression through the origin, regression with an intercept, and the usual regression with…

Pairs tradingStatisticsMean reversion
Quant Q&A

The document describes fitting a bivariate copula to two stock return series, then comparing simulated and observed Kendall rank correlations. The fitting step selects a BB8 copula, but the later simulation instead uses a Clayton copula with parameter 1.48…

StatisticsEquitiesPairs tradingBacktesting
Quant Q&A

The discussion addresses lookback selection when using OLS residuals to test whether a pair of assets is cointegrated for a statistical-arbitrage strategy. It cautions that a fixed window can make relationships appear significant only for the selected…

Pairs tradingMean reversionStatisticsBacktesting
Quant Q&A

The document describes a search across many NYSE ticker pairs, testing each combination for cointegration or stationarity. One pair, whose companies appear unrelated and belong to different sectors, showed a strong one-year backtest. The author worries that…

EquitiesPairs tradingStatisticsBacktesting
Quant Q&A

The document asks how to turn estimated coefficients from a three-asset cointegration relation into dollar allocations for a mean-reversion trade. Its example models the log price of one security as a linear combination of the other two log prices, then…

EquitiesMean reversionPairs tradingPortfolio construction
Quant Q&A

This discussion compares the Engle–Granger approach, which regresses one series on another and tests the residual portfolio for stationarity, with the Johansen method, which can test several series together and identify multiple cointegrating relationships.…

Pairs tradingStatisticsEquitiesRisk management
Quant Q&A

The document raises a practical implementation problem for a mean reversion strategy on multiple cointegrated assets. The cited model estimates an optimal inventory from regression estimates and their derivatives, but its output consists of fractional asset…

FuturesHigh-frequency tradingMean reversionPairs trading
Quant Q&A

The document considers how to represent the risk of a four-leg relative-value trade involving 10-year and 30-year swap spreads. Each spread combines a swap and a benchmark bond; the example takes opposing positions in the two maturities to express a view…

Fixed incomeFuturesStatisticsRisk management
Quant Q&A

The document asks how to simulate two cointegrated time series when their beta coefficient changes gradually, rather than remaining fixed. It distinguishes this goal from simply generating returns with a constant correlation, and seeks a model that can…

StatisticsPairs tradingBacktesting
Quant Q&A

The document frames tactical portfolio tilts, such as overweighting or underweighting a stock-bond pair trade relative to a benchmark, as a constrained optimization problem. The decision vector represents trade sizes, the signal vector represents desired…

Portfolio constructionPairs tradingRisk management
Quant Q&A

The document explains how to estimate cointegrating relationships among multiple time series using the Johansen procedure in R. It recommends the `ca.jo` function from the vars package, illustrating its use on four series from the package’s Denmark dataset,…

StatisticsMean reversionPairs trading
Quant Q&A

The document considers how to calculate and annualize the Sharpe ratio for a mid-frequency pairs strategy whose positions typically last several days and whose trades occur a few times per month. The questioner expects monthly returns to show mostly realized…

Pairs tradingStatisticsBacktesting
Quant Q&A

The document identifies a proposed long-short Treasury swap position as a 5s–30s curve steepener. The position is long five-year exposure and short thirty-year exposure, with sizing intended to make the legs duration neutral. Its stated rationale is positive…

Fixed incomeFuturesPairs tradingCarry