From a pipeline custom factor, is it possible to output a subset of the input securities? Or is it always required that
out[:] contain the same set of securities used for the input?
As a work-around, just to get the attached code to run, I'm using:
x_tilde = np.nan_to_num(np.mean(close,axis=0)/close[-1,:])
But I would prefer to drop any stocks that have missing data over the trailing window. However, when I do this, an error results, since it appears that out[:] is expecting all of the securities used as input to the custom factor.
Is it correct that custom factors must always return a value for all input stocks? If so, for window_length > 1, how is one to deal with missing data (e.g. the stock IPO'd within the window)?