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

Search the library

4,613 documents

Quant Q&A

The discussion considers how to allocate capital to an automated crypto strategy whose backtest suggests substantial drawdowns, and when to scale its exposure or stop trading as its edge may fade. The response emphasizes that changing position size is a…

CryptoPosition sizingRisk managementBacktesting
Quant Q&A

The document asks whether a time-series model that chooses a fully invested long or short position could be trained by maximizing simulated terminal portfolio value instead of minimizing squared prediction error. It proposes simulating daily positions from…

Machine learningBacktestingPosition sizingRisk management
Quant Q&A

The document considers how to allocate a fixed portfolio among four hedge funds when their returns are assumed independent and each fund has a purchase limit. It explains that zero correlations do not prevent mean-variance optimization: the covariance matrix…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

The document considers how to choose portfolio weights that are proportional to risk budgets divided by asset volatilities, while meeting a target portfolio volatility and other constraints. It contrasts this objective with a risk-budgeting formulation that…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

The document argues that risk management can sit beside an ML or AI alpha model rather than trying to interpret its internal features. A separate portfolio controller can translate forecasts or directional signals into feasible positions, accounting for…

Machine learningRisk managementPosition sizingBacktesting
Quant Q&A

The document surveys alternatives to Kelly sizing, focusing on how statistical arbitrage portfolios balance positions. Sector neutrality groups assets by industry, while risk neutrality uses a model of shared factor exposures to help an optimizer construct a…

Position sizingPortfolio constructionRisk management
Quant Q&A

The document applies the Kelly betting formula to historical results from selling option spreads and asks whether a calculated allocation of about 20% of capital is too high. The response explains that Kelly is aggressive and assumes a well-specified bet…

OptionsPosition sizingRisk managementStatistics
Quant Q&A

The document considers how to express portfolio performance as a percentage when daily trading PnL and exposure are available but beginning and ending account asset values are not. It highlights that exposure may change because of accumulated PnL, yet cash…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

This document explains how to allocate a market-cap-weighted crypto index when no constituent may exceed a chosen maximum weight. It presents a sequential calculation: start with each asset’s share of total market value, scale that share by the weight and…

CryptoPortfolio constructionPosition sizingStatistics
Quant Q&A

This note frames trading under an assumed known stochastic price model as a finite-horizon stochastic control problem. The trader’s state includes capital, current position, price, and model parameters; the model evolves price and parameters using noise. The…

StatisticsRisk managementPosition sizingBacktesting
Quant Q&A

This note explains why conversion factors affect hedge ratios during the trading life of a deliverable Treasury futures contract but do not change the physical delivery quantity. Because the futures price does not move one-for-one with a particular bond, the…

FuturesFixed incomeRisk managementPosition sizing
Quant Q&A

The document presents a two-day example of a pairs trade that goes long one stock and short another, using roughly equal dollar amounts in each leg. It calculates the opening and closing cash flows from the share quantities and prices, then adds them to…

EquitiesPairs tradingPosition sizingRisk management
Quant Q&A

The discussion examines how to tell whether a market-timing strategy adds skill beyond exposure to broad market returns. A strategy that is mostly long during a rising market may appear successful while offering little independent evidence of an edge. One…

BacktestingRisk managementStatisticsPosition sizing
Quant Q&A

The document discusses hedging exposure to oil prices with forward contracts and asks whether one contract per asset is automatically the right hedge. The responses emphasize that the appropriate ratio depends on the objective and on how well the forward…

CommoditiesFuturesRisk managementPosition sizing
Quant Q&A

The document presents a long-short portfolio with a small long position, a much larger short position, and cash held alongside the positions. Its reported portfolio contribution is sharply negative even though the portfolio’s net market value is positive.…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

The document addresses an attempt to maximize expected portfolio return at a specified volatility using R's optim function. The proposed penalty based on an if statement gives the optimizer a discontinuous objective, and the answer instead describes…

Portfolio constructionRisk managementPosition sizing
Quant Q&A

The document addresses how traders might identify market conditions associated with changes in algorithmic strategy performance. It proposes structural-break analysis as one avenue, naming CUSUM tests on recursive residuals or levels and explosiveness tests…

Machine learningStatisticsRisk managementPosition sizing
Quant Q&A

The document asks how to define a spread for pairs trading after estimating a linear relationship between two asset prices. It compares subtracting the fitted intercept and scaling one price by the estimated gradient with omitting the intercept or simply…

Pairs tradingMean reversionStatisticsPosition sizing
Quant Q&A

The document distinguishes two portfolio problems: choosing investments and sizing a group of trading strategies. For multiple strategies believed to be profitable and reasonably uncorrelated, one answer suggests allocating capital in inverse proportion to…

Portfolio constructionPosition sizingRisk management
Quant Q&A

The document poses a portfolio insurance problem in which an investor trades a stock and holds the remainder in a zero-interest bank account at a finite set of dates. The stock is modeled as geometric Brownian motion, and the objective is to choose stock…

Risk managementPosition sizingEquitiesStatistics
Quant Q&A

The document compares risk management for retail algorithmic traders with controls at larger quantitative firms. It describes institutional safeguards as layered: risk teams may set trading exposure limits, while compliance may focus on legal and regulatory…

Risk managementPosition sizing
Quant Q&A

The document explains how to estimate the units of a EUR/JPY spot short when the account balance is denominated in USD. The key step is to convert the available USD balance into the base currency, EUR, using the EUR/USD exchange rate. In the example,…

ForexPosition sizingExecution
Quant Q&A

The discussion addresses a long only trading system whose estimated Kelly fraction becomes negative after losses or changing estimates. Under the simple Kelly setup, a negative fraction indicates that the estimated expected return for the specified bet is…

Position sizingRisk managementBacktestingStatistics
Quant Q&A

The document asks whether a portfolio optimization problem can use an equality constraint on the sum of absolute position weights instead of the usual equality constraint on their signed sum. The distinction is that the L1 constraint fixes total absolute…

Portfolio constructionRisk managementPosition sizing