Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How do I get sector for a stock right before trading?

Hello all,

How do i get the sector for an individual stock prior to trading it?



1 response

Looks like I need to use Bound Columns. Once I've bound the morningstar_sector_code into the pipeline as the "sector" column, its part of the context. I can then access it in the rebalance function as:

context.output.get_value(symbol('AAPL'), 'sector')