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
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
QuantRocket
7 documents
Lumibot strategies
7 documents
Awesome Quant
1 documents

Search the library

4,613 documents

Quant Q&A

The document asks how to turn a sequence of predicted future prices into an optimal trading plan for a single asset and cash pair. Its proposed setting removes bid–ask spreads, restricts the trader to long-only exposure, and fixes the asset position size, so…

ExecutionBacktestingPosition sizing
Quant Q&A

The document asks how to choose among portfolios on a modern portfolio theory efficient frontier when the objective is long-run growth. It points readers to research on Kelly-optimal portfolios, including work on applying the Kelly criterion to stock…

Portfolio constructionPosition sizingStatistics
Quant Q&A

The document asks how to set leverage separately for a short-only crypto strategy that trades many coins, holds positions from hours to days, and uses signal-based exits without fixed stops or profit targets. Its central risk is that sharp upward price…

CryptoFuturesSpot marketsPosition sizing
Quant Q&A

The document explains why the euro profit from an XAUUSD trade cannot be calculated from the gold price movement alone. A trade denominated in dollars creates exposure to the EUR/USD exchange rate when the account balance is in euros. The response describes…

ForexCommoditiesRisk managementPosition sizing
Quant Q&A

This note explains how to interpret an initial margin requirement when calculating the stock price that triggers a maintenance margin call. The requirement is the investor’s equity contribution to the purchase, so the financed portion is the complement of…

EquitiesRisk managementPosition sizing
Quant Q&A

The document explains the signs and relative sizes of mark-to-market changes for credit default swaps when spreads move. Selling protection loses value when spreads widen, while buying protection gains value. The cited example gives risky annuities and…

Fixed incomeDerivatives pricingRisk managementPosition sizing
Quant Q&A

The discussion explains why hedging agency mortgage backed securities with Treasuries alone can leave substantial spread risk. Treasury yields may move independently of mortgage spreads, while mortgages also have duration and prepayment related convexity:…

Fixed incomeDerivatives pricingRisk managementPosition sizing
Quant Q&A

The document asks how to construct a fair buy-and-hold comparison for a strategy that accumulates shares over several days, sells the accumulated position, and later repeats the process with a different trade size. The central challenge is that the…

BacktestingPosition sizingEquitiesPortfolio construction
Quant Q&A

The document presents a question about how realized profit and loss, average opening price, and unrealized profit and loss behave when a trade crosses through zero and reverses direction. Its included answer proposes a fill-by-fill accounting procedure that…

Risk managementPosition sizingStatistics
Quant Q&A

The document applies the Kelly criterion to a repeated trade with equal probabilities of gain and loss but different payoff sizes. It chooses the fraction of current capital that maximizes expected logarithmic wealth, using the two possible post-trade wealth…

Position sizingRisk managementStatistics
Quant Q&A

The document asks how estimated factor exposures can guide weights across a universe of securities. Its answer describes a high-minus-low construction: rank assets on a selected factor, form upper and lower groups, and take opposing positions in those…

Factor investingPortfolio constructionEquitiesPosition sizing
Quant Q&A

The document examines why a Kelly bettor may stake a larger total fraction after first taking a bet at shorter odds and then being offered a second bet at longer odds on the same outcome. It starts from the Kelly criterion, which chooses a wager fraction to…

Position sizingRisk managementStatistics
Quant Q&A

The note explains how to define portfolio weights when a long position is fully funded by an equal-sized short position. For a $200 long in Apple and a $200 short in Google, it uses signed weights of +1 and −1, calculated relative to the portfolio’s net…

EquitiesPortfolio constructionPosition sizing
Quant Q&A

The document considers whether to size the long and short legs of a pairs trade in proportion to each stock’s price variance. The proposed intuition is to allocate more capital to the more volatile asset, which may move more as the spread converges. The…

Pairs tradingVolatilityPosition sizingRisk management
Quant Q&A

The document explains that a minimum variance hedge ratio can exceed one. It gives the relationship between the hedge ratio, spot-to-futures price correlation, and the ratio of their price-change standard deviations. Since correlation cannot exceed one, a…

FuturesRisk managementPosition sizing
Quant Q&A

The document examines how to choose a Kelly bet fraction when returns are not Gaussian. It notes that the familiar mean-over-variance estimate is exact only under Gaussian assumptions, and frames the general problem as maximizing expected logarithmic wealth…

Position sizingRisk managementStatistics
Quant Q&A

The document asks whether the Kelly fraction, which maximizes expected log wealth, has a closed-form solution for finite discrete payoff distributions bounded between a full loss and a full gain. It gives the symmetric two-outcome case, where the optimum…

Position sizingStatisticsRisk management
Quant Q&A

The document contrasts the discrete Kelly formula for sizing a binary wager with the continuous Kelly rule used for strategies whose returns vary continuously. For a strategy with mean excess return and return volatility, the continuous rule expresses…

Position sizingRisk managementStatistics
Quant Q&A

The note derives the price elasticity of an investment’s return when return is defined relative to initial wealth. With initial wealth normalized to one, return is price minus one, so elasticity is price divided by price minus one. The apparent mismatch with…

StatisticsRisk managementPosition sizing
Quant Q&A

The document explains a two-asset mean-variance allocation in which the risky asset receives a weight greater than one and the risk-free asset receives a negative weight. For an investor with a fixed amount of capital, the interpretation is to invest the…

Portfolio constructionPosition sizingRisk management
Quant Q&A

The document considers how to compare backtested strategies when returns are not normally distributed, especially when negative skew and leverage make a Sharpe ratio an incomplete description of risk. It raises maximum drawdown as a possible measure of…

BacktestingRisk managementPosition sizingStatistics
Quant Q&A

The document examines a simulation of a portfolio that borrows to double its exposure, repays the loan daily, and estimates a Sharpe ratio from repeated annual trials. The central modeling issue raised in one answer is the simulated asset return: for…

StatisticsRisk managementBacktestingPosition sizing
Quant Q&A

The discussion explains why a machine-learning model with lower mean squared or root mean squared prediction error can still earn less in a backtest. Prediction accuracy evaluates numerical closeness to observed returns, whereas profit depends on how…

Machine learningEquitiesBacktestingPosition sizing
Quant Q&A

The document explains the conversion-factor adjustment in a duration hedge using bond futures. With a single cheapest-to-deliver bond and no delivery optionality, the futures price is the CTD bond delivery price divided by its conversion factor.…

FuturesFixed incomeRisk managementPosition sizing