This notebook compares two Transformer designs for forecasting 21-day ETF returns from trailing momentum features. PatchTST groups consecutive days into patches, placing short sequences of local shape in each token. iTransformer instead treats each feature’s…
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
5,018 documents
This notebook trains a Skip-gram Word2Vec model on a small, sentiment-labeled financial news corpus and examines what its nearest neighbors reveal. The method represents words based on the contexts in which they appear. In the example, profit and loss become…
This module describes a search interface for research agents, with a live provider and a deterministic mock provider. Searches can limit result counts and apply a publication-date cutoff, supporting point-in-time research by removing results dated on or…
This module defines a differentiable objective for end-to-end portfolio learning. It turns bounded asset-level risk weights into portfolio exposures using volatility scaling, computes average gross returns over available assets, and optionally subtracts…
This notebook explains how a conditional autoencoder extends instrumented PCA for ETF return modeling. Both methods map fund features to factor exposures and combine those exposures with factor returns; the autoencoder replaces IPCA’s linear…
This notebook uses linear regression as a baseline for forecasting NASDAQ-100 returns from minute-level microstructure features. Because spread and order-imbalance measures overlap across lookbacks, the feature matrix is highly collinear: ordinary least…
This notebook builds prediction intervals around gradient boosting forecasts and compares split conformal prediction with quantile regression, conformalized quantile regression, and adaptive conformal inference. Split conformal uses a chronological training…
This ETF feature study builds three model-derived inputs: a hidden Markov model (HMM) that estimates market regime, fractionally differenced prices for reference funds, and per-ETF GARCH(1,1) conditional volatility. It emphasizes that avoiding look-ahead…
This notebook explains instrumented principal component analysis (IPCA), which estimates common factors while making each stock’s factor exposures a shared linear function of its same-day option-surface features. Those features include implied volatility,…
This study compares gradient-boosted trees with a penalized linear model for ranking currency pairs by future returns. Its motivation is that trees can represent conditional relationships, such as using momentum in one market regime and carry in another,…
This notebook assembles a forecasting agent from a language-model client, a search tool, and a bounded turn loop. The agent searches for evidence and returns a binary probability with a rationale. Its response parser handles common formatting failures and…
This notebook applies Bayesian structural time-series event-study methods to estimate the impact of Federal Reserve announcements on a bond ETF. It builds a counterfactual from pre-event relationships between the target’s daily log returns and returns on…
This notebook compares DQN, PPO, and A2C in a shared simulated trading environment calibrated to hourly Bitcoin perpetual-futures returns. A GARCH(1,1) model supplies volatility clustering, while the environment charges for position changes and applies an…
This notebook tests whether four managed-portfolio strategies explain SPY returns after controlling for broad ETF co-movement. The strategies rank ETFs using lagged momentum, volatility, or recent returns. Ten principal components from a balanced set of…
This notebook adapts Word2Vec skip-gram to institutional equity holdings. It treats each institution’s portfolio as a sentence, stock identifiers as tokens, and positions ordered by reported holding value as word order. Stocks that repeatedly appear in…
This notebook tests whether model-based position sizing improves on equal weighting in a US firm characteristics strategy. It compares score weighting, which allocates more to names with higher predicted scores, with conformal weighting, which reduces…
This notebook evaluates whether a signal’s information coefficient (IC) is distinguishable from noise when successive observations are dependent. It illustrates the issue using a momentum signal and ETF data, explaining how overlapping forward returns,…
This notebook treats ARIMA forecasts as input columns for later models rather than as standalone predictions. It fits models to ETF returns, uses stationarity checks and autocorrelation diagnostics to propose orders, and compares candidate orders with an…
This notebook describes how to prepare and register NLinear forecasts for FX labels. NLinear subtracts the last observed level from each fixed-length input history, focusing the model on changes within the lookback. A shared sequence eligibility process…
This shared analysis utility supports comparing trading-model predictions through registry metrics and prediction-level diagnostics. It loads precomputed information-coefficient results, optionally filters by label or model family, and by default excludes…
The document describes three model-based features built from futures carry: an ARIMA forecast of next-session carry, rolling Fourier measures of selected cycle lengths, and a two-state hidden Markov model that infers the market regime from average carry. Its…
The document describes converting rolling ETF return windows into two-channel images for a conventional convolutional neural network. A Gramian angular field maps normalized observations to angles and records pairwise angular relationships; a Markov…
This document introduces the Chen, Pelger, and Zhu monthly US equity panel used to benchmark asset-pricing models. It describes 46 firm characteristics grouped by economic theme, next-month excess returns, and the panel’s time-ordered train, validation, and…
The document explains a temporal convolutional network for predicting crypto perpetual funding premiums from a 60-settlement window. Four causal convolution blocks use a kernel of three and dilations of 1, 2, 4, and 8. Their receptive field spans 61…