This brief forum exchange addresses a type error encountered during a CTA backtest. The reply points to the construction of five-minute bars and explains that the window argument was not passed as an integer value. The practical lesson is to check the type…
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
16,761 documents
This one-hour Freqtrade strategy enters long when a short simple moving average crosses above a longer one and ADX exceeds a configurable threshold. It enters short on the reverse moving-average crossover under the same ADX condition. The ADX lookback and…
This example describes a three-leg futures strategy that treats polyester fiber value minus the weighted costs of PTA and ethylene glycol as a production margin. It estimates the margin’s mean and standard deviation from recent daily bars, then calculates a…
This Expert Advisor trades breaks of the upper or lower boundary of the MA_Rounding_Channel indicator. A signal is evaluated when a bar closes, so the described trigger is a confirmed close beyond a channel edge rather than an intrabar touch. The text…
The document describes an indicator that compares closing prices with prices from a chosen lag over a rolling window, using Pearson correlation to identify recurring patterns. When correlation clears a user-set threshold, it applies linear regression to…
This submission describes a composite stock factor combining three ranked measures: three-year net profit growth, the inverse of summed turnover over five periods, and the inverse of five-period trading-amount variability. The intended profile is high growth…
The document reviews research on whether investor sentiment helps explain stock return anomalies or appears predictive because of spurious regression. Persistent predictors can seem to forecast returns in finite samples when expected returns also vary over…
This research summary examines high-frequency equity factors built from minute bars, tick data, and transaction-level records. The factors capture intraday skewness, downside volatility, reversals, late-session trading, price-volume relationships,…
This exchange model for a level-three order book simulates limit and market orders without partial fills. Resting limit orders enter a queue model when they do not cross the opposing best quote. A marketable order, or a limit order priced through the best…
This stock-selection screen filters for turnover between 3% and 12%, circulating market capitalization between 1 and 55 in the stated units, and at least one daily gain of 10% or more during the previous 25 trading days. The post gives both a formula-style…
This example demonstrates a basic workflow for preparing Bybit order book data and running it through a market-making backtest. It shows two conversion paths: a fused conversion for multi-level depth data and a conversion that selects a single depth level.…
This guide walks through a TqSdk workflow, from setting up an account and connecting to live quotes to reading synchronized bars, checking account and position references, and submitting or cancelling orders. Its central pattern is to create an API, request…
The article describes an intraday pairs strategy for SPY and IWM, using one-minute bars from April 2007 through February 2014. It aligns timestamps, estimates a rolling regression hedge ratio, forms a price spread, and converts that spread to a z-score. The…
The report treats corporate events as equity style factors and evaluates them within a multi-factor research framework. It describes differences in event prevalence across industries and relationships between event factors: private placements and dividends…
This Chinese-language article describes a customizable stock-selection strategy built around five rules, mainly seeking shares that appear oversold and stable, with some rules intended to identify possible rallies. It distinguishes rule-based coding from an…
This Expert Advisor uses changes in the direction of a weighted oscillator to generate trading signals. It buys when the oscillator turns upward and sells when it turns downward, with each signal evaluated after a bar closes. A higher-timeframe indicator is…
This indicator pairs ATR-based SuperTrend regime changes with a relative-volume confirmation filter. It estimates buying and selling volume from each bar’s close within its high-low range, then compares a fast EMA of each side’s volume with a slower EMA…
This strategy selects the ten lowest-priced eligible stocks within the SSE 50 universe, excluding special-treatment, suspended, and delisted stocks. It allows each holding to remain open for up to twenty days and sells a stock if its decline exceeds eight…
This community post describes a restart issue in a portfolio strategy. A position and target are saved when the system shuts down, then restored during startup; however, historical bars are replayed through the strategy’s bar handler during initialization.…
The article describes a long-only Chinese equity strategy that uses a ResNet101 image classifier to identify strong stocks during pullbacks in an established uptrend. Its rationale combines buying a retracement in a strong trend, favoring stocks that…
The document outlines an Expert Advisor that uses changes in the color of the Directed Movement indicator’s cloud as its trading signal. A signal is generated when a bar closes and the cloud color has changed, so the method relies on confirmed bar data…
This research summary links debt-cycle phases across government, financial, and household sectors to movements in bonds, equities, and commodities in China. It describes a transmission mechanism: rising leverage and easier credit may support bond prices,…
This swing trading Expert Advisor uses a Percentage_Crossover_Channel indicator to generate signals in one of two ways. In channel mode, a bar’s low crossing or touching the lower boundary triggers a buy, while its high crossing or touching the upper…
This document describes an Expert Advisor that trades signals from the TSICloud indicator. It opens a trade when a bar closes and the indicator cloud changes color. An input setting can invert the signal direction, allowing the system to trade against the…