Hello all, I have a question.

Hi, suppose I have AAPL, MSFT, GE stock in my Universe.

At any point in time, I may have AAPL, MSFT, GE invested. My algorithm will constantly look for opportunities to invest in AAPL, MSFT, GE, regardless of whether or not I have already invested prior.

i) Suppose I wanted to only invest AAPL, MSFT, GE if and only if a week has passed since I last invested them, what would be a good way to track the number of days that have passed? Likewise, suppose I wanted to liquidate each security after 5 days?

Thank you!