This notebook turns model rankings into simple crypto perpetual-futures portfolios so later experiments can measure the effect of changing sizing, costs, or risk controls. It applies entry rules such as selecting the highest-scored contracts for longs and…
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
100 documents
This notebook uses Optuna to tune LightGBM return models while considering both cross-sectional information coefficient (IC) and prediction turnover. A single-objective search maximizes IC for comparison; an NSGA-II multi-objective search identifies…
This analysis compares three ways to convert signed model return forecasts into binary positions: a fixed zero cutoff, a trailing percentile for each symbol, and a cross-sectional percentile across symbols. It applies the rules to registered validation…
This notebook trains a PPO agent to schedule a parent sell order across hourly perpetual-futures bars. It augments price and volume history with the perpetual premium and time to the next funding settlement, while lagging information that would not yet be…
This notebook introduces vectorized backtesting with VectorBT through a long-only RSI mean-reversion rule on Bitcoin perpetual market data. It calculates a close-based RSI, enters when the prior day’s reading is below a lower threshold, and exits when it is…
This notebook compares six allocation methods on crypto perpetual strategies that have already passed a baseline selection funnel. It keeps each strategy’s predictions and entry rules fixed, then changes how capital is assigned: one allocator uses model…
This notebook adds a temporal convolutional network (TCN) to a comparison of sequence models for forecasting cryptocurrency perpetual funding premiums. Causal padding ensures each position uses only current and earlier observations, while dilated…
This module estimates parameters for simulated crypto markets used in reinforcement-learning environments. It loads hourly perpetual-market data for a selected symbol, computes close-to-close log returns, and fits a GARCH(1,1) volatility model. If the…
This notebook studies whether an extreme perpetual futures premium affects subsequent BTC returns or premium reversion. It defines treatment as a high-premium state and compares a broad market outcome, which may be influenced by many forces, with premium…
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 analysis asks whether the data can support a cross-sectional crypto perpetual strategy before fitting a model or making forecasts. The proposed approach ranks contracts by premium at each funding settlement, then buys one side of the ranking and sells…
This notebook explains how to turn fitted GJR-GARCH and hidden Markov models into trading features while controlling look-ahead bias. GJR-GARCH estimates conditional volatility and captures the greater impact of negative return shocks; a two-state Gaussian…
This notebook compares two causal questions about extreme premiums in Bitcoin perpetual futures: whether a premium state predicts forward returns, and whether it predicts subsequent premium reversion. The treatment is a binary indicator for a premium z-score…
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…
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…
This notebook measures how execution costs affect the already selected crypto perpetuals configuration. It holds the model, checkpoint, entry rule, allocator, and risk control fixed, then reruns the strategy across a declared grid of round-trip charges on…
This notebook tests a two-model exit design on hourly BTC, ETH, and SOL perpetual data. An entry classifier identifies unusually strong forward returns; its predicted probability then joins technical features in a separate model that estimates whether the…
This analysis compares validation predictions from several model families for perpetual futures funding. It explains that information coefficient measures the ranking of subsequent returns, AUC measures the ordering of up and down outcomes, and log loss…
This case study assesses DeFi Llama total value locked data as a possible input to an Ether trading research pipeline. It separates signal strength, data quality, legal suitability, and commercial value, with legal issues and the lack of reconstructible…
This notebook evaluates position-level exits on crypto perpetual futures positions selected by an earlier allocation stage. It defines fixed loss stops, trailing stops tied to each position’s best price, and time exits after a set holding period. The…
This document describes a dataset and workflow for studying cryptocurrency perpetual futures alongside their premium index. It outlines hourly OHLCV observations and eight-hour premium readings across a configured universe, with download, loading, filtering,…
This notebook walks through a deployment rehearsal for a crypto funding-rate direction model. It trains a three-class LightGBM model on historical Binance-derived perpetual data, then fetches live hourly bars and funding rates from OKX, aggregates data to…
This notebook assesses whether Binance perpetual-futures data can support a cross-sectional strategy that ranks contracts by premium and takes long and short positions. It does not fit a model or make forecasts. Instead, it checks the declared trading…
This configuration specifies a long-short strategy research workflow for crypto perpetual futures. It defines a 19-asset volume-selected universe, decisions aligned to eight-hour funding settlements, and execution at the funding timestamp. The primary target…