This notebook tests whether an LSTM can extract temporal structure from ETF feature histories that flat-feature models may miss. It resolves the declared sequence population against available features, labels, entities, and walk-forward folds before fitting.…
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 notebook defines close-to-close forward returns over two trading horizons for a cross-section of ETFs, with each horizon measured from an adjusted close to the close a fixed number of sessions later. It explains why labels are built on complete symbol…
This tutorial derives the Kelly fraction for a binary wager by maximizing expected logarithmic wealth growth, then extends the idea to continuous returns and a multi-asset portfolio. It uses symbolic differentiation and simulations with shared coin-toss…
This notebook constructs several sampling schemes from a single day of NASDAQ ITCH trades for an equity: calendar-time, tick, volume, dollar, imbalance, and run bars. It compares their statistical properties, including normality and autocorrelation, and…
This notebook demonstrates two sequential monitors on validation prediction errors from two linear equity model configurations: a two-window mean-shift detector and a monitor for the frequency of bad days. Each detector is calibrated on an initial period and…
This notebook evaluates four signals derived from news text: weighted surprise, average sentiment, sentiment momentum, and article coverage. It uses forward returns prepared by an earlier feature-building step, then calculates a daily cross-sectional…
This notebook applies double machine learning (DML) to estimate the effect of skip-recent momentum on ETF forward returns, a causal question distinct from forecasting returns. It models the outcome and the momentum treatment using declared confounders, then…
The notebook demonstrates tuning LightGBM for ETF return prediction with Optuna’s TPE sampler. It searches tree structure, sampling, and regularization settings, using early stopping to choose the boosting rounds and a custom callback to report…
This chapter presents a research workflow for using predictive models in trading, where stable out-of-sample forecasts may matter more than unbiased coefficient estimates. It covers regularized regression methods such as Ridge, LASSO, and Elastic Net, along…
This notebook turns institutional 13F holdings into a bipartite institution-to-stock graph and derives features for research, including stock co-ownership similarity, ownership breadth and concentration, and changes in reported holdings. It aggregates…
This notebook compares exhaustive grid search with Optuna’s TPE Bayesian sampler for tuning a LightGBM model on an ETF forward-return prediction task. It first gives both methods the same trial budget over a small categorical grid, where exhaustive search…
This notebook studies how to calibrate time, tick, volume, dollar, and imbalance bars using multiple sessions of NVDA market-by-order trade data. It filters trades to regular trading hours, uses the feed’s aggressor-side labels, and examines day-to-day…
This chapter presents strategy research as the design and evaluation of an executable decision process, from the initial economic idea through position sizing, constraints, costs, and live-like testing. It recommends classifying strategy families and…
This notebook defines forward-return labels for a US equities panel and explains why their construction affects every downstream model and backtest. It specifies adjusted-price return windows in trading sessions, checks that each stock has the required…
This notebook builds model-based features for S&P 500 options research from underlying returns. It fits GJR-GARCH, which gives extra weight to negative return shocks, and a stochastic-volatility model whose latent variance is estimated with MCMC and tracked…
This notebook trains TabM neural networks to rank ETFs using the same flat feature table as linear and boosted models. Each ensemble member shares a two-layer backbone but has its own scaling vector and output layer, allowing predictions to be averaged with…
This notebook explains how to decompose ETF returns and risk using CAPM and Fama–French factor regressions. It estimates full-sample exposures with heteroskedasticity and autocorrelation robust standard errors, tracks changing betas with rolling windows, and…
This notebook adapts skip-gram Word2Vec to institutional holdings by treating each 13F portfolio as a sentence, each stock identifier as a token, and position size rank as token order. Nearby positions form the context, so stocks that institutions place in…
This notebook presents a GT-GAN-inspired generative model for financial series sampled at irregular intervals, such as tick, volume, or dollar bars. Its encoder, generator, discriminator, and decoder use continuous-time Neural ODE dynamics, allowing latent…
This notebook describes fitting PatchTST to one-minute NASDAQ-100 data to predict returns over several forward horizons. The model groups consecutive observations into patches and applies attention across them, reducing the number of items compared while…
This notebook checks whether historical ETF data can support a monthly ranking strategy before fitting a model or making forecasts. It tests the tradable universe using prior-year liquidity, counts eligible funds on rebalance dates, converts per-share…
This notebook compares Polymarket’s crypto-settled event contracts with the regulated Kalshi venue as sources of alternative data. It explains how access rules, settlement assets, position limits, and listing policies shape which participants influence…
This notebook explains an unconditional signature-based Wasserstein GAN for generating financial time series. It transforms returns into augmented paths, computes truncated path signatures, and trains an LSTM generator driven by Brownian noise to match…
This notebook demonstrates feature-drift checks on ETF momentum and technical features across calm and stressed windows, and on crypto perpetuals with premium-index data across market regimes. It compares Population Stability Index (PSI), including its…