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 explains how to estimate P&L for a position long a government bond and paying fixed on an interest rate swap. It starts with each leg’s DV01 and its yield change: multiplying them gives the bond and swap P&Ls, which sum to the trade’s total. A…

Fixed incomeDerivatives pricingRisk managementPosition sizing
Quant Q&A

The document considers a euro-based investor holding a US dollar S&P 500 ETF and asks how to calculate a minimum-variance hedge ratio against dollar depreciation. Although the question starts from the usual correlation-and-volatility formula, the answer…

EquitiesForexFuturesRisk management
Quant Q&A

The document examines how to hedge a government bond portfolio against interest-rate changes with Treasury futures. It sets out a portfolio’s market value and modified duration, the deliverable bond’s duration, contract value, and a six-month rate, then…

FuturesFixed incomeRisk managementPosition sizing
Quant Q&A

The document asks how to update the weight of a long or short swap after its value changes. It distinguishes a holding’s value relative to the portfolio’s original value from its weight in a portfolio whose total value has also changed. A long position with…

Portfolio constructionPosition sizingRisk management
Quant Q&A

The document addresses how an event-driven allocator can value free capital when future signals arrive unpredictably and positions tie up capacity. It frames the problem as approximate dynamic programming, with a compact state covering available capital,…

Portfolio constructionPosition sizingRisk managementBacktesting
Quant Q&A

The document examines how a sequence of bet sizes maps to share holdings, cash, and final profit. Using two strategies with identical price forecasts but different position adjustments, it shows that the path of exposure matters: the first strategy earns a…

Position sizingRisk managementExecution
Quant Q&A

The document asks how to apply Kelly sizing to angel portfolios when investments are made in parallel, pay out at unknown times, and may have different outcomes. It proposes scaling each investment’s Kelly fraction by a decreasing schedule so that the total…

Position sizingPortfolio constructionRisk managementStatistics
Quant Q&A

The document describes a paper-trading problem in which a cash-neutral long–short equity portfolio repeatedly runs out of excess liquidity when target positions are converted into share orders. The trader scales portfolio weights by a high fraction of…

EquitiesRisk managementPosition sizingExecution
Quant Q&A

The document asks whether reducing exposure in a leveraged long/short equity portfolio at predefined drawdown thresholds can manage risk, and what risks such active deleveraging may introduce. The proposed approach cuts portfolio exposure in stages as losses…

EquitiesRisk managementPosition sizing
Quant Q&A

The question asks how to keep hierarchical risk parity allocations within per-asset bounds while preserving the method’s recursive allocation across correlation clusters. One proposed approach examines each pair of branches at every split. It calculates each…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

The document considers how to represent margin and capital use when backtesting a long-short futures strategy. Its central guidance is that exchange margin is a minimum collateral requirement for protecting the exchange, not a sensible target for sizing…

FuturesRisk managementPosition sizingBacktesting
Quant Q&A

The document clarifies how to interpret the tick specification for the Mini Nikkei futures contract traded on the Osaka exchange. The quoted increment is five index points, and the stated value of one tick is 500 yen. Thus, the monetary value applies to the…

FuturesPosition sizing
Quant Q&A

The document considers how to study what happens after a stop, target, or other risk rule closes a position. For a formal strategy, it proposes running two simulations in parallel with identical entry logic: one uses bracket exits and the other does not.…

Risk managementBacktestingPosition sizing
Quant Q&A

The document derives allocation weights for two ETFs tracking the same index with different daily leverage: one returns negative one times the index move, and the other returns 1.5 times the move. It assumes the full portfolio is invested across the two…

EquitiesPortfolio constructionPosition sizingRisk management
Quant Q&A

The discussion considers how to assess whether a candidate holding improves diversification in an existing portfolio. One proposed method combines pairwise correlations with position weights to form a weighted average correlation, then compares that measure…

Portfolio constructionStatisticsRisk managementPosition sizing
Quant Q&A

This exchange examines why borrowing below a property’s capitalization rate may still reduce first-year cash-on-cash return. The key distinction is between the debt interest rate and the loan constant, which measures annual debt service relative to the loan…

Risk managementPosition sizing
Quant Q&A

The document poses implementation and interpretation questions about marginal risk contributions in a long-short portfolio. It describes legacy code that applies a marginal volatility formula using each instrument’s sided U.S. dollar notional as its weight.…

Risk managementPortfolio constructionPosition sizing
Quant Q&A

The document asks how to chart a long-short position when its two stocks have different capital weights or market sensitivities. One response says to combine each stock’s price or profit-and-loss contribution using the same weights as the position, so the…

EquitiesPairs tradingRisk managementPosition sizing
Quant Q&A

The document addresses how to keep a portfolio optimizer from assigning zero weight to securities an investment team wants represented. It describes a mean-variance objective using expected returns and a covariance matrix, then proposes minimum weight bounds…

EquitiesPortfolio constructionPosition sizingRisk management
Quant Q&A

This document explains how to use the PMwR backtesting framework when trade sizing depends on portfolio state at each decision point. The example defines a signal function that reads current wealth, cash, and holdings, then uses that information while…

BacktestingPosition sizingPortfolio construction
Quant Q&A

Portfolio weights far above 1 or below 0 can represent leveraged long and short positions. In mean-variance optimization, extreme paired positions may arise when the model estimates that two similarly risky assets have sharply different expected returns. It…

Portfolio constructionRisk managementPosition sizingStatistics
Quant Q&A

The document examines why a repeated horse-race model that requires bettors to wager all their wealth assigns each horse a share equal to its win probability, even when the payout odds differ. Under the expected log-wealth objective, the log of each horse’s…

Position sizingRisk managementStatistics
Quant Q&A

The document explains how to size out-of-the-money index puts in a tail-hedged equity portfolio. The proposed procedure evaluates the portfolio under a specified downside scenario over a one-month horizon. For a long index position, estimate the put’s…

OptionsEquitiesVolatilityRisk management
Quant Q&A

The document concerns an implementation of the Betting Against Beta strategy that ranks stocks by estimated market beta, shorts higher-beta names, and takes long positions in lower-beta names. The author describes adjusting exposures toward a beta target and…

EquitiesFactor investingPortfolio constructionPosition sizing