The thread discusses changing a Turtle-style CTA backtest from a fixed number of contracts per trade to dynamically sized positions. A user reports editing a strategy variable intended to replace the fixed unit, but the refreshed backtest still uses the…
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 excerpt introduces a rule-based strategy built around the Ichimoku indicator and begins a buy condition: price must be above the Kumo cloud. The author describes the approach as suitable for automation and reports personal observations of favorable…
A VeighNa community exchange discusses why a user testing the Pegasus system can subscribe to contract quotes from CFFEX but receives no updates for contracts from other exchanges. The response explains that Pegasus is a China Financial Futures Exchange…
This note addresses a position-accounting problem reported for Shanghai-listed futures: after opening new contracts and closing older ones, the remaining same-day position’s average price can become zero. It presents a recalculation approach that starts with…
This documentation overview maps backtesting data sources to asset classes, bar intervals, and setup requirements in LumiBot. It suggests Yahoo for uncomplicated daily stock and ETF tests, ThetaData for intraday stock or options history, Polygon for several…
This example demonstrates how to model an option purchase across expiration in a backtest. A strategy subscribes to option quotes and futures bars, then submits a market buy order for one option when it receives the first eligible quote. The sample replays…
The document introduces Lévy processes as a way to model asset-price behavior with jumps and distributions that can have heavier tails than a normal model. It describes a price process combining drift, Brownian motion, and a Lévy component, then outlines…
This module describes calendar rules for rolling several futures series: crude oil, NBP natural gas, refined products including RBOB, grains, and ethanol. The rules use contract-specific termination conventions, such as dates near the 25th or 15th of a…
This short VeighNa community thread concerns users who cannot connect to the SimNow simulated futures-trading environment. One reply suggests checking the relevant port with a telnet connection, and another explains that the port is open only during trading…
This Wtpy CTA strategy calculates upper and lower intraday trigger levels from recent highs, closes, and lows, scaled by configurable parameters around the current bar's open. When flat, it enters long on an upper-level break and, for non-stock instruments,…
This article explains cross-sectional momentum in commodity futures: periodically rank markets by recent performance, buy the strongest and sell the weakest. It distinguishes this relative ranking approach from time-series momentum, which evaluates each…
This guide shows how to retrieve historical market data from Databento, save it locally in compressed DBN files, convert it into Nautilus data objects, and store those objects in a Parquet catalog. Its examples cover an E-mini S&P futures order book depth…
This indicator description adapts the calculation period of the Laguerre RSI using Average True Range (ATR). Instead of relying on a fixed period, it changes its responsiveness with volatility: the indicator becomes more responsive during high-volatility…
This forum exchange investigates why a VeighNa trading script fails to find contracts even though the graphical Studio client receives market data. Participants explain that a strategy module may start before contract queries finish, and that simply adding a…
The article distinguishes planned stop losses from sudden losses that occur when a stop cannot be executed at its intended level. It describes fixed stops based on a price or loss limit, trailing stops that follow conditions such as moving averages or…
This expert advisor uses the Parabolic SAR indicator to choose a direction: it buys when the Ask price is above the indicator and sells when it is below. The description identifies configurable chart timeframe, stop loss, take profit, order volume, risk…
This guide describes order-size expressions in OctoBot, grouping them into fixed, portfolio-scaled, and variable amounts. Fixed amounts specify a quantity in the base asset or a value in the quote asset. Scaled amounts can reference holdings associated with…
This Lumibot guide explains three futures asset choices: continuous contracts, specific-expiry contracts, and automatically selected expiries. It presents continuous futures as a convenient choice for multi-year backtests because they avoid manual expiration…
This tutorial explains how to collect market data for many trading pairs through aggregated exchange endpoints and organize it for a multi-symbol strategy. Using Binance futures and Huobi spot as examples, it shows how to normalize different response formats…
This tutorial explains how to bring market data from external providers or existing CSV files into QTPyLib for strategy backtesting. It outlines supported download routes for daily and intraday bars from Yahoo Finance, Google, and Interactive Brokers, with…
This code describes a Dual Thrust style breakout strategy applied across a list of instruments. It calculates a reference range from prior bars using the highest high and close and the lowest low and close, then scales that range by separate parameters to…
A VeighNa community discussion investigates a CTA backtest in which the recorded position appears to exceed the strategy's actual holdings. The trader reports opening seven contracts, then seeing several stop orders close quantities that add up to more than…
This brief VeighNa forum exchange addresses how to work with five-minute and thirty-minute bars in one strategy. The suggested approach is to use two BarGenerator instances and two ArrayManager instances, allowing each interval to be aggregated and tracked…
This essay uses an unfinished introduction to a supposed futures reversal method to illustrate the appeal and danger of searching for secret signals. It does not describe a specific entry rule or demonstrate that any reversal strategy works. Instead, it…