Preventing Rebuys Within a Recent Trading Window
Summary
The document answers a strategy implementation question: how to prevent a stock from being bought again for a specified period after a prior trade. Its proposed approach is to record the relevant date when a position is sold, then compare that stored date with the current date before allowing a new purchase. A stock whose recorded date falls inside the restricted window is excluded from that day's buy candidates.
The referenced example is described as also enforcing a minimum holding period before a position can be sold. The document does not include the implementation itself, test results, or discussion of whether the waiting period uses calendar days or trading sessions. Those details must be settled in the strategy code. The core idea is a per-stock time filter that maintains state across trading days and applies it at the entry decision.
Key ideas
- Store a date associated with a completed position so the strategy can enforce a cooldown before re-entry.
- Compare the stored date with the current date when evaluating new buy orders.
- The referenced example also includes a minimum holding period before selling.
- The document does not specify whether the cooldown counts calendar days or trading sessions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.