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

Stratmill research code

The document explains a stochastic-control model for an arbitrageur trading a mean-reverting spread, such as an equity pairs position. It models mispricing with an Ornstein–Uhlenbeck process, allowing convergence timing to be uncertain and the spread to…

Pairs tradingMean reversionPortfolio constructionRisk management
MQL5 code base

HTH Trader describes a daily foreign exchange strategy that combines two currency pairs, EUR/USD with USD/CHF and GBP/USD with AUD/USD, in an effort to hedge existing pair relationships against drawdown. It uses the prior day’s EUR/USD deviation to choose…

ForexPairs tradingRisk managementExecution
Quant Q&A

This note compares Engle–Granger with Johansen for testing cointegration between two variables. It does not establish that either test is universally more powerful or more prone to false positives or negatives. Instead, it points readers toward a comparison…

StatisticsPairs tradingBacktesting
Quant Q&A

The document asks how the error-correction model (ECM) fits into the two-step Engle–Granger test for bivariate cointegration and pairs trading. The author understands the first step as regressing one series on the other to estimate the cointegrating…

Pairs tradingStatisticsMean reversion
Quant Q&A

The note addresses whether cointegration tests on dividend-paying stocks should use closing prices or adjusted closing prices. Its answer recommends adjusted prices, and ideally a series reconstructed from total returns, so corporate actions do not create…

EquitiesStatisticsPairs trading
Quant Q&A

This note asks how to choose the dependent asset when fitting an ordinary least squares hedge relationship among correlated equities. Using different stocks as the regression dependent variable produces different hedge ratios and therefore different spreads.…

EquitiesMean reversionPairs tradingStatistics
Quant Q&A

The document asks how coefficients from a regression of one stock’s price on two other stock prices can be translated into share quantities for a spread. The example fits a linear model without an intercept, using stock A as the target and stocks B and C as…

EquitiesPairs tradingStatisticsPosition sizing
Quant Q&A

The document examines why rolling ordinary least squares estimates of a pairs-trading hedge ratio can become unstable when the regression includes an intercept. The questioner observes that forcing the intercept to zero produces smoother beta estimates, but…

Pairs tradingStatisticsRisk managementEquities
Quant Q&A

The document explains how to turn a cointegrated pair into a mean-reversion strategy. Rather than treating the ratio of two prices as the spread, it proposes estimating a hedge coefficient, forming a residual as one asset’s price minus the coefficient times…

Pairs tradingMean reversionStatistics
Quant Q&A

The document raises a conceptual question about pair trading. The strategy described is to short the relatively expensive asset and buy the relatively cheap one when the spread between them is expected to revert toward its mean. The author asks whether…

Pairs tradingMean reversionStatistics
Quant Q&A

The document explains the direction of a basic pairs-trading signal built from the spread between the price changes of two correlated stocks. The questioner sees a spread above a positive threshold as valuable and expects it to be sold. The answer instead…

Pairs tradingMean reversionEquitiesTechnical indicators
Quant Q&A

The document examines why regressions or correlation tests between nonstationary integrated time series can appear significant even when the relationship is spurious. It refers to early econometric work documenting biased significance tests and later…

StatisticsPairs trading
Quant Q&A

The document discusses a preprocessing choice in a pairs trading workflow that applies principal component analysis (PCA) to ETF returns and clusters the resulting factor loadings. The question compares a paper’s stated procedure, which standardizes returns…

Pairs tradingStatisticsMachine learning
Quant Q&A

The document asks how to interpret Johansen cointegration vectors when screening pairs of stocks. It describes normalizing the first coefficient to one, then using the resulting coefficients and intercept to construct a spread. The questioner proposes…

EquitiesPairs tradingStatisticsMean reversion
Quant Q&A

The document considers whether a cointegrating hedge ratio can be estimated jointly with the parameters of an Ornstein–Uhlenbeck model for the resulting spread. It distinguishes estimating a parameter by maximum likelihood from testing whether the spread is…

Pairs tradingMean reversionStatistics
Quant Q&A

This note asks how to interpret cointegration vectors estimated from log prices, especially when coefficients are not equal and opposite. Exponentiating a relation such as one log price minus a multiple of another yields a stationary relationship involving…

StatisticsPairs tradingEquities
Quant Q&A

The document considers a cross-sectional equity mean-reversion idea: rank index constituents by past returns, pair the strongest performers with the weakest, and allocate more capital to the most extreme pairs using a linear weighting scheme. The main sizing…

EquitiesMean reversionPairs tradingPortfolio construction
Quant Q&A

The document explains why quantitative finance is broader than predicting the next stock move. It distinguishes market-making, where models help set fair customer prices and hedge exposures, from proprietary strategies that seek returns. In pricing and…

Market makingArbitragePairs tradingMean reversion
Quant Q&A

The document asks what to do when a hedge ratio in a pairs trade appears to produce a stationary, mean-reverting spread in most cases, but a trend remains in other cases. It asks whether the trend can be accounted for or removed to make the spread…

Pairs tradingMean reversionStatistics
Quant Q&A

The document raises a modeling choice in pairs trading: whether to define the spread between two assets using their prices or their returns. Price-based spreads can represent a relationship between asset levels, while return-based comparisons focus on…

EquitiesPairs tradingStatistics
Quant Q&A

The document is a short collection of suggested learning resources for pair trading and statistical arbitrage. It points readers toward a financial engineering text for econometric foundations, including cointegration and statistical tests used to assess…

Pairs tradingArbitrageStatisticsBacktesting
Quant Q&A

The discussion distinguishes correlation, which measures dependence between observations such as asset returns, from cointegration, which describes a long-run relationship between nonstationary time series. Correlated returns indicate that assets tend to…

EquitiesStatisticsPairs tradingMean reversion
Quant Q&A

This document considers relative-value trading between options on two similar, but nonidentical, indices. Matching equivalent strikes may allow a position in one index’s option to be offset with an option on the other, yet movements in the indices’ basis…

OptionsPairs tradingVolatilityRisk management
Quant Q&A

The document examines beta estimation in a pairs-trading model where the return of one stock depends on the return of another as well as a mean-reverting component. It argues that a straightforward regression of the two stock returns can produce a distorted…

Pairs tradingMean reversionStatisticsEquities