Custom Stock Filter for a Single Limit-Up Event and Price Retest
Summary
This trading-rule example explains how to identify stocks that have had exactly one limit-up day during a recent lookback window and then return close to that event day's opening price. The suggested workflow begins with a precomputed limit-up status feature, groups observations by stock, and sums the status over a rolling period to find names with one qualifying event. It then retrieves the opening price associated with the latest limit-up event and checks whether the current close is below 1.01 times that reference price.
A stock passing both conditions is placed in a candidate pool, with a purchase planned for the following day. The document outlines the filtering logic rather than providing a complete implementation. It does not specify the lookback length, explain the platform's status-code definitions in detail, or report backtest results. The rule therefore needs careful validation for data timing, limit-up mechanics, trading costs, and whether the next-day order can be executed as intended.
Key ideas
- Count limit-up events for each stock over a rolling lookback period.
- Keep stocks with exactly one qualifying limit-up event in that period.
- Compare the current close with the opening price on the most recent limit-up day.
- The example considers a price retest when the close is less than 1.01 times that opening price.
- The proposed entry is on the next day, but the document provides no backtest evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.