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…
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
742 documents
This notebook compares commission and slippage models for equities and futures, then examines how commission assumptions affect a fixed ETF momentum strategy. It explains how percentage, per-share, minimum, combined, and tiered commissions produce different…
This notebook compares daily, weekly, biweekly, and monthly rebalancing for a top-ranked momentum portfolio built from a fixed ETF universe. It measures turnover and gross risk-adjusted performance from historical prices, then estimates break-even alpha by…
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 configuration module describes a framework for declaring backtest sweep settings per case study. It reads entry schemes, allocation methods, trading cost grids, and risk controls from setup files, with explicit errors when required configuration is…
The notebook presents a reporting method for a long-only RSI mean-reversion strategy on BTC. It compares gross and net performance, then benchmarks the strategy against buy-and-hold using the same trading dates, exposure, execution engine, fill timing, and…
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 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 examines how market impact changes a momentum strategy’s backtest results across stocks with different liquidity. It holds the order size and strategy constant, estimates liquidity and volatility from a formation period, and applies several…
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 demonstration runs one dual moving-average crossover strategy through both a historical backtest engine and a live engine replaying the same daily ETF bars. It holds the strategy, inputs, parameters, and fill convention fixed, then compares the…
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 turns hourly continuous futures data into daily OHLCV bars aligned to CME Globex sessions. It assigns timestamps to the session ending at 4 PM Central Time, so Sunday evening trading belongs to Monday and Friday evening does not create a…
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.…
The document describes an ablation study of whether learned graph embeddings improve predictions of stock returns beyond ordinary tabular features. It builds a network from historical stock-return correlations, constructs momentum, volatility, and trend…
This configuration describes a daily long-short strategy across 20 FX pairs. It sets a New York close decision time, next-bar execution, equal-weight sizing, and ranking signals based on momentum or carry. It also specifies spread and swap-point costs,…
This document describes a producer for paired performance comparisons across strategy-selection stages. It forms comparisons between signal selections and equal-weight references, between holdout and validation selections, and across allocation,…
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 tutorial explains how to organize market data beyond one-time downloads. It presents a unified manager for fetching single symbols or batches, predefined and custom symbol universes, and Hive-partitioned Parquet storage. It also covers querying date…
This notebook tests position-level and portfolio risk rules on leading ETF allocation combinations from a monthly strategy. It holds each registered prediction, concentration, and allocator fixed, then compares the overlaid results with their own…
This chapter overview maps the research steps between validated market data and model evaluation. It covers split-aware preprocessing, encoding and missing-data decisions, then execution-consistent target construction, including fixed-horizon and event-based…
This document describes a shared workflow for training temporal convolutional networks on daily FX pair data. A model consumes a fixed-length sequence, and a missing expected day makes any window crossing that gap ineligible. The runner derives the valid…
This notebook explains a pedagogical selective state space model based on Mamba and evaluates it for ETF return prediction. Unlike a fixed-parameter state space model, it derives the input-to-state term, state-to-output term, and step size from the current…