This notebook separates continuous price variation from discrete jumps in intraday equity returns. It estimates daily realized variance from squared log returns and uses bipower variation as a jump-robust estimate of the continuous component; their…
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 uses principal component analysis on a liquid subset of US equities to extract latent factors and form long-short eigenportfolios. It explains how standardized PCA vectors are converted to raw-return weights and normalized by gross exposure,…
This notebook builds forward share-return labels for a strategy that reads listed options data to rank equities and then holds the shares. It creates an adjusted price series that accounts for corporate actions and identifies companies by persistent security…
This notebook frames a parent order as a finite-horizon control problem. At each interval, tabular Q-learning chooses a multiplier on a VWAP-based trade slice, conditioning on time and remaining inventory plus the most recently observed spread and volatility…
This notebook uses historical US equity returns to build a correlation network and explore portfolio construction. It selects a liquid universe using estimation-window data, converts pairwise correlations into distances, and extracts a minimum spanning tree…
This notebook presents principal component analysis as an unconditioned latent-factor baseline for forecasting stock returns in an option analytics study. PCA uses the historical return panel to estimate common movements and each stock’s exposure to them,…
This case study examines whether information from listed options can help select S&P 500 stocks. It combines daily equity prices with option-implied volatility levels, skew, term structure, and variance risk premium measures across 633 stocks from 2017 to…
This notebook uses maximum favorable excursion (MFE) and maximum adverse excursion (MAE) to ground triple-barrier label widths in observed price paths. For a position entered at a bar’s close, it measures the best favorable and worst adverse movement over a…
This notebook demonstrates an operational cycle for an ETF equity strategy: refresh market data, compute financial features, retrain a Ridge model, generate current cross-sectional predictions, replay them through a backtest engine, and stage a top-ranked…
The document describes a specialized backtest for a weekly S&P 500 options strategy. Each cohort selects highly ranked constituents, sells near-the-money call and put options with roughly a month to expiration, and delta-hedges with shares when net delta…
The document presents GReaT, a framework that serializes rows of mixed numerical and categorical financial data as text, fine-tunes a language model on those records, and parses generated text back into tables. Its example builds ETF features from historical…
This notebook uses principal component analysis to represent the common movements in a broad US equities panel. PCA extracts directions that explain shared variation in returns; each stock’s loading measures its exposure to each direction. A prediction…
This notebook presents a temporal convolutional network (TCN) for predicting ETF forward returns from sequences of trailing return features. Causal convolutions ensure an output uses only observations up to its date, while exponentially increasing dilation…
This notebook explains tick and volume imbalance bars, then compares adaptive, fixed threshold, and rolling window approaches on NVDA trade data. Tick imbalance accumulates signed trade directions until a threshold is reached; the expected threshold depends…
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…
This notebook sets out a descriptive way to translate gross returns into net performance by modeling trading frictions, financing, and fund expenses separately. Its parameterized cost stack calculates trading costs from turnover and trade size, financing…
This notebook analyzes reconstructed NASDAQ order books to describe intraday spreads and depth at the best bid and ask, then examines whether order flow imbalance is associated with the next bucket’s return. It expresses spreads in basis points to make costs…
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 case study explains why stop-losses, trailing stops, and other position-level overlays cannot be tested for US firm-characteristics portfolios built from monthly observations. The vectorized backtest applies one weight vector to a realized forward…
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 presents a workflow for deciding how financial time series should be modelled. It begins with plots of SPY prices and returns, VIX levels, and the return distribution to identify drifting levels, clustered moves, and heavy tails. It then…
This configuration specifies a long-only ETF ranking and rebalancing experiment. It defines a broad 100-ETF universe spanning equity, bond, commodity, and regional exposures, with monthly decisions and next-open execution. The main label forecasts a 21-day…
This US equities panel study uses a penalized linear model as a baseline for forecasting forward returns from features observed at the close. Its feature set contains overlapping momentum and volatility measurements, creating multicollinearity that can make…
This benchmark compares CSV, Parquet, Feather (Arrow IPC), and HDF5 using the same deterministic OHLCV panel. It measures write time, materialized read time, file size, and the effect of reading only selected columns. The timing policy uses a single write…