This notebook expresses a four-phase forecasting workflow using plain Python orchestration, CrewAI, and LangGraph. It compares where state is held, how failures are inspected or recovered, what dependencies each approach adds, and how tracing works. The…
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 frames a parent order as a finite-horizon control problem. At each interval, tabular Q-learning chooses a multiplier on a VWAP-based trade slice, conditioning on time and remaining inventory plus the most recently observed spread and volatility…
This notebook demonstrates an operational cycle for an ETF equity strategy: refresh market data, compute financial features, retrain a Ridge model, generate current cross-sectional predictions, replay them through a backtest engine, and stage a top-ranked…
The document describes a specialized backtest for a weekly S&P 500 options strategy. Each cohort selects highly ranked constituents, sells near-the-money call and put options with roughly a month to expiration, and delta-hedges with shares when net delta…
This cross-case analysis examines how predictive information, measured by information coefficient (IC), translates into portfolio Sharpe across nine trading case studies. Its central point is that implementation mediates the relationship: entry rules,…
This notebook explains how to build a continuous futures price history from individual expiring contracts. It identifies front-month contracts using trading volume, applies a no-rollback constraint to avoid spurious switches, and compares calendar-based roll…
This proof script exercises a reduced CME futures research workflow from model predictions through portfolio weights and backtesting. It checks that predictions cover exactly the expected product, timestamp, and fold keys, that fitted states and prediction…
This notebook sets out a descriptive way to translate gross returns into net performance by modeling trading frictions, financing, and fund expenses separately. Its parameterized cost stack calculates trading costs from turnover and trade size, financing…
This module defines a differentiable objective for end-to-end portfolio learning. It turns bounded asset-level risk weights into portfolio exposures using volatility scaling, computes average gross returns over available assets, and optionally subtracts…
This notebook analyzes reconstructed NASDAQ order books to describe intraday spreads and depth at the best bid and ask, then examines whether order flow imbalance is associated with the next bucket’s return. It expresses spreads in basis points to make costs…
This notebook establishes a signal-stage baseline for evaluating model predictions on CME futures. At each weekly decision, it ranks products by predicted return, buys the top group, shorts the bottom group, and gives each position equal weight. It varies…
This configuration specifies a long-only ETF ranking and rebalancing experiment. It defines a broad 100-ETF universe spanning equity, bond, commodity, and regional exposures, with monthly decisions and next-open execution. The main label forecasts a 21-day…
This benchmark compares CSV, Parquet, Feather (Arrow IPC), and HDF5 using the same deterministic OHLCV panel. It measures write time, materialized read time, file size, and the effect of reading only selected columns. The timing policy uses a single write…
This operational tutorial demonstrates runtime safeguards for a live trading system using a synthetic broker. It shows how SafeBroker rejects orders when market data is too old or daily losses exceed a configured limit, and how the loss-triggered kill switch…
This notebook compares DQN, PPO, and A2C in a shared simulated trading environment calibrated to hourly Bitcoin perpetual-futures returns. A GARCH(1,1) model supplies volatility clustering, while the environment charges for position changes and applies an…
The document explains two ways to estimate bid-ask spreads when only daily OHLCV data is available. Corwin-Schultz compares high-low ranges over adjacent one-day and two-day intervals, using the different behavior of volatility and spread to separate them;…
This document explains a validation baseline for model predictions on CME futures. At each weekly decision, products are ranked by predicted return; the top group is held long and the bottom group short, with equal weight within each leg. The number of…
This notebook outlines an operational workflow for connecting a strategy to Interactive Brokers through TWS or Gateway. It checks that the session is a paper account, reads account values and positions, and requests historical bars to initialize strategy…
This notebook tests how sensitive an ETF momentum backtest is to its assumed trading fee. It holds the strategy’s weights and trading schedule fixed, reruns the simulator across a range of per-leg costs, and compares growth, Sharpe ratio, and drawdown. It…
This analysis reads a registered backtest pipeline for a monthly US equity strategy based on firm characteristics. It reports Sharpe uncertainty, probability and deflated Sharpe measures, paired strategy comparisons, holdout decay, and a cost analysis…
This notebook measures how execution costs affect the already selected crypto perpetuals configuration. It holds the model, checkpoint, entry rule, allocator, and risk control fixed, then reruns the strategy across a declared grid of round-trip charges on…
This notebook analyzes NASDAQ TotalView-ITCH messages to describe market-wide activity and create reusable trade data. It counts messages by type, then enriches order-execution messages by mapping stock-location identifiers to tickers and order references to…
This document describes dataset utilities for preparing time-series panels for model training and rolling inference. The training dataset returns sliding sequences of features, forward returns, volatility scales, and masks, with configurable sequence length,…
This study uses ten trading days of NVDA market-by-order data to examine how daily trading activity affects bar sampling. It filters trades to regular US market hours, classifies aggressor sides from venue labels, and reports day-to-day variation in trade…