This notebook uses real ETF data to assess whether a momentum signal remains useful under reasonable changes to its lookback, market regime, and implementation. It computes cross-sectional information coefficients between momentum and forward returns, then…
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 notebook compares two simulations of the same monthly ETF momentum strategy. Both use identical target weights, universe, dates, and total trading cost. One computes returns from lagged weights and asset returns; the other processes orders sequentially…
This notebook distinguishes predicting returns from claiming that momentum causes them. It treats a stock’s prior-year return, excluding the latest month, as the treatment and forward return as the outcome. Recent volatility, illiquidity rank, and volume…
This notebook tests whether learned graph embeddings add predictive information to a tabular model for US stocks. It builds a network from absolute return correlations measured before the target period, constructs momentum, volatility, and trend features…
This notebook diagnoses how a fixed, long-only ETF momentum baseline performed across market conditions from 2010 to 2024. It labels each daily return using volatility and trend measures known before that return began, with expanding historical medians…
This notebook explains TSMixer, a time-series neural network that alternates two operations: a shared linear map across lookback days for each feature, and a shared feature MLP applied independently at each day. Residual connections and pre-normalization…
This notebook defines forward-return targets for ranking US stocks and explains how to make their horizons correspond to actual trading sessions. It uses split- and dividend-adjusted prices for returns, but uses the contemporaneous printed close and dollar…
This pipeline constructs financial features for an ETF deployment workflow from OHLCV prices and a yield curve. It derives returns and risk-adjusted returns across multiple lookback periods, momentum acceleration and volatility ratios, then adds common…
This case study applies causal estimation to ETF momentum and asks whether its effect on forward returns varies with market volatility. It uses a continuous momentum treatment, a 21-day forward-return outcome, volatility and yield-curve controls, and a…
The document turns a cross-asset momentum hypothesis into a monthly exploratory test using a 100-ETF universe. It constructs adjusted month-end prices, measures 12-to-1-month momentum, then ranks eligible ETFs into five equal-weight groups and compares their…
This notebook explains why ordinary t-tests can overstate the strength of an information coefficient (IC) when daily IC observations are dependent. It constructs a momentum signal on ETF data, examines the IC autocorrelation, and introduces Newey–West…
This notebook examines how rebalancing cadence affects turnover, gross performance, and cost-adjusted results for a top-ranked momentum portfolio of ETFs. It estimates turnover from historical target-weight changes at daily, weekly, biweekly, and monthly…
This notebook compares LightGBM models with a ridge baseline for predicting ETF returns over two horizons. It explains why trees can discover regime-dependent interactions, such as momentum behaving differently under market stress, while greedy splits can be…
This demo outlines an always-on crypto trading loop connected to Alpaca’s USD spot market. It maps a perpetual-futures case-study universe to the venue’s supported spot pairs, making clear that only a subset can be traded there. The example signal is a…
This notebook demonstrates how to tune StopLoss, TakeProfit, and TrailingStop rules for a momentum portfolio while preserving a chronological separation between calibration and evaluation. It tests individual rule widths and joint combinations using…
This document demonstrates connecting a five-day ETF momentum strategy to Alpaca through a shared strategy interface. The strategy tracks momentum across SPY, QQQ, and IWM and generates signals when it crosses a threshold. Broker-specific adapters handle…
This US equities case study distinguishes predicting future returns from claiming that momentum causes them. It treats a stock’s prior-year return excluding the latest month as the treatment, forward return as the outcome, and recent volatility, illiquidity…
This notebook expands an ETF feature evaluation from a single return horizon to a scan across ten features and three horizons, correcting for multiple tests. It then applies mechanism-based diagnostics to long-lookback 12-1 momentum and short-term reversal:…
This notebook uses Double Machine Learning (DML) to estimate the adjusted effect of a continuous ETF momentum measure on subsequent returns, controlling for recent and longer-term volatility, market regime, and yield-curve slope. It compares unadjusted…
This feature-engineering module prepares daily price data for systematic macro portfolio models. It creates horizon returns scaled by estimated volatility, several multi-scale MACD signals, and rolling z-scores of log prices. The return horizons can use a…
This tutorial surveys features built from asset price and volume histories, including returns across horizons, trend and reversal measures, several volatility estimators, volatility regimes, liquidity, tail risk, and cross-sectional normalization. It…
This case study evaluates daily cross-sectional signals across a broad US stock universe and lays out a long research pipeline, from point-in-time data and engineered features through model comparison, portfolio construction, costs, and holdout assessment.…
This notebook evaluates a cross-sectional momentum factor using information coefficients, quantile returns, top-to-bottom spreads, and classification diagnostics. It introduces Spearman IC as the date-by-date rank correlation between a signal and subsequent…
This notebook compares two Transformer designs for forecasting 21-day ETF returns from trailing momentum features. PatchTST groups consecutive days into patches, placing short sequences of local shape in each token. iTransformer instead treats each feature’s…