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

4,613 documents

Quant Q&A

The document derives an expected-utility rule for deciding whether to accept a two-outcome investment. An investor with logarithmic utility receives one return with probability 0.6 and incurs a loss with probability 0.4. The investment is avoided when the…

Risk managementStatisticsPosition sizing
Quant Q&A

The document walks through a numerical example of a long futures position whose daily gains and losses are settled in cash. Because the position controls many units while the trader posts only an initial margin deposit, a modest percentage move in the…

FuturesRisk managementPosition sizing
Quant Q&A

The document considers how to connect a forecast driven trading system to Kelly sizing. The example code estimates probabilities from forecast data, derives candidate stakes for long and short positions, updates a bankroll sequentially, and calculates…

Position sizingRisk managementBacktestingForex
Quant Q&A

The discussion explains why replacing variance with semivariance in the familiar Kelly fraction does not preserve the usual log-utility objective. The mean-over-variance expression relies on assumptions such as normally distributed returns and follows as an…

Position sizingRisk managementStatistics
Quant Q&A

The document discusses defending a short out-of-the-money strangle by entering a futures position when the underlying reaches a short strike. The proposed approach aims to respond before the option reaches breakeven, but the response explains that hedging…

OptionsFuturesRisk managementPosition sizing
Quant Q&A

The document considers how a market maker should choose the quantities displayed on bid and ask orders. Its central guidance is to define an acceptable inventory range and size orders in relation to the risk of reaching its limits. One response proposes…

Market makingPosition sizingRisk managementExecution
Quant Q&A

The document examines why the Merton portfolio formula can produce a large recommended allocation to equities. The fraction depends on expected excess return, volatility squared, and risk aversion. Using historical equity returns, a risk-free rate, and…

Portfolio constructionPosition sizingRisk managementEquities
Quant Q&A

The question asks how to size a variance swap as an imperfect hedge for an asset return that tends to weaken when its variance rises. It proposes modeling returns with a GARCH-in-mean relationship and setting swap notional to offset the estimated sensitivity…

OptionsVolatilityPosition sizingDerivatives pricing
Quant Q&A

The document discusses a bullish LEAPS call spread: buy an out-of-the-money call and sell a call at a higher strike, with both options expiring more than a year away. The proposed plan is to close the short call partway through the trade if the outlook…

OptionsDerivatives pricingRisk managementPosition sizing
Quant Q&A

The document considers a portfolio constraint under which each asset must either have zero weight or meet a positive minimum allocation. This creates a non-convex feasible set, so an ordinary continuous portfolio optimizer cannot represent the choice…

Portfolio constructionPosition sizingStatistics
Quant Q&A

The document explains relative risk aversion as absolute risk aversion scaled by wealth. The scaling makes the measure invariant to a change in the units used to express wealth. It also relates the measure to utility curvature: marginal utility and its rate…

Risk managementPosition sizingStatistics
Quant Q&A

The document asks how the Merton portfolio choice problem relates to Kelly sizing, which selects a bet size to maximize expected logarithmic wealth. It presents the familiar Merton risky-asset fraction in terms of excess expected return, return variance, and…

Position sizingRisk managementStatistics
Quant Q&A

The document shows how to express a joint allocation across multiple portfolios as one quadratic program. It stacks each portfolio’s asset weights into a single decision vector, then writes constraints for distributing each asset’s total holdings, matching…

Portfolio constructionRisk managementPosition sizingStatistics
Quant Q&A

The document considers how to reallocate capital when a fund manager breaches a drawdown limit, but it does not provide a direct optimization rule for distributing the withdrawn money among managers whose allocations cannot be reduced. Instead, its answer…

Risk managementPosition sizingPortfolio construction
Quant Q&A

For a futures position, exposure should be measured using the contract’s own price, since changes in that price determine the position’s profit and loss and daily variation margin. The contract size multiplied by the futures price is therefore the relevant…

FuturesPosition sizingDerivatives pricing
Quant Q&A

The document discusses how to train a trading model intended to operate only in low-volatility conditions. The question contrasts supplying volatility as a feature with explicitly excluding unsuitable market states. The response recommends retaining…

Machine learningVolatilityRisk managementPosition sizing
Quant Q&A

This explanation clarifies how to size a position to offset market exposure when an asset’s return sensitivity is described by a regression beta. The key step is to distinguish percentage returns from dollar profit and loss: beta scales the asset’s…

Position sizingRisk managementStatistics
Quant Q&A

The document considers portfolio weights chosen to bring portfolio variance close to a target while meeting a minimum expected-return requirement and a fully invested budget constraint. It discusses solving the resulting optimization at each rebalance date.…

VolatilityPortfolio constructionPosition sizingStatistics
Quant Q&A

The document explains how to represent leveraged trading in an account model. Borrowed funds can be represented as negative cash: buying shares reduces cash, potentially below zero, while selling shares increases it. The account’s equity is the sum of cash…

EquitiesRisk managementPosition sizing
Quant Q&A

The document asks how to use constant relative risk aversion utility to calculate the payment a person would accept to avoid an even-odds gamble. It also poses a second question about when a person with CRRA preferences rejects a gamble with a possible loss…

Risk managementStatisticsPosition sizing
Quant Q&A

The document compares selecting a betting fraction by maximizing the terminal wealth from one simulated sequence with choosing a fraction under the Kelly criterion. In a repeated even-odds coin game with a stated win probability, it calculates the classical…

Position sizingRisk managementStatisticsBacktesting
Quant Q&A

This document asks how much future company information, especially accounting results and profits, could explain subsequent stock returns if it were known in advance. It contrasts that hypothetical question with conventional factor research, which uses…

EquitiesFactor investingStatisticsPosition sizing
Quant Q&A

The example estimates one-day Value-at-Risk for a large position in at-the-money European call options on a non-dividend-paying stock. It uses a first-order approximation: convert annualized volatility to a daily standard deviation, take the adverse return…

OptionsRisk managementPosition sizingVolatility
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