This notebook explains why a reported Sharpe ratio is an uncertain estimate, not a definitive measure of strategy quality. It develops confidence intervals and the probabilistic Sharpe ratio, which estimates the chance that a strategy's true Sharpe exceeds a…
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 analysis compares learned signals for monthly cross-sectional US stock returns using accounting and market characteristics, with next-month return as the target. It reviews linear models, boosted trees, deep tabular methods, latent-factor estimators,…
This chapter presents agentic workflows for financial research tasks where gathering, filtering, and synthesizing uneven evidence is the main challenge. It contrasts these workflows with conventional models that work well on stable structured inputs, and…
This notebook defines and validates monthly return labels for a cross-sectional US firm-characteristics study. It checks how the data provider pairs each row’s characteristics with the return outcome, emphasizing that the panel is already aligned and must…
This notebook explains how to evaluate financial models without allowing information unavailable at a decision date to leak into training or model selection. It distinguishes training, validation, and a final holdout set, and shows why randomly shuffled…
This notebook compares four ways to discover relationships in a panel of ETF returns: NOTEARS for contemporaneous linear DAGs, VAR-LiNGAM for lagged and instantaneous structure, PCMCI for conditional-independence tests, and Granger tests as pairwise…
This notebook studies how Ridge regularization affects information coefficient (IC) performance and how hyperparameter search can bias reported validation results. It first evaluates a wide alpha grid with walk-forward folds, scaling features inside each…
This notebook presents Tail-GAN, a generative adversarial approach designed to reproduce financial scenario tail risk, especially value at risk (VaR) and expected shortfall (ES). It uses differentiable sorting so quantile-based risk measures can contribute…
This notebook examines how to combine multiple probability forecasts. It presents simple averaging as a baseline and explains Neyman extremization, which moves a panel mean farther from a base rate according to the number of forecasters and an assumed…
This notebook turns futures carry—the price gap between nearby expiries—into model-based features. It describes one-step ARIMA forecasts per product, rolling Fourier measures of seasonal cycle strength, and a two-state hidden Markov model that infers broad…
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 presents a pedagogical Mamba-style selective state space model for predicting ETF returns from sequences of momentum features. Unlike attention and dense temporal mixing, a state space model carries a fixed-size state through the sequence with…
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 document explains a TabM neural network for ranking ETFs from tabular features. Its shared two-layer backbone feeds multiple members, each with a learned scaling vector and output layer; averaging their predictions aims to reduce initialization noise…
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 notebook evaluates security controls for a financial document question-answering system using six hand-written cases. The cases represent indirect prompt injection, fabricated data in untrusted material, attempted actions, and invalid citations. It…
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 compares two Transformer designs for forecasting 21-day ETF returns from eight trailing-momentum features. PatchTST groups consecutive days into patches, reducing the number of attention tokens and embedding local time patterns. iTransformer…
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 document explains fractional differencing as a way to make a price series more stationary while retaining some information about its level. It derives the lag weights from the binomial expansion of a fractional difference and shows how truncating small…
This notebook assesses whether four-hour spot FX data can support a daily cross-sectional strategy that ranks currency pairs using momentum and carry, buys the strongest, and sells the weakest. It does not fit a model or make forecasts. Instead, it checks…
This notebook compares squared error, absolute error, and Huber loss for gradient-boosted models predicting short at-the-money straddle returns. The target has a capped gain and potentially severe losses, so the fitting loss may affect how well predictions…
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…