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

765 documents

Quant Q&A

The document asks how to normalize eigenportfolio weights when some components are negative, in a setting based on statistical arbitrage in U.S. equities. It contrasts dividing each weight by the signed sum with dividing by the sum of absolute weights. The…

Portfolio constructionPairs tradingEquitiesStatistics
Quant Q&A

The document presents a two-day example of a pairs trade that goes long one stock and short another, using roughly equal dollar amounts in each leg. It calculates the opening and closing cash flows from the share quantities and prices, then adds them to…

EquitiesPairs tradingPosition sizingRisk management
Quant Q&A

The document explains that regression on prices and regression on returns answer different questions in pairs trading. Regressing returns, or examining their correlation, describes how the assets’ short-term movements relate. The resulting weights can help…

Pairs tradingArbitrageStatistics
Quant Q&A

The document asks how to calculate the sum of squared deviations (SSD) used in a pairs-selection approach attributed to Gatev and coauthors. It contrasts two interpretations: summing squared deviations of each stock’s observations from its own mean, and…

EquitiesPairs tradingStatistics
Quant Q&A

The document explains how a t-statistic can test whether a trading strategy’s average return differs from a null value, commonly zero. A small statistic indicates insufficient evidence to reject the null of no excess return. Because return observations can…

StatisticsRisk managementBacktestingPairs trading
Quant Q&A

The document asks how to read Johansen cointegration test output for two stocks and whether cointegration implies a mean-reverting pair. It presents an initial result indicating one rejected rank hypothesis, followed by a detailed trace-test output where…

StatisticsEquitiesPairs tradingMean reversion
Quant Q&A

The document asks how to define a spread for pairs trading after estimating a linear relationship between two asset prices. It compares subtracting the fitted intercept and scaling one price by the estimated gradient with omitting the intercept or simply…

Pairs tradingMean reversionStatisticsPosition sizing
Quant Q&A

The document considers a GARCH(1,1) model fitted to the spread between two correlated assets. Although the reported coefficient estimates appear unremarkable, the standardized residuals show a bimodal distribution, prompting the question of whether such a…

StatisticsVolatilityPairs trading
Quant Q&A

The document asks how to choose the lag length when applying the Johansen cointegration test to two time series. It notes that test conclusions can vary with the lag specification: some choices may lead to rejection of the null hypothesis while others do…

StatisticsPairs trading
Quant Q&A

The discussion considers what an interface for monitoring an algorithmic portfolio should show. Its central design principle is to choose metrics and visualizations according to the strategy and the decisions the dashboard must support, rather than building…

Risk managementPairs tradingExecutionPortfolio construction
Quant Q&A

The document discusses assets that can have positive expected returns while their deviations from those trends are negatively correlated. It distinguishes this pattern from pairs trading, which generally seeks to profit from relative performance, and frames…

Portfolio constructionRisk managementPairs tradingEquities
Quant Q&A

The document presents a question about applying the Johansen procedure to oil and corn price series after unit-root tests suggest both are nonstationary. It shows example eigenvalue and trace test statistics alongside critical values, then asks how to…

CommoditiesStatisticsPairs trading
Quant Q&A

The document asks why a pairs-trading spread is formed from stock price levels when the hedge ratio is estimated using price changes. The answer identifies cointegration: two nonstationary price series may share a long-run relationship such that a particular…

EquitiesPairs tradingMean reversionStatistics
Quant Q&A

The document presents an attempted Kalman filter implementation for estimating a changing hedge ratio between two cointegrated stock log-price series. The proposed state is a single beta that evolves over time, with the second stock’s log price treated as…

EquitiesPairs tradingStatisticsMachine learning
Quant Q&A

The document asks how the long-run mean, often denoted theta, in an Ornstein–Uhlenbeck model should relate to the initial mispricing of a mean-reverting pair spread. It refers to a paper on optimal profit-taking and stop-loss boundaries, which describes…

Pairs tradingMean reversionStatistics
Quant Q&A

The document explains how the change in a log-price spread relates to the return from a pairs position with a hedge ratio of one. For a spread defined as the log price of asset A minus the log price of asset B, its change equals A’s log return minus B’s log…

Pairs tradingEquitiesStatistics
Quant Q&A

The document examines an apparent mean-reverting basket built from several foreign-exchange rates. The proposed process fits a linear regression to estimate hedge ratios, forms a spread, then applies an augmented Dickey–Fuller test. The reported significance…

ForexPairs tradingMean reversionBacktesting
Quant Q&A

The document discusses whether to include an intercept when estimating the hedge ratio for a pairs trade. For two integrated asset price series that are cointegrated, it presents a regression with a slope and constant, where the residual is stationary.…

Pairs tradingStatisticsMean reversion
Quant Q&A

The document discusses how to reduce the risk of trading spurious cointegration by screening candidate assets for economic relationships. It recommends looking for securities with strong ties, such as related commodity benchmarks, a commodity and associated…

Pairs tradingStatisticsEquitiesCommodities
Quant Q&A

The document examines a practical issue in pairs trading: reversing which security is treated as the dependent variable can change the estimated hedge ratio and produce very different spread values and z-scores. The author illustrates the problem by fitting…

Pairs tradingMean reversionStatistics
Quant Q&A

The discussion asks whether statistical arbitrage can work in foreign exchange and describes a study of relative-value trading among G10 currencies. The cited approach forms currency pairs from USD crosses, measures their misalignment, and trades when…

ForexPairs tradingMean reversionBacktesting
Quant Q&A

The document offers a concise way to extend a principal component analysis hedge-ratio method from two instruments to a basket with multiple legs. It proposes building the covariance matrix for the instruments, finding its eigenvectors, and selecting an…

StatisticsPairs tradingPortfolio construction
Quant Q&A

The document describes a cross-exchange futures pairs strategy involving products whose prices are expected to remain close. The trader enters one leg with a limit order and the other with a market order, aiming for price neutrality. The strategy’s signal is…

FuturesPairs tradingMean reversionMarket making
Quant Q&A

The document surveys ways to identify candidate pairs for a pairs-trading strategy. It describes a statistical route—searching across instruments for correlated price movements—and names cointegration as a commonly discussed selection approach. It also…

Pairs tradingEquitiesStatisticsMean reversion