This notebook tests whether four managed-portfolio strategies explain SPY returns after controlling for broad ETF co-movement. The strategies rank ETFs using lagged momentum, volatility, or recent returns. Ten principal components from a balanced set of…
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 evaluates whether a signal’s information coefficient (IC) is distinguishable from noise when successive observations are dependent. It illustrates the issue using a momentum signal and ETF data, explaining how overlapping forward returns,…
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 introduces futures backtesting mechanics through a long-short momentum example across several asset classes. It explains how contract specifications convert price movements into dollar profit and loss through multipliers, and how notional…
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 compares registered model families on a cross-asset ETF panel using walk-forward validation results. Models predict 21-trading-day returns and are assessed by cross-sectional information coefficients, which measure how well forecasts rank funds…
This notebook builds price-derived features for ranking a broad US stock universe. It describes momentum, volatility, moving-average, and technical-indicator families, then evaluates them against a one-session forward-return label. Its central design rule is…
This notebook evaluates published factor returns as potential portfolio building blocks. It separates three questions: whether a factor’s average return clears a demanding statistical bar, whether factors diversify one another for reasons that may persist,…
This notebook shows how to tune stop-loss, take-profit, and trailing-stop rules for a momentum portfolio while preserving a chronological holdout. It compares one-dimensional parameter sweeps, joint rule grids, and stop or target priors derived from…
This notebook applies one monthly ETF momentum and yield-curve regime strategy in two ways: vectorized return arithmetic and a sequential account simulation. Both use the same target weights, assets, dates, and total trading cost, allowing the comparison to…
This exploratory analysis tests whether a twelve-month momentum signal, omitting the latest month, is associated with next-month returns across a 100-ETF universe. It builds a monthly panel from adjusted closing prices, ranks eligible ETFs into quintiles…
The notebook describes an expanding-window double machine learning analysis of whether 12-to-2-month momentum predicts next-month US firm returns after adjustment for beta, idiosyncratic volatility, market capitalization, and variance. It fits nuisance…
This module defines a monthly ETF allocation baseline using a risk-adjusted momentum score: trailing cumulative return divided by annualized realized volatility. It selects the highest-ranked assets when the 10-year minus 2-year yield-curve slope exceeds a…
This demonstration describes the operational shape of a continuously running crypto strategy connected to a USD spot broker. It maps a larger perpetual-futures case-study universe to the smaller set of available spot pairs, then routes a momentum z-score…
This educational notebook surveys price- and volume-derived features used in quantitative research. It covers simple and logarithmic returns across horizons, skip-one momentum, overnight and intraday returns, moving-average distance, trend and reversal…
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 document presents a cost sensitivity analysis for a fixed ETF momentum strategy. It holds the universe, weights, schedule, and simulator constant while rerunning the backtest over a range of per-leg fees. The resulting curve shows how Sharpe ratio and…
This analysis estimates whether skip-recent momentum is associated with a causal change in ETFs’ forward returns, rather than asking how well momentum predicts returns. Double machine learning models the outcome and the treatment using declared confounders,…
This notebook studies gradient-boosted models for forecasting returns and direction in crypto perpetuals. Its grid varies tree capacity and loss function, including squared-error, absolute-error, and Huber objectives, while scoring models at multiple points…
This document explains how to measure returns around events such as signal triggers, earnings announcements, or macro releases. Its worked example uses momentum breakouts in liquid ETFs. For each event, a market model fitted to a pre-event estimation window…
This configuration describes monthly long-short US equity portfolios ranked on firm characteristics. It specifies a complete-case universe with 46 characteristics, month-end decisions, next-open execution, equal weighting within the long and short legs, and…
This notebook builds a monthly ETF rotation backtest from portfolio returns through to simulated trades. It ranks ten funds using trailing risk-adjusted returns, applies a Treasury yield-curve regime to choose between the leaders and a defensive bond…
This case study explains how to construct forward-return labels for a cross-sectional foreign-exchange strategy that ranks currency pairs and buys or sells according to their relative ordering. It first maps four-hour spot bars into trading sessions using a…