This notebook runs a fixed equity-characteristics strategy on a reserved holdout period using predictions and a portfolio allocator selected earlier. It keeps the configuration, position sizing, concentration, rebalance cadence, and cost assumption…
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
4,194 documents
This notebook turns a supply chain knowledge graph and institutional ownership filings into features for downstream financial modeling. From the company network it derives topology measures, supplier concentration, competitive exposure, and bottleneck…
This dataset guide describes a monthly US equity panel of anonymized firms and characteristics used for machine-learning asset-pricing research. The data includes accounting and technical characteristics, returns, and pre-defined training and test periods…
This notebook presents a workflow for reducing a large set of ETF features to candidates for later modeling. It ranks features using cross-sectional Spearman information coefficients against forward returns, computed by date and then averaged. Newey–West…
This notebook explains how a stochastic discount factor (SDF) prices a cross-section of equity option signals. Unlike factor models that estimate exposures and factor returns, the SDF approach estimates one random variable that makes asset returns price…
This document introduces latent factors as common return patterns across stocks, with each stock's loading describing its exposure to a pattern. It contrasts principal component analysis, which extracts factors and stock loadings from the return panel alone,…
This index introduces latent factors as shared patterns extracted from the way stocks’ returns move together, with each stock’s loading indicating its exposure to a pattern. It contrasts principal component analysis, which estimates factors and stock…
This notebook brings an ETF case study’s registered backtests together into an uncertainty-aware strategy assessment. It reads performance measures with block-bootstrap confidence intervals and uses paired bootstraps to compare successive pipeline stages,…
This notebook uses TreeSHAP to explain LightGBM return predictions, with global feature importance, individual prediction explanations, dependence plots, and pairwise interaction values. It compares SHAP rankings with permutation importance and tree-based…
This notebook turns financial headlines into stock-level signals and evaluates them against forward returns. It embeds headlines, measures news surprise as semantic distance from a rolling embedding baseline, and combines surprise with sentiment direction to…
This chapter surveys methods for recovering common structure from return and characteristic panels, from PCA and eigenportfolios to IPCA, risk-premium PCA, conditional autoencoders, stochastic discount factor estimation, and supervised autoencoders. Its…
This notebook presents a feature-selection workflow for ETF research, intended to narrow many candidate transforms and lookbacks to a smaller set for later modeling. It computes cross-sectional Spearman information coefficients between features and forward…
This notebook explains instrumented principal component analysis (IPCA), which models each ETF’s factor exposures as a shared linear function of that fund’s observed features. Alternating least squares estimates the feature-to-exposure map and the factor…
This notebook fits a PCA latent-factor model to a panel of stock returns, without using option-surface features, characteristics, or target information. PCA extracts leading directions of historical cross-sectional co-movement, estimates each stock's…
This overview explains a family of models for predicting returns from firm characteristics. Rather than treating each characteristic as a direct return predictor, the models assume returns are driven by a small set of unobserved common factors and estimate…
This document describes a conditional autoencoder that models firm exposures to latent return factors as a nonlinear function of firm characteristics. Like IPCA, it estimates a factor structure in which predicted returns combine firm-specific exposures with…
This chapter overview explains how gradient-boosted trees build on decision trees and random forests for financial tabular prediction. Boosting adds learners sequentially to correct earlier errors, helping capture nonlinear relationships and threshold…
This document describes a monthly US equity dataset designed for machine learning research in asset pricing. It contains 94 rank-transformed firm characteristics, including accounting measures and technical features, alongside returns. Firms are anonymized,…
This notebook introduces a published panel for machine-learning research on US equities. It contains monthly observations with 46 firm characteristics and next-month excess returns, spanning several decades. The characteristics are grouped by economic…
This notebook analyzes a portfolio of equity ETFs with CAPM and Fama-French factor regressions, then expands the analysis to rolling exposures, return attribution, and residual dependence. It uses aligned daily returns and factor data, estimates regression…
This notebook explains a stochastic discount factor (SDF) model for pricing the cross-section of US firm returns. It learns weights that make discounted asset returns satisfy no-arbitrage moment conditions, rather than optimizing a return-forecasting loss.…
This implementation describes a neural stochastic discount factor model and an adversarial moment network for testing asset pricing relations. The SDF network maps asset characteristics, optionally combined with a macroeconomic regime representation from an…
This notebook benchmarks Random Forest bagging against XGBoost, LightGBM, and CatBoost for predicting stock returns from anonymized firm characteristics. It uses predefined temporal training, validation, and test splits, measures Spearman rank information…
This notebook explains how to build and inspect a quarterly US equities fundamentals panel from SEC XBRL data while preserving both the period a fact describes and the date it became public. For a historically valid backtest, the filing or announcement date…