Combining an Intelligent Stock Screen with a Dual Moving Average Strategy
Summary
This post combines a stock universe selected through an intelligent query with a dual moving average rule. The proposed rule buys when the five-day average is above the twenty-day average and sells when it falls below, while the universe is screened for low price-to-book value and a high ranking on large-order net flow. The example aims to show how a screened set of equities might feed into a moving average strategy.
The author asks about an error caused by accessing a missing values attribute in the price-history result. The excerpt does not provide a corrected implementation or test results, and the sample also leaves important operational details unclear, including how the selection returns multiple securities and how orders are sized across them. It is therefore useful as a basic strategy outline and debugging prompt, but not as a validated trading system. No evidence is given that either the screen or the moving average crossover improves returns.
Key ideas
- The proposed entry rule uses the five-day average crossing above the twenty-day average, with the reverse condition triggering an exit.
- The stock universe is selected using a price-to-book filter and a large-order net-flow ranking.
- The reported error concerns an assumed values attribute on the historical price data object.
- The excerpt does not show a fix, test the strategy, or establish that the screening and crossover rules are profitable.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.