This notebook describes an out-of-sample backtest for a selected crypto perpetual funding strategy. It reuses predictions generated from training history that ends before the holdout period, then applies the chosen strategy configuration, including its…
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
75 documents
This notebook rehearses a deployment cycle for a crypto funding-rate direction model. It trains a LightGBM classifier on historical Binance-derived perpetual data, fetches live hourly bars and funding rates from OKX, computes the model's features, and…
This notebook studies how ridge, lasso, and elastic net behave when a crypto perpetuals feature matrix measures one economic quantity—the premium—many different ways. Premium levels, changes, volatility, standardized positions, ranks, and related funding…
This document describes data access and alignment conventions for crypto perpetual futures and related on-chain series. It explains that premium-index bars are timestamped at their opening time: an eight-hour bar records the premium leading into the funding…
This notebook develops a two-model exit policy for hourly crypto perpetuals. An entry classifier identifies unusually strong forward returns, while an exit classifier predicts whether the next forward return will be negative. The exit model receives…
This document describes a ledger for applying funding cash flows to perpetual futures positions during a backtest. At each funding timestamp, it uses the position’s signed quantity, the current mark, any contract multiplier, and the funding rate to calculate…
This data exploration examines eight-hour premium-index observations for USDT-margined crypto perpetual contracts and explains how the premium relates to funding payments. The index uses executable impact bid and ask prices relative to the price index,…
This dataset guide presents Binance perpetual futures price and volume data alongside an eight-hour premium index. Hourly OHLCV records describe market activity, while the premium measures the difference between perpetual and spot prices relative to spot. A…
This case study fits linear models to predict returns and direction in crypto perpetual futures. Its feature matrix is dominated by variations of the perpetual premium, the gap between the contract and spot price that drives funding payments. It contrasts…
This notebook screens financial and model-based features for their relationship with the next eight-hour return of crypto perpetual contracts. For each settlement, it computes cross-sectional Spearman correlations across eligible contracts, then summarizes…
This notebook trains a vanilla autoencoder on hourly returns for a basket of crypto perpetual markets. Returns are standardized using the training period, and a neural network compresses the multi-asset input into a two-dimensional latent representation…
This audit record defines how several backtesting frameworks are compared with ML4T across real strategy case studies and a synthetic stress workload. It specifies the comparison rules for ordered fills, timestamps, account-money values, quantities, and…
This notebook defines forward price-return labels for a fixed panel of crypto perpetual contracts and explains how label construction affects every later model and backtest. It shifts bar-open timestamps to the time completed data becomes available,…
This notebook asks whether sequence models can improve on hand-built summaries of perpetual funding premium history. It compares NLinear, a simple linear model that reads an ordered window, with a two-layer LSTM. Both use the same feature order, walk-forward…
This notebook builds a simulated market-making task in which a proximal policy optimization agent chooses quote skew and spread width. The environment uses a GARCH volatility process calibrated to hourly crypto perpetual-futures returns, a reservation price…
This notebook studies six allocation methods applied to selected crypto perpetual strategy configurations. The rankings and entry rules remain fixed while the capital assigned to each position changes. The methods use model scores, individual contract…
This analysis explains how Binance’s perpetual-futures premium index relates to spot prices and how the exchange transforms that premium into periodic funding. The index uses executable impact bid and ask prices relative to an underlying price index,…
This notebook describes how to evaluate a selected crypto perpetual funding strategy on a later holdout period. It reuses predictions generated from training data ending before the holdout, carries the chosen signal, allocation method, and exit overlay…
The notebook trains a vanilla autoencoder on standardized hourly returns for a group of crypto perpetual markets. Its encoder compresses the cross-asset return vector into a two-dimensional latent representation, and its decoder reconstructs the input. The…
This notebook implements a long-only RSI mean-reversion rule for BTC/USDT perpetuals using an event-driven backtesting engine. It aggregates intraday bars into UTC daily OHLCV data, computes a rolling gain-and-loss RSI, enters when the indicator falls below…
This notebook explains how to construct forward price-return labels for an eight-hourly crypto perpetuals panel. It shifts bar-open timestamps to the time completed-bar data becomes available, then calculates future returns on the contract price series…
This case study selects one configuration from a frozen pool of crypto perpetual futures strategies spanning multiple return and direction labels, portfolio sizing methods, and risk overlays. It chooses the highest validation Sharpe, then examines…
This notebook uses double machine learning to estimate whether deviations in perpetual-futures premiums relate to subsequent eight-hour returns, and whether the estimated relationship differs between high- and low-volatility markets. It describes a panel…
This notebook trains a Proximal Policy Optimization agent to liquidate a fixed order over a set horizon. It compares the learned pacing policy with TWAP and an Almgren–Chriss schedule, measuring implementation shortfall and examining when each strategy…