Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Fundamental factors in pipeline in Research

I'm trying to backtest in Research using Pipeline. I have no problems with purely technical factors,
but I cannot really use anything from quantopian.pipeline.data.morningstar.

For example, with

class market_cap(CustomFactor):  
   inputs = [USEquityPricing.close, mstar.valuation.shares_outstanding]  
   window_length = 1  
   def compute(self, today, assets, out, close, shares):  
     out[:] = close[-1] * shares[-1]  

I can then use this as a filter in my pipeline as with

   mcap_filter = market_cap >= 1e9  

But if I try

    mcap = market_cap()  
    pipe.add(mcap, 'mcap')  

Then the kernel dies silently (I get no error message) after some time. What am I doing wrong here? Thanks