The document presents a shared state machine for automated trading halts, with closed, open, and half-open states. It applies that lifecycle to four conditions: portfolio drawdown, daily loss, consecutive losing sessions, and system latency. After a recovery…
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
243 documents
This notebook shows how explicit execution costs can erode a hypothetical intraday strategy’s gross returns. It anchors the crossing spread to the median volume-weighted quoted spread across NASDAQ-100 constituents, then builds crossing, worked-order, and…
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 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 notebook evaluates model predictions as NASDAQ-100 trading strategies using a shared backtest engine. It first runs a plumbing check with random signals: persistent profits after costs would point to issues such as lookahead, misaligned data, or…
This notebook checks whether a fifteen-minute cross-sectional stock-ranking strategy is feasible before fitting a model or making forecasts. It uses NASDAQ-100 quote data, midpoint returns, and a pre-holdout development window to examine the strategy’s…
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 presents a current audit comparing VectorBT Pro and VectorBT OSS with ML4T on supported real-data strategy workloads. Both VectorBT editions participate in ETF allocation, USD-quoted foreign-exchange allocation, and a US equity panel. Pro also…
This audit compares Backtrader and Zipline with ML4T on real strategy cases, using only asset and contract combinations that each engine and the frozen data bundle can represent natively. It covers ETF allocation and a US equity panel for both engines, plus…
This notebook compares commission and slippage models for equities and futures, then examines how commission assumptions affect a fixed ETF momentum strategy. It explains how percentage, per-share, minimum, combined, and tiered commissions produce different…
This notebook compares daily, weekly, biweekly, and monthly rebalancing for a top-ranked momentum portfolio built from a fixed ETF universe. It measures turnover and gross risk-adjusted performance from historical prices, then estimates break-even alpha by…
The notebook presents a reporting method for a long-only RSI mean-reversion strategy on BTC. It compares gross and net performance, then benchmarks the strategy against buy-and-hold using the same trading dates, exposure, execution engine, fill timing, and…
This notebook explains how volume participation limits constrain the portion of market volume an order can consume in each interval. When a parent order exceeds the permitted amount, the broker fills part of it and carries the remainder forward. A…
This notebook examines how market impact changes a momentum strategy’s backtest results across stocks with different liquidity. It holds the order size and strategy constant, estimates liquidity and volatility from a formation period, and applies several…
This demonstration runs one dual moving-average crossover strategy through both a historical backtest engine and a live engine replaying the same daily ETF bars. It holds the strategy, inputs, parameters, and fill convention fixed, then compares the…
This notebook frames execution of a parent order as a finite-horizon control problem. A tabular Q-learning agent chooses a multiplier on a VWAP-based trade rate using remaining time, remaining inventory, and the most recently completed interval’s spread and…
This tutorial explains how to organize market data beyond one-time downloads. It presents a unified manager for fetching single symbols or batches, predefined and custom symbol universes, and Hive-partitioned Parquet storage. It also covers querying date…
This notebook tests position-level and portfolio risk rules on leading ETF allocation combinations from a monthly strategy. It holds each registered prediction, concentration, and allocator fixed, then compares the overlaid results with their own…
This chapter overview maps the research steps between validated market data and model evaluation. It covers split-aware preprocessing, encoding and missing-data decisions, then execution-consistent target construction, including fixed-horizon and event-based…
The document demonstrates a VectorBT workflow for a long-only Bitcoin RSI mean-reversion rule. It calculates RSI from daily close prices, enters when the prior day’s reading falls below a lower threshold, and exits when it exceeds an upper threshold.…
The document evaluates how trading costs change the validation performance of one previously selected S&P 500 equity and options allocation. It sweeps one-way charges as a fraction of traded value and compares them with a flat per-share commission and…
This audit compares multiple backtesting engines on shared historical inputs for ETF allocation, CME futures, crypto perpetuals with funding, foreign exchange, and US equities. Each supported pair receives the same content-addressed market data and frozen…
This notebook implements a long-only RSI mean-reversion rule for BTC/USDT perpetuals using an event-driven backtesting engine. It aggregates intraday bars into UTC daily OHLCV data, computes a rolling gain-and-loss RSI, enters when the indicator falls below…
This document describes how to select a frozen set of equities for validation and holdout backtests using an estimated round-trip trading cost. The proxy combines estimated per-share costs relative to mean share price with twice the median half-spread, both…