This notebook builds a daily feature panel for a long-short ranking strategy across twenty FX pairs. It aggregates four-hour spot bars into sessions ending at the New York 5 PM rollover, then constructs trailing return, channel, volatility, drawdown, range,…
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
23 documents
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 chapter review describes a hypothesis-driven process for defining trading strategies before backtesting. It connects documented data assumptions and immutable configuration to exploratory analysis, event studies, and a structured strategy term sheet.…
This notebook explains how to construct one-, five-, and 21-session forward spot returns for a fixed FX-pair universe. It first maps four-hour bars into trading sessions using a New York rollover calendar, then builds returns without removing rows before…
The notebook presents a reporting method for a long-only RSI mean-reversion strategy on BTC. It compares gross and net performance, then benchmarks the strategy against buy-and-hold using the same trading dates, exposure, execution engine, fill timing, and…
This configuration describes a daily long-short strategy across 20 FX pairs. It sets a New York close decision time, next-bar execution, equal-weight sizing, and ranking signals based on momentum or carry. It also specifies spread and swap-point costs,…
The document demonstrates a VectorBT workflow for a long-only Bitcoin RSI mean-reversion rule. It calculates RSI from daily close prices, enters when the prior day’s reading falls below a lower threshold, and exits when it exceeds an upper threshold.…
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 document develops a daily feature panel for ranking twenty currency pairs at the New York 5 PM close. It distinguishes rankable signals, such as standardized multi-horizon returns and channel position, from market-state measures such as volatility,…
This notebook expands an ETF feature evaluation from a single return horizon to a scan across ten features and three horizons, correcting for multiple tests. It then applies mechanism-based diagnostics to long-lookback 12-1 momentum and short-term reversal:…
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 case study evaluates daily cross-sectional signals across a broad US stock universe and lays out a long research pipeline, from point-in-time data and engineered features through model comparison, portfolio construction, costs, and holdout assessment.…
This notebook explains pairwise and cross-sectional features using ETF panels. It compares Engle–Granger and Johansen cointegration tests, distinguishing a stationary spread from simple co-movement. Its energy fund and crude oil fund example fails both…
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…
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 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 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…
This notebook applies configured stop-loss, trailing-stop, and time-exit rules to the strongest validation-ranked signal or allocation strategy for each futures return horizon. Each rule is assessed on its own parent strategy, with parameters fixed in…
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 case study explains how to construct forward-return labels for a cross-sectional foreign-exchange strategy that ranks currency pairs and buys or sells according to their relative ordering. It first maps four-hour spot bars into trading sessions using a…
This notebook implements a long-only RSI mean-reversion rule for BTC/USDT perpetual bars using an event-driven backtesting engine. It aggregates intraday observations into UTC daily bars, calculates a simple rolling gain-and-loss RSI, enters when the…
This notebook develops features that require multiple asset series. It compares Engle-Granger and Johansen tests for cointegration, explains why co-movement alone does not imply a stationary spread, and estimates hedge ratios both with a full-sample…