Hello,
I apologize if this is a simple question but I looked through the help docs and searched the forums and couldn't really find anything analogous, so if anyone could point me in a direction for more information or answer here that would be helpful.
Is there a way to set the universe of stocks in initialize with fundamental data? I tried using the get_fundamentals with a SQLAlchemy query but it gave me an error that that function can only be used in before_trading_starts. I am pretty new to this coding environment so I am trying to set my universe in initialize rather than before_trading_starts because that is called every bar and will change what stocks are in my universe (after updating to incorporate the stocks returned from the get_fundamentals call) while I really just want to monitor a certain collection of stocks with properties filtered from a SQL like query. Basically, I believe certain qualities will fit my algorithm but I want to monitor only a certain number of stocks without that changing, but I don't know them before (aka can't hardcode them in in initialize).
Thanks for any help/direction