This example describes a mean-reversion approach to the price spread between near- and far-month index futures contracts. On 15-minute bars, it calculates the difference between the contracts’ closing prices over an 80-bar window, then estimates the spread’s…
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
This script describes a two-exchange spot arbitrage process for the same asset. It compares executable bid and ask prices across venues, estimates available depth, and places paired buy and sell orders when the spread exceeds a threshold that includes…
This document describes an execution utility for opening, closing, or reversing positions in two perpetual futures contracts. When opening, it calculates each leg's quantity from a shared per-asset value and the current ticker price, with a contract-value…
This spread strategy uses Bollinger bands to enter positions when a spread moves beyond its recent range, then aims to close the position after it returns to its simple moving average. It updates spread bars from incoming ticks and waits for its price…
This example describes two triangular arbitrage directions across BTC/USDT, LTC/USDT, and LTC/BTC markets. It compares prices from the three tickers and estimates whether converting through the triangle could yield a positive return after applying a stated…
This document describes a read-only scanner for comparing perpetual futures funding rates across centralized and on-chain venues. It converts rates with different settlement intervals to annualized values and an equivalent eight-hour spread, then pairs the…
This document describes a charting script for tracking Brazilian real quoted crypto prices across BitcoinTrade and Binance. It plots BitcoinTrade bid and ask data for several assets, then compares corresponding BRL markets on both venues to visualize…
This bot monitors Bitcoin order books on two exchanges and opens paired trades when the bid on one venue exceeds the opposing ask on the other by a configurable spread threshold. It sells on the higher-priced venue and buys on the lower-priced venue,…
This controller coordinates cross-exchange market-making executors across a maker venue and a taker venue. Users configure separate buy and sell profitability targets with associated allocation weights. The controller divides its quote budget equally between…
This introduction explains how FMZ’s visual editor assembles trading logic from connected blocks. It covers snapping blocks together, configuring inputs, using defaults, copying and arranging modules, and saving a strategy. The examples show utility blocks…
This brief note examines how trading fees affect the spread available to a triangular hedging strategy. It points readers to two research notebooks: one using the default fee setting and another adjusted for a different fee rate. Its central lesson is that…
This note presents a rudimentary BTC futures strategy prototype that monitors order books on two exchanges. When the bid on one venue exceeds the ask on the other by a specified spread, the example opens a short on the first exchange and a long on the…
The article describes a taker-style spot arbitrage method for capturing temporary price gaps across crypto exchanges. It proposes fetching order books concurrently, combining eligible ask and bid levels, and ranking them after adjusting prices for exchange…
This article explains the design of a C++ strategy for hedging the calendar spread between near and deferred cryptocurrency futures contracts. It outlines the basic position logic: when the spread is positive, it sells the deferred contract and buys the…
This tutorial outlines a monitor for a Curve stablecoin pool that compares a token’s implied exchange value with an assumed acquisition cost. It reads token metadata and wallet balances from the pool and token contracts, estimates the output for a proposed…
The document introduces a trading terminal designed to manage several exchange accounts and markets from one customizable screen. Users can bind exchange and trading-pair modules into groups, arrange market data, order books, account and position information…
The article explains crypto execution through three layers: a macro trader schedules child orders over time, a micro trader chooses order type and price, and a smart router distributes orders across exchanges. It describes market impact, thin liquidity,…
This document explains cross-exchange arbitrage that seeks to profit when the same cryptocurrency has different prices on two exchanges. The basic method compares one venue’s ask with another’s bid, buys on the cheaper venue, and sells on the dearer one. It…
This article outlines a market-neutral funding-rate strategy: hold spot while shorting a perpetual futures contract, aiming to collect funding when the rate is positive. It explains how funding payments are intended to keep perpetual prices near spot and…
The document argues that trading offsetting contracts on two exchanges cannot reliably move assets from one venue to another. Its reasoning is that the proposed transfer depends on one account’s losses creating a corresponding benefit for the other. That…
The article distinguishes futures–spot arbitrage from calendar and cross-market spread trades. In a futures–spot position, a trader buys the commodity in the spot market and sells futures when the futures premium is considered unusually wide, expecting…
The document describes a spot arbitrage method that compares order books across exchanges to identify temporary price gaps. It proposes collecting market data concurrently, combining asks and bids, and adjusting prices for exchange fees before ranking…
This article develops a systematic approach to finding multi-asset relative-value baskets rather than manually selecting pairs. It arranges log prices in a matrix, uses singular value decomposition to separate common factors from residual directions, and…
This document describes a monitoring system for price differences between decentralized and centralized exchanges. It groups configured venues by exchange type, normalizes symbol names that vary across platforms, loads market precision, and requests order…