@Jamie, would it be the same (not taking into account the winsorization part) than doing what I'm showing next?
from quantopian.pipeline.classifiers.morningstar import Sector
sectors = [101,102,103,104,205,206,207,308,309,310,311]
pipeline_columns = {}
for s in sectors:
pipeline_columns['factor_sector_'+str(s)] = my_factor(mask=QTradableStocksUS() & Sector().eq(s)).zscore()
For each column, I would get NaN except for the sector column the current stock belongs to.
And then, when getting the pipeline output you could sum the 1 axis. Something like:
alpha = pipeline_output('factor_pipeline').sum(axis=1).dropna()
Got the idea from another post from @Grant but not sure if the behaviour would be the same (https://www.quantopian.com/posts/limit-qtu-to-specfic-industry-sector-and-market-cap)
Thanks in advance