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

Search the library

4,613 documents

Quant Q&A

The document asks how to interpret a beta-based hedge formula that converts an asset position into a required number of SPY shares. The inputs are the asset’s market sensitivity, its price and quantity, and SPY’s price. Multiplying beta by the asset position…

EquitiesPosition sizingRisk management
Quant Q&A

The response argues that risk management should account for more than variance, emphasizing the distinction between ordinary losses and ruin. It points to drawdowns, leverage, and the possibility of bankruptcy as practical threats even for assets with…

Risk managementPosition sizingEquities
Quant Q&A

The document presents a long-short risk-budgeting formulation attributed to a UBS paper on trend-following and risk parity. It maximizes a signal-weighted sum of logarithms of absolute portfolio weights, limits portfolio volatility, requires each position’s…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

The document considers whether short gamma, commonly associated with selling options, is inherently a losing strategy. Its response distinguishes cash-secured put writing from leveraged, uncovered option selling: collateral can limit losses to the invested…

OptionsVolatilityRisk managementPosition sizing
Quant Q&A

The document explains how to track account value when trading with borrowed funds. It separates cash from share holdings: purchases reduce cash and add shares, while sales increase cash and reduce shares. A negative cash balance represents a margin loan; a…

EquitiesRisk managementPosition sizing
Quant Q&A

The document explains why portfolio optimizers may constrain or penalize the L1 or L2 norm of asset weights. It connects these constraints to regularization in regression: L1 and L2 penalties can limit estimation error and produce more stable weights, while…

Portfolio constructionRisk managementPosition sizingStatistics
Quant Q&A

The question asks how to maintain a portfolio allocation to long volatility through repeatedly purchased straddles while limiting the chance of exhausting the capital assigned to the strategy. The brief answer points to the Kelly criterion as a framework for…

OptionsVolatilityPosition sizingRisk management
Quant Q&A

The document poses an optimization problem for arbitrage across multiple products. Given current order book prices and liquidity, a trader wants to choose trade quantity that maximizes profit after accounting for slippage. A three-product cycle illustrates…

ArbitragePosition sizingExecutionMarket microstructure
Quant Q&A

The document asks how to implement a regression hedge when the estimated beta is fractional and a broker may not permit fractional units. In its example, a regression relates the price or value of one instrument to another with a beta of 0.35. A textbook…

Risk managementPosition sizingStatistics
Quant Q&A

The answer clarifies that the Kelly criterion maximizes expected logarithmic growth of capital, rather than bankroll in an unrestricted sense or a guaranteed return. If a fixed fraction of capital is invested on each trade, wealth compounds as a product of…

Position sizingRisk managementStatistics
Quant Q&A

The document frames a position-sizing problem for an algorithmic strategy that generates a random number of trade alerts during a day. The trader has a finite wallet and wants to reserve enough capital to act on later signals, rather than committing the…

EquitiesPosition sizingRisk management
Quant Q&A

The document considers ways to make a trend-following system’s equity curve less volatile after observing substantial drawdowns. Suggestions include studying whether returns show persistence or reversal, using a secondary trend or equity-based stop to adjust…

Trend followingMean reversionRisk managementPosition sizing
Quant Q&A

The document asks how to express a target set of net currency positions using the fewest foreign-exchange pairs while also limiting the absolute size of positions. It illustrates that different combinations of currency trades can produce the same net…

ForexStatisticsPosition sizing
Quant Q&A

The document examines why compounding the asset’s period returns does not match the holding-period return of a short position when the short is evaluated using its initial notional. Its example uses a price path of 5, 6, 4, and 2.5, with the short asset…

StatisticsPosition sizingPortfolio construction
Quant Q&A

The discussion considers how to divide limited capital among buy orders set at progressively deeper price drops, based on the idea that sharp temporary declines may rebound. It formulates the allocation as an expected-profit optimization: assign…

Position sizingMean reversionRisk managementStatistics
Quant Q&A

The document explains how to calculate portfolio risk when asset weights can be negative. For independent or uncorrelated assets, portfolio variance is the sum of each asset’s variance multiplied by the square of its weight; standard deviation is the square…

Portfolio constructionRisk managementStatisticsPosition sizing
Quant Q&A

The document examines whether a strategy that slightly outperforms an index can produce a profitable market-neutral bet by pairing a long position in the strategy with a short position in the index. Its example illustrates how a small return spread…

EquitiesRisk managementPosition sizing
Quant Q&A

The discussion gives several reasons mental arithmetic can matter in trading. It can help traders quickly judge whether a calculator output is plausible, follow numerical conversations, and avoid errors when entering or unwinding large hedged positions…

ExecutionRisk managementPosition sizing
Quant Q&A

The document explores how to adapt volatility targeting when a single EWMA lookback reacts either too slowly to market changes or too strongly to routine variation. It outlines fast and slow EWMA variance estimates, explains how half-life determines the…

VolatilityPosition sizingRisk managementBacktesting
Quant Q&A

The document sets up Merton’s optimal portfolio allocation problem as a Hamilton–Jacobi–Bellman equation for an investor choosing a portfolio share between zero and one. It proposes discretizing that control and solving the value function with an implicit…

Portfolio constructionPosition sizingStatistics
Quant Q&A

The document explains how portfolio weights can be negative or exceed one when an optimization allows short selling and leverage. A negative weight represents a short position, while a weight above one represents exposure greater than the investor’s capital,…

Portfolio constructionPosition sizingRisk management
Quant Q&A

The document asks how to make the absolute position weights in a six-stock long-short portfolio as equal as possible while respecting gross exposure, long exposure, and beta-adjusted net exposure limits. It proposes minimizing the variance of absolute…

Portfolio constructionPosition sizingEquitiesRisk management
Quant Q&A

The document discusses how to calculate a portfolio’s cumulative return from asset prices and weights that change monthly. It distinguishes a portfolio rebalanced to target weights every day from one whose holdings are allowed to drift between monthly…

BacktestingPortfolio constructionPosition sizing
Quant Q&A

The note explains how to interpret a portfolio weight greater than one in a combination of a risky market portfolio and a risk-free asset. A positive risky-asset weight above 100% is funded by a negative weight in the risk-free asset, which represents…

Portfolio constructionPosition sizingRisk management