Backtesting feeds a strategy’s rules with historical market data, turns the resulting signals into trades, and aggregates their profit and loss. The document presents four uses: screening candidate strategies, modeling market and execution conditions, tuning…
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 Chinese-language forum post asks how to import tick data into vn.py for backtesting when the graphical import interface appears to support only minute-level or coarser data. The author considers loading records into the database with custom code and…
This Expert Advisor description explains how to configure separate long and short trading systems around changes in the color of the XDidi Index Cloud indicator. Each side has its own magic number, position sizing settings, and entry and exit switches,…
This Chinese equity screening proposal combines moving-average clustering with recent and historical limit-up activity. Its initial description looks for overlap among the 5-, 10-, 20-, 60-, and 120-day averages, more than two limit-up days in the last ten…
This post presents a Pine strategy example built around three exponential moving averages. It defines a bullish condition when the shortest average is above the middle average and the middle is above the longest, and a bearish condition when that ordering is…
This document explains a chart utility that derives standard timeframe charts from one-minute data and can optionally recreate the one-minute volume series before conversion. A configurable parameter controls the treatment: negative values below a threshold…
This Chinese-language note describes a stock prediction exercise using four cross-sectional inputs: total market capitalization, turnover, trailing price-to-earnings, and quarterly net-profit year-over-year growth. It compares linear regression, XGBoost, and…
This configuration defines a Qlib workflow that trains an ordinary least squares linear model on Alpha158 features for CSI 500 stocks. The data spans 2008 through mid-2020, with training through 2014, validation in 2015–2016, and testing from 2017 onward.…
This discussion addresses how to use a daily stock popularity ranking obtained through a query interface in a backtest when the research environment returns a dataframe but the backtest environment does not behave the same way. One suggested workflow is to…
This example builds a BTCUSDT futures market-making strategy whose fair price is estimated from a spot reference price plus a smoothed spot–futures basis. It resamples spot and futures book-ticker mid-prices, carries observations forward, and calculates a…
The document describes a backtesting feature for BitMEX’s XBTUSD perpetual contract that simulates periodic funding payments using historical funding-rate data. It says the feature is available across JavaScript, C++, and Python, and that event logging can…
This stock-selection proposal combines a price-range filter, a historical dividend-yield condition, and a turnover-related condition. The stated screen looks for stocks with amplitude above 1%, a 2019 dividend ratio above 25%, and a turnover measure between…
The proposed Chinese equity screen combines three conditions: a recent increase in reported holdings or inflow, a weekly five-period moving average crossing above the ten-period average, and at least two limit-up sessions during the past 500 days. The post…
The document describes a stock screen that selects shares with a prior-day price range above 1%, more than a year since listing, and prior-day turnover above 8%. It explains the intended rationale: range and turnover are treated as signs of activity, while…
The document outlines an expert advisor for EURUSD that trades around the European and American sessions. It identifies session start and end times as configurable inputs and describes a minimum European-session range, stop loss, take profit, and a lot-size…
This stock screen looks for names with turnover in a specified range, three consecutive declining sessions, a following close above the prior three day highs, and two consecutive positive sessions. It combines a liquidity filter with a pullback pattern and a…
The article introduces a custom coded stock selection strategy built from five rules, mainly intended to identify stocks that have fallen sharply and begun to stabilize, with some rules meant to capture potential strong advances. It contrasts AI generated…
This description outlines an Expert Advisor based on the MALR indicator. It opens short positions when price crosses the indicator’s upper line downward and opens long positions when price crosses its lower line upward. Optional controls include adding a…
The document describes a MetaTrader 5 testing issue in real-tick mode: limit and take-profit orders may receive unrealistically favorable positive slippage, inflating simulated results. It presents a utility that reports slippage in account currency and…
This research review examines momentum in Chinese equities and compares several ways to measure it. It reports that simple one-year returns, with a recent period excluded, did not predict returns reliably across the full A-share market in the tested sample.…
This product guide describes a strategy-design workflow for OctoBot. It separates strategy review from creation: the viewer presents performance metrics and trade details for analyzing and comparing runs, while the creator walks users through market…
This stock-screening proposal combines a metaverse industry filter with a rounded-price-shape setup and a rise in trading volume. Its reference conditions include turnover within a specified band, price and moving-average relationships over recent periods, a…
This Backtrader example demonstrates a simple breakout-style strategy and a way to process daily bars in two stages. The strategy compares the current high with a rolling highest-high indicator, submits an entry when they match, and exits after a configured…
This event description focuses on why quantitative strategy results in backtests can differ from live trading performance, a concern it identifies specifically for Chinese A-share strategies. It presents the topic as a practical challenge for traders and…