This demonstration describes the operational shape of a continuously running crypto strategy connected to a USD spot broker. It maps a larger perpetual-futures case-study universe to the smaller set of available spot pairs, then routes a momentum z-score…
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 trains a reinforcement learning agent to schedule a fixed sell order across hourly bars from a crypto perpetual futures market. Its state includes lagged returns, volatility, prior-hour volume, the perpetual premium to spot, and time until…
This notebook builds a reusable diagnostic survey for financial datasets before preprocessing or feature engineering. It checks time-index dtype, null timestamps, ordering and uniqueness; finds exact and key-based duplicates; measures missing values by…
This chapter presents a framework for evaluating causal claims in quantitative trading research. It starts with clear definitions of treatment, outcome, estimand, counterfactual, and adjustment set, then matches research questions to methods: Double Machine…
This evaluation notebook screens financial and model-based features for their relationship to the next eight-hour return of crypto perpetual futures. It builds the evaluation sample from walk-forward validation windows, keeps the final holdout outside the…
The document explains why TabM is used to model perpetual funding panel data: its shared neural backbone combines all input features, while nonlinear layers can represent interactions. Unlike a tree that chooses one feature at each split, this design can use…
This notebook studies gradient-boosted models for forecasting returns and direction in crypto perpetuals. Its grid varies tree capacity and loss function, including squared-error, absolute-error, and Huber objectives, while scoring models at multiple points…
This notebook estimates whether the premium z-score of a crypto perpetual affects subsequent eight-hour returns when three declared drivers—price volatility, funding rate, and average premium deviation—are held fixed. Because treatment is continuous, the…
This exploratory analysis profiles hourly OHLCV for crypto perpetual contracts alongside an eight-hour premium index. It examines symbol and date coverage, changing contract membership, premium units and distribution, OHLC integrity, missing values, and…
This notebook develops a unit-aware framework for estimating trading costs across equities, ETFs, futures, foreign exchange, and crypto perpetuals. It first distinguishes traded volume from activity measures that cannot be converted into dollar turnover,…
This notebook measures how execution costs affect the already selected crypto perpetual futures configuration. It holds the model, checkpoint, entry rule, allocation, and risk control fixed, then reruns backtests across a grid of round-trip charges on traded…
This guide maps causal questions to Python libraries and clarifies the distinction between estimating effects under an assumed causal structure and discovering possible structures from data. It introduces double machine learning for adjusted treatment…
This notebook applies TabM, a weight-sharing neural ensemble, to a panel of cryptocurrency perpetual-futures features. Its members share a neural backbone but have separate scaling vectors and output layers, combining efficient ensembling with nonlinear…
This notebook builds an auditable report for a long-only Bitcoin strategy that enters and exits using RSI thresholds. It compares gross and net results, then measures performance against a buy-and-hold benchmark run with the same data, warmup, exposure,…
This notebook frames a focused test: whether a learned sequence representation of perpetual-funding features improves on hand-built summaries of the premium, the gap between perpetual and spot prices. It compares NLinear, which applies a linear mapping to…
This notebook turns model rankings into simple crypto perpetual portfolios. At each funding timestamp, an entry rule selects contracts from the top or bottom of the ranking and assigns equal weights. Equal weighting provides a reference point: comparisons…
This notebook compares validation predictions from multiple model families for perpetual-futures funding research. It explains that information coefficient measures rank association between predictions and subsequent returns, AUC measures ranking for up or…
This implementation describes how to construct batched sequence windows for panel data used in deep-learning studies. Windows follow the panel’s expected calendar rather than compressing each asset’s observations into consecutive rows. Missing sessions…
This notebook compares Polymarket’s crypto-settled event contracts with Kalshi’s regulated contracts, focusing on how access rules and listing policies shape the prices and questions each venue represents. It inspects a small Polymarket snapshot, checks how…
This notebook compares behavior cloning with inverse reinforcement learning (IRL) for learning from execution records. Its demonstrations come from a TWAP schedule, whose risk-neutral objective is known: spread trades evenly to limit impact while accepting…
This notebook examines retained results from a real-strategy audit comparing the LEAN engine with matching ML4T Backtest profiles. It identifies the asset-class workloads supported by the frozen inputs and reports parity evidence across fills, valuations,…
The notebook assembles end-to-end pipelines for daily equities and hourly crypto perpetual futures, covering acquisition, validation, source labeling, and storage. Its equity example joins historical WikiPrices data with a more recent Yahoo feed. Since the…
This notebook uses double machine learning to estimate whether a perpetual-futures premium z-score is associated with the following eight-hour return after adjustment for six pre-treatment controls. It compares effects across high- and low-volatility regimes…
This chapter describes a path from research to live execution built around strategy logic that can run in backtest, paper, and live settings. It covers broker and platform integrations, deployment loops, data and feature parity checks, order lifecycle…