This notebook teaches how to decode NASDAQ TotalView-ITCH message-by-order data from its binary format into structured records. It explains the message framing and type-specific layouts, demonstrates unpacking fields, and converts timestamps expressed as…
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 explains how feature stores keep training data and live model inputs aligned. It describes feature views through their entity key, event timestamp, time to live, and feature columns, then contrasts point-in-time joins for historical training…
This notebook applies one monthly ETF momentum and yield-curve regime strategy in two ways: vectorized return arithmetic and a sequential account simulation. Both use the same target weights, assets, dates, and total trading cost, allowing the comparison to…
This notebook describes fitting a long short-term memory network to one-minute NASDAQ-100 microstructure features to predict forward returns at several horizons. The model processes a trailing sequence step by step, learning which earlier observations to…
The notebook introduces a conditional autoencoder that extends instrumented principal component analysis by replacing its linear mapping from stock characteristics to factor exposures with a neural network. It retains the exposure-times-factor-return…
This notebook presents a workflow for acquiring and maintaining financial time series with a unified manager, predefined or custom symbol universes, and partitioned Parquet storage. It covers single and parallel multi-symbol fetching, loading data into…
This document describes the architecture of a neural policy network that maps asset-level time series and context into bounded portfolio risk weights. Its per-asset backbone combines context embeddings, feature-wise modulation, variable selection, an LSTM,…
This notebook compares portfolio sizing methods for leading S&P 500 equity signal configurations. It first selects each configuration’s strongest full-coverage checkpoint using validation Sharpe, then applies alternative allocators—including score weighting,…
This notebook describes the holdout prediction stage of a US firm-characteristics study. It takes the model configuration selected using validation results, reconstructs its training specification and checkpoint, then fits it again using data that ends…
The notebook describes an expanding-window double machine learning analysis of whether 12-to-2-month momentum predicts next-month US firm returns after adjustment for beta, idiosyncratic volatility, market capitalization, and variance. It fits nuisance…
This notebook presents a pipeline for extracting structured corporate events from SEC 8-K filings and loading them into a Neo4j knowledge graph. A language model processes filings in batches to produce event records with subjects, relations, objects, and…
This notebook compares Optuna hyperparameter searches for XGBoost, LightGBM, and CatBoost on a firm-characteristics dataset. Each library receives its own search study, using a tree-structured Parzen estimator, median pruning, early stopping, and persistent…
This notebook applies double machine learning to examine whether the implied-minus-realized volatility spread is associated with subsequent equity returns after adjustment for observed confounders. It identifies realized volatility, equity momentum, and…
This demonstration checks whether one dual moving-average crossover implementation produces matching signals in backtest and live engines. Both engines receive the same prepared ETF bars and use the same strategy parameters and fill convention, so the…
This notebook examines tick-level AlgoSeek trade and quote data for AAPL during the March 16, 2020 market crash. It filters to regular trading hours, separates trade prints from NBBO updates, and studies intraday activity, spreads, trading sizes, venue…
This analysis reconstructs individual NASDAQ limit orders from ITCH add, delete, partial-cancel, replace, and execution messages. It measures whether orders are cancelled or filled and how long they take to reach those events, using precise timestamps and…
This notebook fits ridge, lasso, and elastic net models to published firm characteristics for individual US stocks. The features span value, profitability, investment, size, momentum, reversal, risk, and liquidity. Walk-forward folds keep configurations…
This case study fits gradient-boosted trees to ETF return labels and compares them with a linear baseline that performed well under strong ridge regularization. It explains why trees can discover interactions, such as momentum behaving differently across…
This exploratory analysis profiles a historical US equities panel, explains its raw and adjusted price fields, and examines symbol coverage over time. It compares yearly counts of active symbols with first and last observations, showing why both entry and…
This notebook builds conditional-volatility features for an S&P 500 equity and options study using a GJR-GARCH model. Unlike fixed rules based on past prices, fitted features depend on their estimation window. The method therefore declares a refit schedule,…
This analysis notebook explains how to assess a US equity strategy built from firm characteristics using registry results rather than new backtests. It reads uncertainty-aware performance statistics, ranks configurations on shared support, and uses paired…
This document presents data-cleaning methods for financial datasets and explains how to keep preprocessing aligned with train and test splits. Its central lesson is to estimate transformations such as scaling and winsorization from training data only; using…
The document explains three rules for closing positions before a portfolio’s scheduled rebalance: a fixed loss stop, a trailing stop measured from the position’s best price, and a time exit that closes after a set holding period. Because overlays only remove…
This document introduces public Fama-French and AQR factor return datasets as inputs for benchmarking, risk attribution, and factor research. It describes market, size, value, profitability, investment, and momentum factors from the Fama-French library,…