Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Trying to watch stocks for multiple days, but they get deleted at the end of the day

Is there a way to track a list of stocks overtime and keep adding stocks to that list.
I created a pipeline to screen for stocks up 15% or more with a certain volume and price threshold screen. I did some calculations and added the ones that I want to keep on my watch list for lets say 10 days to a context.watchlist variable. The problem is that every day the context.watchlist variable is deleted and I can't keep track of the stocks

1 response

Maybe attach a backtest to help debug? In the meantime verify your 'context.watchlist' variable is defined in the 'initialize' method. That will ensure the scope is available to the entire algo (and doesn't get re-instantiated each time).