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 course library

The document implements a Turtle-style breakout strategy using Donchian channel levels for entries and exits, with ATR-based stop placement and position sizing. It tracks the trade’s high and low, moves stops as prices advance, and adds to positions at…

CryptoTrend followingBreakoutTechnical indicators
Quant Q&A

The document surveys constraints that practitioners may impose when optimizing a portfolio. It notes that the formulation matters: a fully invested portfolio typically has weights summing to one, while an active portfolio expressed as deviations from a…

Portfolio constructionRisk managementPosition sizingExecution
Quant Q&A

The discussion compares evaluating a strategy through trade or portfolio returns with simulating a starting capital amount and measuring ending equity or annualized return. It argues that the appropriate view depends on the strategy and how closely the…

BacktestingRisk managementPosition sizingExecution
Quant Q&A

The document asks whether a proposed optimal holding for a CARA investor with normally distributed risky-asset payoffs is correct. Its setup compares expected payoff net of the risk-free investment cost with payoff variance, and suggests scaling expected…

Portfolio constructionPosition sizingStatisticsRisk management
Quant Q&A

The document derives a way to constrain a fund’s next weekly return so that its rolling five-year, annualized ex-post volatility is less likely to exceed a chosen threshold. It treats the historical weekly returns as fixed, assumes the next return is…

VolatilityRisk managementStatisticsPosition sizing
Quant Q&A

The document explains why equal percentage losses and gains do not cancel when returns compound. After a loss, the same percentage gain applies to a smaller capital base, so the account remains below its starting value. It gives a formula for the number of…

StatisticsRisk managementPosition sizing
Quant Q&A

The document considers a heterogeneous portfolio in which inverse-volatility risk parity can assign very large weights to instruments whose estimated volatility has fallen relative to the rest. It describes a proposed cap that compares risk-parity weights…

Portfolio constructionRisk managementPosition sizingVolatility
Quant Q&A

The discussion describes several ways traders apply the Kelly criterion, while questioning how well its assumptions fit real trading. One approach links Kelly sizing to volatility targeting: expected return divided by a chosen Sharpe ratio sets a volatility…

Position sizingRisk managementBacktesting
Quant Q&A

This document asks how to size trades in back-adjusted continuous futures data when historical prices can be near zero or negative. It contrasts two attempted approaches: scaling position size inversely with price subject to a unit cap, and allocating a…

FuturesPosition sizingBacktestingRisk management
Quant Q&A

This discussion explains how to interpret a time-varying leverage multiplier in a winner-minus-loser momentum strategy. The multiplier scales both sides of the portfolio: for a given amount of capital, the long positions in winners and short positions in…

MomentumRisk managementPosition sizingEquities
Quant Q&A

The document raises a pairs-trading question about estimating hedge ratios with rolling ordinary least squares on two stocks’ log returns. The author observes that when the stocks have very different share prices, the estimated ratio can still be near zero…

EquitiesPairs tradingStatisticsPosition sizing
Quant Q&A

The document asks how to automate margin calculations for a portfolio of Eurex-listed products, noting that the available calculation tool is a Windows application with a graphical interface. The accepted response describes a simpler approach for estimating…

FuturesRisk managementPosition sizing
Quant Q&A

The document introduces the idea that a futures hedge may require a ratio other than one contract for each unit of spot exposure, even when the hedge and underlying have matching maturity and asset. It asks how the tailing factor affects the hedge when…

FuturesRisk managementPosition sizing
Quant Q&A

The document discusses how to represent long and short futures positions when estimating portfolio Value at Risk. One answer recommends converting contracts to notional exposure using the contract count, point value, and underlying futures level; it also…

FuturesRisk managementPosition sizing
Quant Q&A

The example explains why restoring target weights in a leveraged long-short portfolio can require buying an appreciated asset and increasing a short position in an underperformer. After a strong gain in the long asset, the portfolio’s total value has also…

Portfolio constructionPosition sizingRisk managementTrend following
Quant Q&A

The document explains why borrowing at the risk-free rate to scale a risky portfolio increases its expected excess return and volatility by the same factor. The Sharpe ratio uses excess return, so the leveraged portfolio’s numerator is the leveraged…

StatisticsRisk managementPosition sizing
Quant Q&A

The document examines whether scaling a risky portfolio by the ratio of a target volatility to estimated volatility guarantees that realized portfolio volatility converges to the target. The answer first shows that, if next-period conditional volatility were…

VolatilityRisk managementPosition sizingStatistics
Quant Q&A

The document asks how to allocate a fixed budget across several investment opportunities whose occurrence is independent, whose returns depend on allocated amounts, and whose parameters may be uncertain. It distinguishes this setup from single-bet Kelly…

Portfolio constructionPosition sizingRisk managementStatistics
Quant Q&A

The document poses a fixed-income trade-sizing problem: construct a flattening position using two-year and ten-year zero-coupon bonds, with a target profit for a specified change in the yield spread. It asks for each leg’s present-value exposure and whether…

Fixed incomePosition sizingRisk management
Quant Q&A

The question concerns a stochastic wealth equation that appears to produce inconsistent expressions when a portfolio strategy is substituted into it. The answer identifies a distinction between the number of asset shares held and the fraction of wealth…

Portfolio constructionPosition sizingRisk management
Quant Q&A

The document explains how ATR-based position sizing estimates a share count from account capital, a chosen risk fraction, and a stop distance expressed as a multiple of average true range. The resulting count represents shares sized to a target loss if the…

EquitiesVolatilityRisk managementPosition sizing
Quant Q&A

The document clarifies terminology for a trading account’s position at the end of a session. It treats overnight inventory, end-of-day holdings, and the end-of-day net position as referring to the inventory remaining at market close and carried into the…

Market microstructureExecutionPosition sizing
Quant Q&A

The discussion compares two ways to allocate capital between trade situations with different estimated profit factors. Scaling lots in proportion to each factor is presented as a way to maximize average profit factor across a fixed number of trials. With the…

Position sizingRisk managementStatistics
Quant Q&A

The document discusses an interview prompt asking what to do with a large capital allocation over either a multi-year horizon or a few days. One response frames the problem as maximizing expected return over the available horizon, with the idea that a longer…

Market makingRisk managementPosition sizing