I am trying to filter out stocks with large price discrepancies (between the prvious close, and within 30 minutes after the opening bell the following day), but I have run into some issues. To begin, when I try to log the symbols, I get the following error: 'numpy.ndarray' object has no attribute 'symbol'
Furthermore, when the line associated with this error is commented out, I get an order size of '2', under all condition, which I am assuming is highly unprovable, and hence there must be an error of some sort. The code in question is listed below, and thanks in advance.
PriceData = data.history(context.securities, "price", 3, "1d")
percent_change = PriceData.iloc[[-1, -2]].pct_change()
Plausible = percent_change.index[percent_change < -15]
OrderSize = len(Plausible)
log.info("Today's buy(s): " + ", ".join([p.symbol for p in Plausible]))
log.info(OrderSize)