This brief forum exchange answers whether VeighNa, also known as vn.py, requires Tushare as the sole source of historical A-share data for backtesting. The response says the framework supports multiple data services and points readers to its documentation…
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
175 documents
This brief forum exchange answers a question about where log messages go during a backtest when using the BacktestingEngine. The questioner observes that the engine stores messages in a logs collection and asks how to access them. The reply says the messages…
This forum post raises implementation questions about historical data warm-up in VeighNa portfolio strategies. The author considers a strategy whose longest signal period is 20 days and asks whether an ArrayManager size of 25 is sufficient, and whether that…
This forum question examines why changing the initialization length of a trading system’s ArrayManager can materially alter a backtest. The strategy uses RSI generated through TA-Lib, and the author suspects that the indicator’s path dependence makes its…
A forum exchange clarifies whether a strategy can retrieve tick data for futures product indices or weighted continuous contracts, using iron ore and an example continuous symbol. The reply explains that symbols ending in a continuous-contract convention are…
This release overview describes VeighNa 4.0 and its new vnpy.alpha module for developing machine-learning, multi-factor strategies. The module is organized around feature datasets, model training, strategy research, workflow management, and example…
This forum post reports a VeighNa CTA backtest that reaches the historical-data loading stage but loads zero records. The script then completes initialization and replay with no trades, before result calculation fails because the daily results table lacks a…
The discussion describes a rolling-window backtest in which parameters are optimized on a sequence of historical months and then applied to the next month. As the test advances, the training window shifts forward by one month, so each new period is evaluated…
A short forum exchange asks how to obtain roughly two decades of historical futures and options data at hourly, daily, weekly, and monthly frequencies for backtesting. One reply says that such data must be purchased, particularly minute-level data. The…
This overview explains vn.py as a modular framework for automated trading. The MainEngine coordinates gateways, applications, databases, and data services, while the EventEngine routes market, order, and other messages to subscribed components. A typical…
This event outline describes a quantitative study of option spread strategies, with a focus on gold options. Topics include straddles and strangles, bull and bear spreads, butterfly spreads, and put-call parity. It proposes examining the structure of these…
The post asks why Alpha158 labels use different forward-return horizons in two implementations. It compares a label spanning the close at T+1 to the close at T+3 with a Qlib label spanning T+1 to T+2, then relates those choices to China’s T+1 stock-trading…
This forum exchange concerns changing a Turtle-style CTA strategy from a fixed number of contracts to dynamically calculated trade size based on risk. A user reports editing the strategy code through a backtest interface but seeing results continue to use…
The discussion addresses adding five- and fifteen-minute intervals to VN.py version 3.4.0 for backtesting. One reply suggests that when the source data is already stored at those resolutions, importing and selecting it as one-minute data can work because…
This brief VeighNa forum exchange asks how to adjust bar construction for the morning futures market break from 10:15 to 10:30. A respondent explains that the BarGenerator currently divides data according to timestamps and asks which kind of bar the user…
The post raises a futures backtesting issue: unusually large drawdowns may coincide with price gaps when the lead contract changes. The author wants to identify roll dates and avoid trading on those dates, but the post does not provide a method for detecting…
This guide describes a workflow for moving historical daily futures bars from Ricequant into a local VeighNa database backed by MongoDB. It first uses Ricequant’s research environment to retrieve listed futures contracts and daily price fields over a chosen…
The forum exchange addresses whether a backtest for Shanghai Futures Exchange instruments needs to distinguish between closing a position opened the same day and closing one opened earlier. The question comes from a trader analyzing fill prices in a trade…
This article walks through a deliberately random directional strategy for dYdX. It selects long or short entries with equal probability, uses fixed profit and loss thresholds to exit, and increases the next order size after a loss while resetting size after…
This forum exchange clarifies how VeighNa’s CTA strategy state file is used during initialization. A strategy first derives variable values from historical data and indicators, then reads saved JSON data to overwrite corresponding strategy variables.…
This short forum exchange describes a backtesting issue in VeighNa: several built-in strategies reportedly generated many trades that closed at a price of zero when using data from the Wind Python API configured through VN Station. A respondent suggests that…
This Chinese research summary examines whether intraday data can support sector rotation signals, focusing on realized skewness and the share of volatility attributable to downside moves. It describes constructing industry level factors inspired by high…
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…
A forum user reports an integer overflow error while backtesting options with a trading platform’s OptionStrategy module. The problem reportedly occurred only for CSI 300 ETF options and on two specific dates. The user traced the error to loading the…