This model adapter applies PatchTST, a Transformer architecture for long-horizon time-series forecasting, to scalar regression. It accepts sequences arranged by time and feature, rearranges them for the backbone, and reduces the per-feature outputs to one…
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
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 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…
The notebook treats each window of returns as an empirical distribution and clusters windows according to one-dimensional Wasserstein distance. For equal-sized samples, sorting gives the optimal quantile matching; the distance therefore reflects differences…
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 notebook builds a retrieval pipeline over excerpts from corporate 10-K filings. It loads a stable set of filings, splits text into sentence windows, creates local embeddings, and indexes the chunks in a vector database. The measured run focuses on…
This configuration note explains why an L1-penalized, three-class logistic regression uses SAGA with an explicitly tightened tolerance. It compares SAGA with liblinear on a Nasdaq 100 microstructure prediction panel, reporting faster fits and better…
This notebook introduces path signatures as fixed-length features that preserve the order and joint geometry of observations in a time-series window. The first level records each coordinate's total change; the second captures signed area between coordinate…
This notebook describes an expanding-window double machine learning analysis of whether 12-to-2-month momentum predicts next-month US firm returns after conditioning on Beta, IdioVol, LME, and Variance. Nuisance models train on earlier decision months, with…
This document outlines a two-pass method for extracting source observations used in an S&P 500 options straddle study. First, it identifies call and put contracts meeting a near-the-money candidate screen based on days to expiration, absolute delta,…
This notebook builds N-BEATS for forecasting SPY closing prices. Fully connected blocks process a complete lookback window and each produces a backcast, which is subtracted before the next block, and a forecast for the future horizon. Constrained blocks use…
The document describes end-to-end pipelines for combining historical and recent equity data and preparing hourly crypto perpetual data. Its central example stitches WikiPrices and Yahoo observations at their coverage boundary, validates OHLC data and…
This notebook presents a structured state record for research agents that preserves a run's question, cutoff, evidence, unresolved questions, tool history, quality-gate results, and synthesis status. It distinguishes this state from a conversation trace: the…
This tutorial explains how to detect and prevent lookahead bias in ETF and macroeconomic data. It demonstrates that centered moving averages use future observations, while a simple correlation between a feature's level and next-period return can miss…
The document evaluates how trading costs change the validation performance of one previously selected S&P 500 equity and options allocation. It sweeps one-way charges as a fraction of traded value and compares them with a flat per-share commission and…
This notebook uses correlation-based principal component analysis on sector ETF returns to describe common risk factors and sector rotation. Standardizing returns gives each sector unit variance before decomposition, reducing the chance that a more volatile…
The notebook compares Monte Carlo dropout and deep ensembles as ways to estimate uncertainty around daily ETF return forecasts. Dropout remains active across repeated predictions, while ensemble members are separately trained; the spread of predictions from…
This notebook surveys methods for detecting changes in a financial time series, using SPY as an example. It contrasts the Zivot–Andrews test, which estimates one break while testing a unit-root hypothesis, with PELT and binary segmentation, which partition a…
This notebook evaluates a pretrained financial sentiment model on FinMarBa headlines and explains why the result is not a clean test of sentiment transfer. FinBERT was trained against human judgments of text sentiment, while FinMarBa’s negative, neutral, and…
This notebook explains a principal-component baseline for forecasting CME futures returns. PCA is fitted to the training fold’s product-return panel, so its components represent co-movement directions across contracts rather than compressed carry, momentum,…
This notebook compares weekly-grid sequence models for predicting the same five-session forward return used on a daily grid. Sampling on Fridays makes that label approximately a one-step-ahead target, allowing a direct regression formulation to be compared…
This notebook builds a retrieval-augmented research assistant over excerpts from US company 10-K filings. It loads filings, splits text into sentence windows, embeds the chunks with a local model, and indexes them for similarity search. The demonstrated run…
This exploratory analysis profiles a daily panel of exchange-traded funds across nine groups. It checks symbol coverage through time, compares the panel against the classification dictionary, reviews nulls and zero-volume observations, and evaluates…