This notebook demonstrates how a fixed dollar order can impose very different costs across stocks because its size relative to available trading volume matters. It applies a square-root market-impact model to a long-when-positive momentum strategy using…
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
105 documents
This case study evaluates daily momentum and carry signals across a small, correlated universe of G10 spot currency pairs. Its workflow moves from feasibility checks and forward-return labels through engineered and model-based features, cross-validation,…
This notebook adapts TSMixer to predict forward ETF returns from historical momentum features. Its architecture alternates a shared linear transformation across the time axis with a feature MLP applied separately at each date. Pre-normalization and residual…
This document describes building a cross-sectional feature matrix for S&P 500 stocks by combining adjusted share-price histories with summarized option implied-volatility surfaces. It organizes features by role, input, lookback, and observability delay.…
This notebook explains how a temporal convolutional network (TCN) can forecast returns from ordered financial data. Causal convolutions ensure that an output at a given time depends only on current and earlier inputs. Dilations expand the receptive field…
The notebook diagnoses how a fixed monthly ETF momentum strategy performed across volatility, trend, and yield-curve conditions. Regime labels are designed to be known before the return they describe: volatility and index trend use prior closes and are…
This notebook explains how to construct one-, five-, and 21-session forward spot returns for a fixed FX-pair universe. It first maps four-hour bars into trading sessions using a New York rollover calendar, then builds returns without removing rows before…
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…
This setup document defines a weekly S&P 500 equity research pipeline that uses options market features alongside price-based signals. It specifies the eligible universe, decision and execution timing, and distinct rebalance cadences for labels with…
This document presents a pedagogical Mamba-style selective state space model for predicting ETF returns from sequences of momentum features. Unlike attention and dense temporal mixing, a state space model carries a fixed-size state through the sequence with…
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 notebook compares two Transformer designs for forecasting 21-day ETF returns from eight trailing-momentum features. PatchTST groups consecutive days into patches, reducing the number of attention tokens and embedding local time patterns. iTransformer…
This notebook assesses whether four-hour spot FX data can support a daily cross-sectional strategy that ranks currency pairs using momentum and carry, buys the strongest, and sells the weakest. It does not fit a model or make forecasts. Instead, it checks…
This configuration describes a daily long-short strategy across 20 FX pairs. It sets a New York close decision time, next-bar execution, equal-weight sizing, and ranking signals based on momentum or carry. It also specifies spread and swap-point costs,…
This notebook explains a pedagogical selective state space model based on Mamba and evaluates it for ETF return prediction. Unlike a fixed-parameter state space model, it derives the input-to-state term, state-to-output term, and step size from the current…
This notebook describes an expanding-window double machine learning analysis of whether 12-to-2-month momentum predicts next-month US firm returns after conditioning on Beta, IdioVol, LME, and Variance. Nuisance models train on earlier decision months, with…
This dataset note describes a diversified collection of exchange traded funds used in a momentum strategy and a broader sequence of financial research examples. It provides daily open, high, low, close, and volume observations beginning in 2006, grouped…
This notebook fits ridge, lasso and elastic-net models to a broad set of established US stock characteristics, including value, profitability, investment, momentum, size, risk and liquidity measures. It evaluates raw monthly returns, a cross-sectionally…
This tutorial turns ETF cross-sectional signals into long-only, equal-weight top-ten portfolios and compares Ridge regression and logistic classification with momentum and equal-weight baselines. Models are fitted on walk-forward training windows, with a…
This document explains how TSMixer processes a stock’s recent feature history as a sessions-by-features matrix. Its blocks mix information down feature columns across time, then across features within each session. Stacking blocks lets those operations…
This document develops a daily feature panel for ranking twenty currency pairs at the New York 5 PM close. It distinguishes rankable signals, such as standardized multi-horizon returns and channel position, from market-state measures such as volatility,…
This tutorial builds a monthly ETF rotation simulator using a trailing risk-adjusted momentum ranking and a Treasury yield-curve regime filter. At each month-end, the rule ranks ten funds using their recent price history; risk-on months hold the top three…
This notebook introduces a workflow that connects standardized ETF data loading, a feature registry, and signal diagnostics. It shows how to discover indicator metadata, compute features using defaults or explicit parameters, and store configurations for…