This notebook compares BM25 keyword search, dense embeddings, reciprocal rank fusion (RRF), and cross-encoder reranking on passages from company 10-K filings. It builds each retrieval approach and assesses ranked results for exact, conceptual, and mixed…
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 compares LightGBM models on a US equities panel across three return horizons. Its grid varies tree leaf counts and loss functions, then scores each configuration at multiple tree-count checkpoints. The discussion explains how shallow trees can…
This notebook processes the SEC’s quarterly bulk 13F holdings data to study institutional ownership, manager rankings, and co-ownership networks. It selects the latest filing per manager using filing dates, aggregates securities by CUSIP rather than issuer…
This notebook evaluates validation predictions derived from equity and options research by translating them into long-only equity portfolios. It uses an equal-weight top-K baseline, compares several portfolio concentrations, and follows the label-specific…
This notebook uses NASDAQ ITCH-derived trades and order messages to illustrate market microstructure patterns. It examines negative first-order autocorrelation in tick-level trade-price returns, explaining how alternating trades at the bid and ask can create…
This utility module provides statistical helpers for diagnosing trading-data panels. Its autocorrelation method computes a curve within each entity before pooling results across entities, avoiding spurious dependence between the end of one entity’s series…
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 teaching notebook compares target-label methods for supervised trading models using ETF data. It covers fixed-horizon returns and direction labels, rolling time-series percentiles, cross-sectional percentiles, triple-barrier labels with fixed or…
This notebook demonstrates checks for lookahead bias using ETF prices and macroeconomic series. It shows that a centered moving average includes future observations, can track price turns too closely, and has a missing recent tail because its future inputs…
This notebook shows how to turn quarterly SEC 10-Q Management’s Discussion and Analysis text into two candidate equity signals. FinBERT scores text chunks for positive, neutral, or negative tone; chunk scores are aggregated into average sentiment and…
This notebook compares three ways to use market regimes in forecasting: a baseline model without a regime input, a single model given the filtered probability of a volatile state, and separate models trained within hard regime assignments. To avoid…
This notebook estimates whether buyer-initiated signed volume share is associated with future 15-minute returns after accounting for relative spread, recent realized volatility, and trailing monthly return. Double machine learning predicts the outcome and…
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 notebook explains Hierarchical Risk Parity (HRP), a portfolio construction method designed to limit sensitivity to noisy covariance estimates. It describes its three stages: cluster assets by correlation distance, reorder them according to the resulting…
This notebook assesses registered ETF backtests across the strategy pipeline, from signals and allocation through costs and risk overlays. It reads existing predictions and backtests rather than fitting models or adding new backtests, while deriving cohort…
This notebook uses NASDAQ ITCH-derived trade records to examine intraday trading activity. It resamples individual trades into time bars and compares share volume, trade counts, last prices and volume-weighted prices for one ticker selected from each of…
This guide introduces two sources of US equity order book tick data for microstructure research: Databento market-by-order events and NASDAQ TotalView-ITCH messages. It describes their formats, coverage characteristics, approximate data sizes, and tradeoffs.…
This notebook examines how return forecasts for ETFs can express uncertainty, comparing Monte Carlo dropout with deep ensembles. Dropout remains active across repeated inference passes, while an ensemble measures disagreement among separately trained…
This notebook compares six ways to weight ETF portfolios selected by the same predicted ranking: equal weight, score weighting, inverse volatility, risk parity, mean-variance optimization, and hierarchical risk parity. It varies the number of selected funds…
This notebook fits a declared LSTM model for forecasting in an S&P 500 options study. The network receives chronological windows of each symbol’s history and uses gated recurrent state to represent information across sessions, rather than relying only on…
This notebook compares three ways to classify financial-news sentences as positive, neutral, or negative: TF-IDF word and phrase features with logistic regression, averaged static word vectors with a classifier, and a pretrained FinBERT sentiment model.…
This notebook explains how to build and inspect a quarterly equity fundamentals panel from SEC XBRL data. Each observation carries both the fiscal period it describes and the filing date when the information became public. That distinction is essential in…
This notebook evaluates accounting and price-based characteristics as standalone predictors of next-month US stock returns. It computes monthly cross-sectional rank correlations between each characteristic and the return label, then summarizes them across…
This notebook presents a diagnostic framework for an ETF allocation backtest. It calculates risk and return measures such as Sharpe, Sortino, Calmar, volatility, value at risk, and maximum drawdown; tracks rolling performance and drawdown recovery; and…