This ETF feature notebook explains how fitted statistical models can leak future information through their estimated parameters, even when their formulas use past observations. Its remedy is a walk-forward refit schedule: allow an initial burn-in, fit 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
715 documents
This notebook studies gradient boosting for a US equities panel, varying tree capacity, objective function, and training checkpoint across three forward-return horizons. It explains how shallow trees can learn feature interactions, while increasing capacity…
This notebook demonstrates SHAP explanations for a LightGBM model predicting ETF forward returns. TreeSHAP supplies feature contributions for individual predictions and aggregate importance summaries. Beeswarm and dependence plots show how feature values…
This chapter presents market data as the result of trading rules, liquidity, and participant behavior. It surveys data from top-of-book quotes through order-level feeds, then describes parsing exchange messages and replaying them into a venue-local limit…
This shared utility module supports causal analysis of trading data with time-series double machine learning (DML). Its documented tools include walk-forward estimation with an embargo, nuisance models, and refutation checks. Block permutation preserves…
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 case study explains how to generate predictions for a holdout period after model and strategy choices have been made on validation data. It resolves the previously selected configuration, reconstructs its training specification, and fits it again using…
This notebook introduces EdgarTools for exploring SEC filings by company and filing type. It demonstrates looking up issuers using stable CIK identifiers, retrieving annual and quarterly reports, extracting XBRL financial statements, and inspecting insider…
This notebook applies principal component analysis to changes in eight Treasury constant-maturity yields, spanning one to thirty years. It removes forward-filled calendar rows with no yield changes and standardizes the remaining observations before PCA, so…
This notebook describes an LSTM sequence model for predicting stock returns from ordered windows of recent features. Each example uses 60 consecutive sessions for one stock; windows that cross listing gaps, halts, or other interruptions are excluded so that…
This notebook synthesizes registered validation results for five latent-factor estimators—PCA, IPCA, CAE, SDF, and SAE—across nine case studies. It first reports which estimators have results in each panel, then identifies the highest mean daily Spearman…
This notebook applies TabM, a weight-sharing neural ensemble, to a US equities panel represented as one feature row per stock and session. A shared two-layer backbone feeds multiple members, each with its own scaling vector and output layer; averaging their…
This analysis selects one configuration from a frozen pool of crypto perpetual-futures candidates spanning four prediction labels and multiple strategy stages. It chooses the highest validation Sharpe and treats label, split, and execution details as part of…
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 script gathers institutional holdings from SEC 13F filings in two ways: it can retrieve filings for a curated set of managers or download the SEC’s quarterly bulk files. Both paths normalize holdings into a shared schema, with the bulk path designed for…
This notebook applies principal component analysis to a panel of US stock returns to represent broad shared movements with a smaller set of factors. Each factor is a direction of common variation, and each stock’s loading describes its exposure to that…
This notebook compares gradient boosting configurations for crypto perpetual futures using features built around the premium of perpetual contracts over spot. It varies tree capacity and loss function, including squared, absolute, and Huber losses, and…
This notebook explains how to extract insider transactions from raw SEC Form 4 XML for quantitative equity research. It uses an XML parser to keep each trade’s code, date, share count, price, and direction attached to its transaction block, while separately…
This notebook uses double machine learning to estimate whether futures carry predicts subsequent returns independently of volatility, momentum, and cross-sectional carry rank. It residualizes both carry and returns against these confounders with flexible…
This notebook develops model-based features for crypto perpetual futures: per-asset conditional volatility forecasts from GJR-GARCH and a market-wide stressed-regime probability from a two-state Gaussian hidden Markov model fitted to funding settlements.…
This analysis compares feature triage results across nine trading case studies and asks whether features that pass screening predict stronger strategies. Its screening combines Benjamini–Hochberg false-discovery control with a second route based on a case…
This notebook introduces NLinear as a simple sequence-model baseline for predicting returns across US equities. Each example uses a window of 60 consecutive sessions for one stock, with features arranged in time order. For each feature, the model subtracts…
This notebook applies pretrained FinBERT to financial headlines from FinMarBa and examines why its accuracy is far below figures reported for its Financial PhraseBank evaluation. The central diagnostic is label provenance: PhraseBank labels reflect…