Skip to content
All library documents

Why Some Stock-Screening Queries Fail in Backtests

Article SuperMind

Summary

The discussion explains why a natural-language stock query accepted by a web screening service may fail when used to initialize a stock universe in a backtest. The example is a daily TD buy-setup query: it works on the website, but the backtest reports that the query is unsupported. A respondent suggests using the research environment’s query function for behavior closer to the online service.

The replies also point to differences between the web, research, and backtest environments. Backtests may restrict certain queries to prevent future-data leakage, while another commenter emphasizes that the web query product and the backtest interface are not equivalent features. The practical lesson is to verify query support in the intended environment and avoid assuming that a web screen can be reproduced directly in historical testing. The post does not list supported query syntax or describe a general conversion method, so it offers context for troubleshooting rather than a complete technical guide.

Key ideas

  • A stock query accepted by a web screening service may be unsupported when a backtest initializes its universe.
  • The example query identifies a daily TD buy setup and triggers an unsupported-query error in backtesting.
  • The research environment’s query function is suggested as a closer match to online screening behavior.
  • Backtest restrictions may be intended to prevent future-data leakage, and platform interfaces may differ in capability.
  • The discussion gives no full syntax reference or general method for converting unsupported queries.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.