Hi all,
I'm trying to get a certain stock's fundamental data through pipeline. Following is part of my code. However, the symbol_filter does not work. I have tried several options such as
symbol_filter = (Fundamentals.primary_symbol.latest == stock_symbol)
. They all output empty data frame. Anyone know how to filter a specific symbol? Thanks a lot.
if len(stock_symbol) != 0:
symbol_filter = (str(Fundamentals.primary_symbol.latest) is stock_symbol)
else:
symbol_filter = True
screen = (
(universe_filter >= 1.0) &
(sma_200 > 5) &
piotroski.isfinite() &
symbol_filter
)
return Pipeline(
{'piotroski': piotroski},
screen=screen,
)