This futures strategy tracks the ratio of copper to aluminum contract values, adjusting each contract’s daily close by its volume multiplier. It calculates the historical mean and standard deviation of that ratio, then uses the current ratio’s z-score 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
9,797 documents
This tutorial explains how to aggregate one-minute bars into longer intraday bars, using a Chinese stock session as its example. It shows the standard time-series resampling approach: assign open from the first observation, high and low from the extrema, and…
The essay contrasts left-side trading, which anticipates turns such as bottoms or tops, with right-side trading, which waits for evidence that a move is underway before acting. It uses a mahjong analogy: entering early is like playing with only one’s own…
This report surveys hedging choices for U.S. equity portfolios during drawdowns and recessions, drawing on a historical sample from 1985 through 2018. It contrasts rolling index puts and short credit risk with Treasury and gold exposures, then examines…
This review compares passive and active approaches to protecting U.S. equity portfolios during severe drawdowns and recessions. Its sample covers 1985–2018, including eight equity declines greater than 15% and three U.S. recessions. It discusses rolling S&P…
This forum exchange discusses a VeighNa spread-trading strategy that cannot calculate a historical spread moving average because no data service is configured. A respondent advises checking the data-feed fields in the application’s global configuration. The…
A forum user asks how to obtain a futures contract’s best bid, best ask, upper price limit, and lower price limit. The response points to the corresponding fields on the tick data object: first-level bid and ask prices, plus limit-up and limit-down values.…
A trader asks why an order receives a successful cancellation response outside trading hours. The replies explain that an order submitted during a non-trading period may be canceled by the interface, with a response generated locally rather than by the…
This ProRealTime indicator monitors the opening price range across Euronext, London, US, and Tokyo sessions, with an optional custom time window. On a one-minute chart, it tracks the range’s high and low during a configurable observation period, set to 15…
This indicator displays a trading session as a candle, using filled chart buffers to show the session’s body and shadows. Inputs define the session’s start and end times and allow a horizontal shift in bars, so the displayed candle can be positioned on the…
This strategy ranks commodity futures by an empirical measure of return asymmetry. At each monthly rebalance, it counts daily returns over the previous 260 trading days that exceed the mean by more than two standard deviations, then subtracts the count below…
This community post describes a problem with sell orders that do not fill during a tick-level backtest. The author reports trying several order-price choices, including the latest tick price, a stop order, a zero price, and a price four units below the…
This technical reference explains how simulation modules are configured and run within a backtesting exchange. It distinguishes declarative configuration, which accepts built-in modules and language bridges, from linked native configuration, which can hold…
This forum exchange concerns missing hourly bars created by aggregating minute data for a futures contract. A user reports that the stored hourly series is incomplete on a particular date, despite the underlying minute records appearing intact, and later…
The system takes a long position in the DAX when Monday’s regular-session close is below its daily 34-period simple moving average. It enters at 17:45 on Monday and plans to exit at 09:00 on Wednesday. The code checks the weekday and time on an intraday…
This live-trading log describes a one-minute ETH/USDT futures robot on OKX. It uses Bollinger band readings to report a neutral signal and manages long positions through staged dollar-cost-averaging orders. The log shows four successive long entry levels,…
This forum exchange concerns running an options strategy in a SimNow simulated environment. A user reports receiving ticks for the IO options contract but not for the underlying, and says a data subscription call returns false. Participants suggest using IF…
The article compares Bitcoin market conditions in late 2023 with the rally in late 2020, using spot returns, options implied volatility, futures basis, and realized volatility. It reports that implied volatility was near its 2023 high amid call buying, while…
The note explains how tick quote fields may appear when a futures contract reaches its upper price limit. In the example, the best bid price is set to the limit price and its volume reflects the quantity actually queued to buy. The best ask price and ask…
This article explains how a rolling average smooths a time series and why longer lookback windows produce smoother but slower signals. It compares simple, exponential, linearly weighted, triangular, and volatility-adjusted moving averages, focusing on how…
The document presents exchange limit order data as a way to monitor large crypto traders. It distinguishes resting limit orders from market orders, then describes tracking unusually large orders by price, size, direction, and duration. Its central premise is…
This notebook demonstrates a basic command-line workflow for operating a trading engine through a CTP gateway. It loads connection settings, initializes the engine, and connects to the server. The example then queries available contracts, account balances,…
This article explains why a strategy with a positive arithmetic average return can still lose money when returns compound. It illustrates the point with alternating gains and losses, showing that the geometric return better reflects long-run account growth.…
This reference explains how a dated, exchange-traded futures contract is represented. It describes identifiers, underlying, activation and expiration times, currency, price precision and increments, multiplier, lot size, margin settings, quantity and price…