This notebook uses SHAP to explain Ridge regression forecasts of ETF returns. For a linear model, feature attributions have a closed-form relationship to the fitted coefficients and deviations from background feature values, allowing the analysis to check…
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 Kalman filtering as a way to extract features from financial prices. A local linear trend state tracks both a latent price level and its slope, while an observation model accounts for noisy closes. Each update produces a filtered…
This notebook presents instrumented principal component analysis (IPCA), a latent-factor approach to forecasting returns from firm characteristics. Instead of assigning each characteristic a direct return weight, IPCA models each firm’s factor exposures as a…
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 analyzes NASDAQ TotalView-ITCH messages to describe market-wide activity and create reusable trade data. It counts messages by type, then enriches order-execution messages by mapping stock-location identifiers to tickers and order references to…
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 study uses ten trading days of NVDA market-by-order data to examine how daily trading activity affects bar sampling. It filters trades to regular US market hours, classifies aggressor sides from venue labels, and reports day-to-day variation in trade…
This case study applies gradient-boosted trees to NASDAQ-100 microstructure features to forecast returns and direction at several intraday horizons. It contrasts trees with linear models: trees can discover conditional relationships, such as order-flow…
This notebook compares deterministic relational retrieval with embedding search on a corpus of institutional 13F holdings. It creates a point-in-time snapshot by keeping each institution’s latest reported position before a fixed cutoff, then builds questions…
This notebook estimates how execution costs can erode hypothetical intraday strategy returns. It first measures volume-weighted quoted spreads across NASDAQ-100 constituents using minute-bar quotes, then uses the median constituent spread as an empirical…
This notebook demonstrates training a generative adversarial network on engineered ETF features with differential privacy. It introduces the privacy parameters epsilon and delta, explains why DP-SGD clips each record’s gradient before aggregation and adds…
This notebook applies classical ordinary least squares inference to ETF features and forward returns. It reviews coefficient estimates, standard errors, t statistics, p values, and tests for heteroscedasticity, residual autocorrelation, non-normality, and…
This document describes utilities for loading parsed NASDAQ ITCH messages and rebuilding a limit order book from order additions, deletions, cancellations, executions, and replacements. It tracks remaining shares per order so later book updates use the…
This notebook traces ETF ranking signals through portfolio formation and a simplified backtest. Ridge regression and logistic classification are trained with walk-forward splits, then compared with momentum and equal-weight portfolios. At monthly rebalances,…
This notebook compares time bars with tick, volume, dollar, imbalance, and run bars built from a single day of AAPL exchange trades. The first four sampling approaches group observations by elapsed time, trade count, shares traded, or notional traded.…
This notebook shows how to use an estimation-window correlation network to describe an equity universe and build a network-diversified portfolio. It selects liquid symbols using only data available before evaluation, converts return correlations to…
This exploratory analysis examines the legacy Quandl WIKI US equities panel, focusing on price conventions, data coverage, and what its history can support in a backtest. It distinguishes raw prices, which reflect traded price levels, from adjusted prices…
This notebook constructs features from minute-level NASDAQ-100 data using three procedures: a rolling heterogeneous autoregressive regression for near-term variance forecasts, a Fourier transform to describe periodic structure in recent activity, and…
This analysis uses NASDAQ TotalView-ITCH messages to describe venue activity and build a trade table linked to ticker, side, and order attributes. It counts message types, compares trading with the much more numerous quoting and removal events, and ranks…
This notebook assesses whether a monthly long–short strategy based on firm characteristics can be studied with a released US firm panel. It checks the data encoding, how the available universe changes over time, whether each rebalance has enough firms to…
The document explains how to construct trade-based microstructure features from NASDAQ trade data aggregated into intraday bars. It covers Kyle lambda, Amihud illiquidity, the Roll spread estimator, trade intensity, and order flow imbalance (OFI). It…
The document describes how to compare validation predictions from linear, gradient-boosting, tabular deep-learning, and sequence models for S&P 500 options. Before reporting diagnostics, it checks that each registered prediction population is complete…
The document explains how double machine learning (DML) estimates whether buyer-initiated volume share affects future returns after accounting for spread, short-term volatility, and trailing returns. It residualizes both treatment and outcome against those…
This notebook turns registered NASDAQ-100 microstructure backtests into a strategy assessment without training models or rerunning backtests. It reads metrics and lineage from the registry, builds derived cohort and paired-comparison tables when needed, and…