This document explains how to build a multi-contract strategy using synchronized bar data, per-leg targets, and order management. Its example computes the spread between two weighted contract prices, updates a rolling window, and uses Bollinger Bands to…
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
5 documents
The document describes a two-leg spread strategy built around Bollinger Bands. It calculates a weighted price difference between two contracts, samples the spread on a five-minute schedule, and compares it with a rolling mean and standard deviation. A move…
This strategy forms a spread from two instruments’ bar closes, weighted by configurable leg ratios. It updates the spread at five-minute intervals, keeps a rolling history, and calculates a moving average with upper and lower bands based on the spread’s…
This guide explains spread trading across related instruments, contrasting it with single-instrument trend strategies. It presents several approaches: latency-sensitive arbitrage between equivalent markets, threshold or Bollinger Band mean-reversion trades…
This spread strategy uses Bollinger Bands to enter and exit positions. After building spread bars and waiting for its array manager to initialize, it calculates the moving average and upper and lower bands over a configurable window. When flat, it opens a…