#Remove De-Listed and Leveraged ETFs
for stock in context.stocks:
if stock.security_end_date < get_datetime():
context.stocks.remove(stock)
if stock in security_lists.leveraged_etf_list:
context.stocks.remove(stock)
if stock.please_dear_god_how_do_i_get_the_price_here == None:
context.stocks.remove(stock)```
I need to get this because I get errors that, as far as I can tell, have something to do with missing or moved data, starting with the price.