This ETF feature study builds three model-derived inputs: a hidden Markov model (HMM) that estimates market regime, fractionally differenced prices for reference funds, and per-ETF GARCH(1,1) conditional volatility. It emphasizes that avoiding look-ahead…
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
566 documents
This notebook explains instrumented principal component analysis (IPCA), which estimates common factors while making each stock’s factor exposures a shared linear function of its same-day option-surface features. Those features include implied volatility,…
This tutorial compares fixed stop-loss and take-profit barriers, trailing stops, ATR-scaled exits, a machine-learning exit signal, and combinations of these approaches on daily SPY data. Fixed barriers are simulated from entry prices, with overnight gaps…
This notebook adapts Word2Vec skip-gram to institutional equity holdings. It treats each institution’s portfolio as a sentence, stock identifiers as tokens, and positions ordered by reported holding value as word order. Stocks that repeatedly appear in…
This notebook explains why raw equity prices can produce misleading returns when they cross stock splits or cash dividend dates. It describes backward adjustment, which scales historical prices for later corporate actions, and distinguishes raw prices for…
This notebook tests whether model-based position sizing improves on equal weighting in a US firm characteristics strategy. It compares score weighting, which allocates more to names with higher predicted scores, with conformal weighting, which reduces…
This notebook compares ways to exit long ETF trades: fixed profit targets and stops, trailing stops, ATR-scaled barriers, machine-learning signals, and combinations. It builds indicators and trade simulations, then summarizes trade returns, win rates,…
This notebook treats ARIMA forecasts as input columns for later models rather than as standalone predictions. It fits models to ETF returns, uses stationarity checks and autocorrelation diagnostics to propose orders, and compares candidate orders with an…
The document describes converting rolling ETF return windows into two-channel images for a conventional convolutional neural network. A Gramian angular field maps normalized observations to angles and records pairwise angular relationships; a Markov…
This document introduces the Chen, Pelger, and Zhu monthly US equity panel used to benchmark asset-pricing models. It describes 46 firm characteristics grouped by economic theme, next-month excess returns, and the panel’s time-ordered train, validation, and…
This notebook presents a workflow for characterizing market series before modeling. It begins with plots of SPY prices and returns, VIX levels, and the return distribution to identify trends, volatility clustering, and heavy tails. It then explains how to…
This notebook uses SPY daily returns to explain frequency-domain analysis and its limits as a source of trading features. A wavelet decomposition separates variation into bands at successively slower time scales, while spectral estimates describe how return…
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 surveys EdgarTools for exploring SEC filings and extracting structured company data. It explains how to identify filers by stable CIK, retrieve filings by form, and turn XBRL-tagged annual reports into financial statement tables. It also covers…
This case study uses linear models as a baseline for predicting forward returns across a broad US equity panel. It explains why overlapping price and volume features create collinearity, making ordinary least squares coefficients unstable, and compares Ridge…
This analysis compares registered double machine learning treatment effects from nine trading case studies. It loads current results from each study’s registry, checks registry integrity and duplicate labels, and makes coverage explicit. Effects and…
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…
The notebook estimates how much an equal-weight portfolio of surviving US equities can overstate returns relative to the full starting universe. It first examines when the panel records symbols leaving, finding that recorded exits begin only in the final…
This exploratory analysis introduces option contracts and chain structure, then profiles a 2020 sample of S&P 500 options across eight underlyings. It explains moneyness, intrinsic and time value, implied volatility, Greeks, and how strike, expiration, and…
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 evaluates position-level stop losses, trailing stops, and time exits on the allocation lineage that ranks highest by validation Sharpe among eligible full-coverage candidates. Each overlay is compared with its own no-overlay parent, isolating…
This notebook compares portfolio weighting rules for an S&P 500 options strategy that sells straddles. It holds the selected symbols and other strategy settings fixed while replacing the equal-weight baseline with allocators that use either model predictions…
This notebook describes a workflow for turning S&P 500 companies’ quarterly MD&A disclosures into trading features. It uses filing acceptance dates as the point-in-time anchor, collapses multiple filings for a company on the same date to the latest period,…
This read-only analysis brings validation predictions from several model families together to assess whether they are complete, how well they rank stocks, whether ranking skill persists across folds, and whether apparently similar models contribute distinct…