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…
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.
Search the library
4,613 documents
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
This notebook compares equal weighting with two allocation rules for US firm characteristic strategies: score weighting, which assigns more capital to higher model predictions, and conformal weighting, which reduces capital for predictions with wider…
This notebook builds an end-to-end portfolio allocator that places a Temporal Fusion Transformer style variable-selection network ahead of an LSTM. Separate gated residual networks embed individual features, and learned soft weights combine those embeddings…
This configuration module describes a framework for declaring backtest sweep settings per case study. It reads entry schemes, allocation methods, trading cost grids, and risk controls from setup files, with explicit errors when required configuration is…
The notebook compares Monte Carlo dropout and deep ensembles as ways to estimate uncertainty around daily ETF return forecasts. Dropout remains active across repeated predictions, while ensemble members are separately trained; the spread of predictions from…
This case study compares declared fixed and trailing stop rules for FX positions. It first selects one parent strategy per label from a sealed validation cohort, then varies only the position risk rule. Because stops respond to price movements within a…
This notebook compares equal-weight, positive-score-weighted, and conformal-width-weighted allocations for top-ranked ETFs and CME futures. It estimates entity-specific split-conformal interval widths from residuals in earlier validation folds, excluding…
This document describes a walk-forward method for turning prediction residuals into per-entity uncertainty widths used to size positions. At each decision time, calibration uses residuals that have had time to resolve, with a lag based on the prediction…
This notebook uses registered walk-forward GBM predictions for ETFs and CME futures to compare equal weighting, inverse conformal-width weighting, and weighting proportional to positive prediction scores. It calibrates entity-specific Mondrian…
This notebook develops a framework for translating market activity into modeled trading costs and strategy capacity. It introduces the square-root impact model, identifies volatility and average daily volume as key inputs, and distinguishes quantities…
This notebook converts FX pair predictions into baseline trading results. At each decision time it ranks pairs, takes equal-sized long and short sleeves, and runs the selected prediction configurations and checkpoints through an existing backtest engine.…