This notebook compares behavior cloning and inverse reinforcement learning (IRL) using demonstrations from a time-weighted average price (TWAP) execution rule. Behavior cloning maps observed market states directly to actions, while IRL fits a linear reward…
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
5,018 documents
This notebook applies double machine learning to examine whether the implied-minus-realized volatility spread is associated with subsequent equity returns after adjustment for observed confounders. It identifies realized volatility, equity momentum, and…
This training utility describes an optimization loop for a DeePM-style model. It uses AdamW to update model parameters from a robust Sharpe-oriented loss, passing forward returns, volatility scaling, masks, transaction costs, and configured burn-in and…
This notebook fits ridge, lasso, and elastic net models to published firm characteristics for individual US stocks. The features span value, profitability, investment, size, momentum, reversal, risk, and liquidity. Walk-forward folds keep configurations…
This case study fits gradient-boosted trees to ETF return labels and compares them with a linear baseline that performed well under strong ridge regularization. It explains why trees can discover interactions, such as momentum behaving differently across…
This document demonstrates feature-store concepts directly with case-study Parquet data. A feature view specifies the entity key, event timestamp, usable lifetime, and feature columns. For model training, historical values are joined to the decision time at…
This document presents data-cleaning methods for financial datasets and explains how to keep preprocessing aligned with train and test splits. Its central lesson is to estimate transformations such as scaling and winsorization from training data only; using…
This notebook explains how to extract narrative sections from 10-K and 10-Q filings for later text analysis. It maps form-specific item numbers, converts filing HTML while preserving paragraph boundaries, cleans page furniture, and identifies section starts…
This notebook demonstrates a deployment boundary between an offline machine-learning pipeline and QuantConnect's LEAN engine. It selects a prediction set through the ETF case study registry, verifies training and prediction provenance, and exports…
This notebook explains path signatures as fixed-length features that preserve the order and joint shape of observations in a time series. It describes how the first signature level records total changes, while second-level terms capture signed areas between…
This document explains a run-log system for recording model training, predictions, causal estimates, and backtests across trading case studies. It describes how configurations flow from case-study settings through training menus and model presets, then…
This notebook clusters monthly returns from nine equity, bond, currency, and commodity factor and market series using Gaussian mixture models. After dropping months with incomplete data, it standardizes the series so differences in scale do not dominate the…
This chapter presents a framework for turning a trading idea into a documented feature specification. It asks researchers to align feature horizons with the intended decision, state a driver hypothesis, and distinguish predictive signals from contextual…
This guide distinguishes causal effect estimation from causal structure discovery and maps common research questions to suitable Python libraries. EconML and DoWhy estimate effects when the adjustment structure is known or explicitly specified; Tigramite and…
This notebook presents a deterministic framework for checking whether backtest and live trading pipelines behave consistently. It compares the stages that turn price bars into decisions: feature calculations, predictions, signals, and order sizes. A fixed…
This notebook trains a reinforcement learning agent to schedule a fixed sell order across hourly bars from a crypto perpetual futures market. Its state includes lagged returns, volatility, prior-hour volume, the perpetual premium to spot, and time until…
This notebook aggregates linear-model results, including OLS, Ridge, Lasso, and ElasticNet, across nine case studies. It compares each study’s strongest complete configuration on its primary label, then examines regularization, fold-level information…
This case study evaluates TabM, a parameter-efficient neural ensemble, on the same point-in-time CME futures feature rows and walk-forward folds used by other model families. It motivates TabM as a way to average across model variation while sharing most…
This notebook presents a workflow for asking whether six-month skip-recent momentum affects 21-day forward returns and whether the effect changes with market volatility. It estimates effects on training data using double machine learning, with volatility and…
This notebook compares two pretrained time-series foundation models, Chronos and TinyTimeMixer, with an LSTM and a penalized linear baseline on an ETF panel. Each model receives a univariate historical context; the pretrained models forecast that input…
This chapter presents a framework for evaluating causal claims in quantitative trading research. It starts with clear definitions of treatment, outcome, estimand, counterfactual, and adjustment set, then matches research questions to methods: Double Machine…
This notebook fits linear models to NASDAQ-100 microstructure features observed at one-minute intervals to predict returns at several forward horizons. Its purpose is to establish a simple baseline before more expressive models. Because spread and imbalance…
This feature evaluation screens financial and model-derived candidates against forward returns for CME futures. For each feature, it checks data coverage and staleness, measures daily cross-sectional rank correlation between feature values and forward…
This notebook compares implementations of a univariate SPY price forecast across raw PyTorch, sktime, and Darts. Its main purpose is to assess practical effort: code length, interface requirements, installation success, and combined fit-and-predict time. A…