This notebook builds features for a cross-sectional hypothesis: unusually costly long positioning in perpetual futures may precede relative weakness as crowded trades unwind. It transforms funding rates and premium-index data into levels, historical…
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 chapter maps financial data across market, fundamental, and alternative sources, then compares how asset classes shape what prices, liquidity, and observations mean. It emphasizes that timestamps, adjustments, identifiers, and revisions are part of a…
This notebook describes an LSTM model that predicts returns from ordered windows of stock features in a US equities panel. Unlike a flat tabular model, the LSTM processes sessions sequentially and carries a hidden state through each window. Learned gates…
This notebook presents TimeGAN, a recurrent generative adversarial model for producing synthetic financial sequences. Its five modules learn an embedding and reconstruction, predict successive latent states, generate sequences from noise, and distinguish…
This document explains a shared method for generating walk-forward validation splits from case study evaluation settings. It delegates fold construction to a calendar-aware splitter, works from unique timestamps so panel rows stay aligned, and steps backward…
This notebook implements a long-only RSI mean-reversion rule for BTC/USDT perpetual bars using an event-driven backtesting engine. It aggregates intraday observations into UTC daily bars, calculates a simple rolling gain-and-loss RSI, enters when the…
This document explains how TWAP and VWAP divide a large parent order into child orders over a trading session. TWAP allocates equal shares to each time interval; VWAP allocates shares in proportion to a forecast of interval volume. The notebook estimates…
This notebook presents a supervised autoencoder for predicting ETF forward returns. The network compresses a fund’s feature row into a low-dimensional representation and predicts returns directly from that representation. Unlike conditional autoencoders in…
This document describes how to derive a single holdout training interval from an existing walk-forward validation specification. It takes the declared holdout dates from the study configuration, uses the earliest training start across validation folds, and…
This notebook explains how to test whether events such as trading signals or announcements predict returns beyond a market benchmark. It demonstrates the workflow using momentum breakouts in liquid ETFs: estimate a market model from pre-event returns,…
This feasibility analysis evaluates whether quote data can support a market-neutral, cross-sectional strategy that ranks NASDAQ-100 constituents at a fifteen-minute cadence and holds both ends of the ranking. It checks whether enough eligible symbols are…
This analysis compares feature-triage ledgers across nine trading case studies. It distinguishes Benjamini–Hochberg false-discovery-rate significance from a second route to a PROCEED decision, which combines a case-specific effect-size floor with fold sign…
This notebook fine-tunes three transformer checkpoints for three-class financial sentence sentiment and compares their accuracy, macro F1, confusion matrices, parameter counts, and training time. It uses a stratified train, validation, and test split of the…
This notebook builds principal-component factors from a panel of CME futures returns, not from engineered characteristics such as carry, momentum, or volatility. PCA finds directions that explain variation across products; the first may resemble a common…
This notebook compares stop-loss, trailing-stop, and time-exit overlays on fixed NASDAQ-100 microstructure backtests. The strategy makes decisions every fifteen minutes, while risk rules monitor prices every minute, allowing an overlay to exit a position…
This document introduces two latent-factor approaches for futures returns. Principal component analysis finds uncorrelated directions that explain the most return variation, while a neural stochastic discount factor seeks combinations related to the…
This document explains how to build daily forward-return labels for ETFs using adjusted closing prices at the observation date and a later trading session. It creates a primary monthly-horizon label and a shorter weekly variant, with labels computed on each…
This notebook evaluates validation predictions as long-only equity portfolios, using equal-weight top-K selection and a decision schedule determined by each label's cadence. It checks the close-to-next-open event ordering with a seeded random-signal run,…
This shared utility module provides a common gradient-boosting pipeline for quantitative research. It defines capacity presets and maps canonical parameter names into the corresponding settings for LightGBM, XGBoost, CatBoost, and scikit-learn histogram…
This notebook explains how searching across many factors or strategies inflates the apparent performance of the selected winner, even when individual estimates are computed correctly. A simulated set of noise factors illustrates that the largest information…
This case study compares sequence models on an S&P 500 equity and options feature panel. It pairs an LSTM, which carries gated state through a lookback window, with an N-Linear baseline that removes the latest level and fits a linear mapping. The baseline…
This notebook explains TimeGAN’s five-part architecture: an embedder and recovery network map between raw observations and latent space, a supervisor learns temporal transitions, and a generator and discriminator train adversarially. It describes staged…
This notebook compares gross and net Sharpe across strategy cost sweeps drawn from case-study backtests. For each deployed strategy configuration, it reads the assumed per-leg cost and rebalance cadence from recorded artifacts, interpolates Sharpe at the…
This notebook converts rolling ETF return windows into two-channel images for a convolutional neural network. The Gramian Angular Summation Field rescales values within each window, maps them to angles, and records trigonometric relationships between pairs…