This seems like a pretty basic question but I'm new to this and cannot for the life of me figure out how many shares of a specific stock are currently in my portfolio.
My first algorithm (which traded just aapl) would only create a sell order if context.portfolio.positions_value > 0 evaluated to true. Now I'm working with a pool of twenty stocks and just because context.portfolio.positions_value > 0 is true doesn't mean I actually hold every stock that meets my criteria for selling. I'd like to only issue sell orders for stocks that are currently in my portfolio.
If one of you glorious geniuses could point me in the right direction I would be very grateful.