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

76 documents

Machine Learning for Trading

This notebook demonstrates position-level exits and portfolio-level controls through constructed examples. Static rules include stop losses, profit targets and time exits; dynamic rules include trailing stops that follow prior highs, tightening trails, and…

Risk managementPosition sizingBacktestingExecution
Machine Learning for Trading

This notebook tests whether standard portfolio allocation can improve an every-bar NASDAQ-100 trading strategy that is already burdened by transaction costs. It selects predictions using validation performance on the declared cost-feasible universe, then…

EquitiesPosition sizingPortfolio constructionExecution
Machine Learning for Trading

This notebook studies how position sizing affects FX backtests after the model has already selected which currency pairs to trade. It preserves the winning baseline’s predictions, signal mapping, costs, and execution settings, then varies allocation rules.…

ForexPosition sizingPortfolio constructionBacktesting
Machine Learning for Trading

This notebook applies position-level risk controls to leading ETF allocation combinations while keeping each underlying prediction, concentration, and allocator fixed. It compares stop-losses, trailing stops, and time exits with the original strategy,…

EquitiesRisk managementBacktestingPosition sizing
Machine Learning for Trading

This chapter presents portfolio construction as the process of converting return forecasts, risk estimates, and constraints into weights, leverage, and rebalancing decisions. It lays out a research workflow for documenting allocator choices, avoiding…

Portfolio constructionRisk managementPosition sizingBacktesting
Machine Learning for Trading

This notebook explains how to evaluate position-level exits and combine them with portfolio-wide controls. Fixed stop-loss, take-profit, and time exits are contrasted with trailing and tightening stops; a scaled exit reduces a position at successive profit…

Risk managementPosition sizingBacktestingPortfolio construction
Machine Learning for Trading

This notebook explains when a strategy is clearest as precomputed arrays and when it benefits from a sequential simulation that carries positions, fills, cash, realized profit and loss, or equity forward through time. Array-based backtests are attractive…

BacktestingPosition sizingPairs tradingRisk management
Machine Learning for Trading

This tutorial derives the Kelly fraction for a binary wager by maximizing expected logarithmic wealth growth, then extends the idea to continuous returns and a multi-asset portfolio. It uses symbolic differentiation and simulations with shared coin-toss…

Position sizingPortfolio constructionRisk managementStatistics
Machine Learning for Trading

This chapter presents a research workflow for using predictive models in trading, where stable out-of-sample forecasts may matter more than unbiased coefficient estimates. It covers regularized regression methods such as Ridge, LASSO, and Elastic Net, along…

Machine learningStatisticsBacktestingPosition sizing
Machine Learning for Trading

This notebook explains when a trading strategy is clearer to simulate bar by bar with evolving state than to express as precomputed signals or weights. It contrasts array-based backtests, which can be fast and convenient for parameter sweeps, with sequential…

BacktestingPosition sizingPairs tradingRisk management
Machine Learning for Trading

This notebook compares ways to allocate capital across US equity positions while holding the model, checkpoint, rebalance dates, and selected stocks fixed. It examines weights based on prediction strength, prediction-interval width, individual stock…

EquitiesPosition sizingPortfolio constructionRisk management
Machine Learning for Trading

This notebook evaluates stop losses, trailing stops, and fixed-duration exits on selected US equity strategies. A stop loss responds to losses from entry, a trailing stop responds to declines from a position’s peak, and a time exit closes after a set holding…

EquitiesRisk managementBacktestingPosition sizing
Machine Learning for Trading

This notebook compares ways to size positions in a US equities panel while holding the model, checkpoint, rebalance dates, and selected stocks fixed. Prediction-based methods scale capital by forecast magnitude or interval uncertainty; inverse volatility and…

EquitiesUS marketsPortfolio constructionPosition sizing
Machine Learning for Trading

This notebook compares portfolio weighting rules for selling straddles on selected S&P 500 symbols. It holds the chosen symbols constant and varies allocation, using equal weight as the baseline. The methods include weighting by predicted score, inverse…

OptionsPortfolio constructionPosition sizingBacktesting
Machine Learning for Trading

This notebook runs a fixed equity-characteristics strategy on a reserved holdout period using predictions and a portfolio allocator selected earlier. It keeps the configuration, position sizing, concentration, rebalance cadence, and cost assumption…

EquitiesFactor investingBacktestingPosition sizing
Machine Learning for Trading

This notebook explains how futures contract specifications affect backtest accounting. It shows how the contract multiplier converts price moves into dollar P&L, how price times multiplier determines notional value for sizing, and why per-contract…

FuturesCommoditiesMomentumPosition sizing
Machine Learning for Trading

This notebook turns stock-level predictions into validation portfolios. On each rebalance date, it sorts stocks by predicted return, buys the top group and shorts the bottom group, and assigns equal capital to every position. It applies this baseline across…

EquitiesMachine learningBacktestingPortfolio construction
Machine Learning for Trading

This document explains how to evaluate a previously selected US equities strategy on holdout data while keeping its configuration fixed. It derives the correct holdout prediction set from the selected model’s training identity and checkpoint, then applies…

EquitiesUS marketsBacktestingRisk management
Machine Learning for Trading

This document explains why stop-losses, trailing stops, and time exits cannot be evaluated in a case study whose backtest holds weights across a month and observes only the realized monthly forward return. Such rules depend on the price path between entry…

EquitiesRisk managementBacktestingPosition sizing
Machine Learning for Trading

This document presents an event-driven method for holding a limited number of intraday positions. Predictions are aligned to price bars using the latest available score, subject to an optional freshness limit. Entry signals use a rolling quantile computed…

EquitiesHigh-frequency tradingMarket microstructureExecution
Machine Learning for Trading

This document describes several ways to convert prediction scores into trading signals: fixed cutoffs, rolling per-asset percentiles, and cross-sectional percentiles. Fixed thresholds use a chosen score level; rolling thresholds adapt to an asset’s recent…

Machine learningPortfolio constructionPosition sizingBacktesting
Machine Learning for Trading

This live-trading demonstration describes a daily rebalance workflow for a fixed universe of US large-cap stocks. It compares broker-held positions with model targets, converts the differences into an order basket, and routes orders through a risk-control…

EquitiesExecutionRisk managementPosition sizing
Machine Learning for Trading

This code describes how backtest settings are resolved from case study configuration and how run identity accounts for changes to the traded universe and prediction age. Its central lesson is that any filter that changes the portfolio or prediction set must…

BacktestingExecutionRisk managementPosition sizing
Machine Learning for Trading

This notebook studies six allocation methods applied to selected crypto perpetual strategy configurations. The rankings and entry rules remain fixed while the capital assigned to each position changes. The methods use model scores, individual contract…

CryptoPerpetual futuresPosition sizingPortfolio construction