What's the best way to get the fundamental data for my context.portfolio.positions?
I may wish to use this as a sell signal.
In before_trading_start, I do this:
context.pe_ratios = get_fundamentals(query(fundamentals.valuation_ratios.pe_ratio))
But it's throwing up KeyErrors.