This tutorial explains several ways to organize exchange objects in a cryptocurrency strategy. For a strategy that processes multiple trading pairs, it contrasts switching the pair on one exchange object with assigning separate objects to each pair. It then…
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
1,625 documents
The document introduces a data science research environment as a way to study hedging concepts in crypto trading. It focuses on spot-futures hedging, where positions in spot and futures are paired to analyze price differences and the process of opening and…
The document explains how perpetual futures funding payments help keep contract prices near spot prices, then describes a market-neutral carry trade: short a perpetual contract and buy the same asset in spot to collect positive funding. It outlines screening…
The document explains a calendar-spread hedge between near-dated and deferred cryptocurrency futures. A positive spread position buys the nearer contract and sells the deferred one; the reverse position sells the nearer contract and buys the deferred one.…
This document describes a cryptocurrency strategy that shorts currency-margined perpetual contracts to seek funding payments. It explains that these contracts are denominated in fixed-value units and that, in the author’s example, the coin balance changes…
This article presents a short-term trading idea based on a claimed lead-lag relationship between two related crypto contracts. When the leading contract moves, the strategy measures the relative price change and trades the lagging contract if the difference…
This article outlines a relative-value strategy that trades two futures contracts on the same cryptocurrency with different expiries. It treats their price difference as a spread that may revert toward its recent range. The example uses weekly and quarterly…
This personal account traces the author’s path from hardware development into cryptocurrency mining and automated trading. It describes early Litecoin mining, holding coins through a severe decline, and later selling during a recovery. The trading discussion…
This overview sketches several automated crypto strategies. Its main examples are funding-rate arbitrage, which pairs a short perpetual futures position with a spot long to seek funding income, and spot grid trading, which places paired buy and sell levels…
This article outlines a workflow for finding and trading funding-rate differences between perpetual futures on multiple crypto exchanges. It explains the basic hedge: short where the funding rate is higher and go long where it is lower, aiming to collect the…
The article proposes an automated workflow for finding relative-value baskets from a universe of instruments. It arranges log prices in a time-by-instrument matrix, uses singular value decomposition to estimate common movement and residual directions, and…
The article proposes a relative-value strategy linking the South Korea ETF EWY with Samsung Electronics and SK Hynix. It explains why the author avoids trading the visible cash-equity versus perpetual-contract basis: trading-hour mismatches, currency…
The document gives a compact example of a cross-exchange hedging strategy. It retrieves account balances and market tickers from several exchanges, then checks pairs of different exchanges for a price spread above a configured threshold. When the spread…
The article explains cross-exchange cryptocurrency arbitrage based on temporary price differences. It proposes monitoring executable bid and ask prices, buying where the asset is cheaper and selling where it is dearer, then closing when the spread narrows.…
The article introduces intertemporal hedging by pairing a long position in one contract with a short position in another, then closing both when the combined result is favorable. It derives the basic spread relationship for a short in contract A and a long…
This tutorial develops a multi-contract spread monitor and a grid-based hedge for crypto futures. It matches near and far contracts for the same underlying, calculates spread values from executable bid and ask quotes, and creates price levels around an…
This article explains how to build an interactive tool for calendar spread trading in commodity futures. It outlines checking the CTP connection, fetching quotes for two delivery months, calculating their price difference, and plotting that spread over time.…
The author recounts moving from early cryptocurrency trading and leveraged futures to writing automated strategies, including moving-average and grid approaches. The account describes losses and operational setbacks as well as learning to use trading APIs…
This beginner FAQ distinguishes automated trading from quantitative strategy research. Programs can connect to exchanges through APIs to place trades or perform supporting tasks, while profitable strategy design is a separate and harder challenge. It…
This tutorial designs a spot arbitrage strategy that buys on the lower-priced exchange and sells on the higher-priced one. It lays out controls for the minimum and maximum trade size, price and quantity precision, exchange-rate conversion, and a spread…
This document sketches a way to shift crypto assets between exchange accounts using opposing positions in futures contracts. The example monitors order book depth at two venues, opens a short at one and a long at the other when the price spread widens, and…
This tutorial explains ways to configure a crypto trading bot for multiple trading pairs, exchange accounts, and futures contracts. For several pairs on one account, it describes either switching the pair on a single exchange object or assigning separate…
The document describes a high-frequency trading approach that looks for short-term lead-lag relationships among cryptocurrency exchanges. It compares midpoint prices from several venues, measures each venue’s move against its previous observation using a…
The article reviews changes in cryptocurrency perpetual-futures funding-rate arbitrage. It says that as more capital entered the strategy, positive premiums and negative-premium exit opportunities became smaller, while slippage rose and attractive rates…