This script builds a universe of Binance futures contracts using 24-hour ticker data and exchange metadata. It joins weighted average price and quote volume with contract onboarding date, price tick size, and order quantity constraints. It then excludes…
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
26 documents
This example builds a BTCUSDT futures market-making strategy whose fair price is estimated from a spot reference price plus a smoothed spot–futures basis. It resamples spot and futures book-ticker mid-prices, carries observations forward, and calculates a…
This document describes a parameter sweep for a grid trading backtest. It combines every configured symbol with candidate relative half-spread and grid-count values, then runs the resulting backtests in parallel over a selected date range. The grid interval…
This tutorial compares a high-frequency grid market-making strategy across cryptocurrency exchanges, emphasizing that different order flows can change results even for the same trading pair and parameters. The strategy places layered limit bids and offers…
This tutorial describes a high-frequency grid strategy that places passive limit orders at regular intervals around the mid-price. It maintains a fixed number of buy and sell levels, refreshes orders as the market moves, and limits new orders based on the…
This tutorial applies the Guéant–Lehalle–Fernandez-Tapia market-making model to grid quoting. It derives bid and ask quote depths from a fair price, volatility, trading intensity, and inventory. The resulting quotes combine a half-spread with an…
This guide explains how to prepare tick-by-tick trades and full order-book updates for HftBacktest, noting that this level of historical data is not commonly available for free in the way daily bars are. For Binance Futures, it describes collecting raw feed…
This tutorial develops a market-making approach that estimates a futures contract’s fair price from spot-market returns. Its basic arbitrage pricing theory relationship assumes futures and spot returns move one-for-one with no intercept; the strategy uses…
The document outlines safeguards for cryptocurrency futures trading during sharp market moves and delayed updates. It recommends monitoring the gap between a futures contract and its underlying spot price, and between last price and mark price, as signs that…
This Rust component connects to a Bybit public WebSocket stream and converts incoming order book and public trade messages into internal live feed events. It subscribes to several order book depth levels and public trades for requested symbols, parses bid…
This document describes a data-conversion workflow for preparing Hyperliquid market feeds for HftBacktest. It reads timestamped stream records, handles trade and level-two book messages, and converts them into typed depth and trade events using configurable…
The document explains why a single exchange depth stream may not capture every order-book change. It compares Binance Futures incremental Level 2 data with the more frequently updated book-ticker feed, then shows how to combine them into a consolidated feed…
This Python utility converts Bybit historical depth and trade files into the event array format used by HftBacktest. It reads order book updates from a zipped JSON stream and trades from a gzip-compressed CSV, creates depth, snapshot, clear, and trade…
This example demonstrates a basic workflow for preparing Bybit order book data and running it through a market-making backtest. It shows two conversion paths: a fused conversion for multi-level depth data and a conversion that selects a single depth level.…
This example shows how to combine a spot BTCUSDT mid-price series with US dollar margined futures order book data in an hftbacktest simulation. It parses spot book ticker messages into local timestamps and mid prices, then, at each backtest timestamp,…
This Rust example configures a live trading bot for the BTCUSDT futures instrument on Bybit and invokes a separate grid-trading routine. It registers instrument precision and market-depth settings, installs an error handler for connection, order, and custom…
This notebook excerpt describes evaluating multiple cryptocurrency pairs from grid-trading backtests. It filters for assets listed before May 2024, excluding Bitcoin and Ether, and examines a run made in June 2024 using May data. For each pair, it builds an…
The document presents a simplified high-frequency grid market-making approach inspired by GLFT. Rather than dynamically estimating order-arrival intensity to set spreads and skew, it uses recent price volatility to determine quote distance. Inventory is…
The document describes processing Bybit’s compressed raw feed files into event data compatible with a high-frequency backtesting system. It handles order book snapshots and updates, as well as public trades, and offers two approaches: combine multiple book…
This tutorial demonstrates how to inspect market depth and trade flow in an event-driven backtest. It first reads the nearest visible bid and ask levels, then shows a region-of-interest vector representation that limits depth access to a configured price…
This utility converts Binance historical order-book depth, snapshot, and trade files into an event format used by HftBacktest. It reads CSV data, identifies or infers column headers, maps records to depth, snapshot, or trade events, and assigns exchange and…
This example generates order-latency records for a crypto trading backtest from historical feed data. It first keeps events that contain both exchange and local timestamps, then aggregates to one record per second using the last timestamps in each interval.…
This document develops order book imbalance as an alpha input for a crypto market-making strategy. It defines static and standardized imbalance, then compares related measures: volume-adjusted mid-price (VAMP), weighted-depth order book price, and a hybrid…
These release notes describe Hummingbot 1.14.0, including new centralized and decentralized exchange connectors, documentation changes, and updates to bot orchestration and execution components. The trading-related changes include a KuCoin perpetual…