Tracking Stock Holding Days with a Per-Position Counter
Summary
The discussion asks whether Supermind provides a function for tracking how many days a stock has been held. A reply suggests maintaining a dictionary keyed by stock, initializing each position's count to zero when a buy occurs, and then using that stored value to calculate holding duration. This is a simple state-tracking approach for strategies that need to act based on time in a position.
The page does not explain how to increment the counter, reset it after a sale, or handle partial fills, multiple lots, or positions carried across sessions. It also does not establish whether the platform offers a built-in alternative. The suggestion is therefore a starting point for custom bookkeeping rather than a complete implementation or a tested trading method.
Key ideas
- A per-stock dictionary can store elapsed holding days for open positions.
- Initialize the position's counter when a buy occurs.
- The post does not specify counter updates, sale handling, or persistence across sessions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.