The following code just sits there for about 5 minutes and then aborts. It will work without the morningstar data.
from quantopian.pipeline import Pipeline
from quantopian.pipeline import CustomFactor
from quantopian.research import run_pipeline
from quantopian.pipeline.data import morningstar
from quantopian.pipeline.data.builtin import USEquityPricing
from scipy import stats
import math
class Momentum(CustomFactor):
# Pre-declare inputs and window_length
window_length = 3200
inputs = [USEquityPricing.close, morningstar.valuation_ratios.earning_yield]
def compute(self, today, assets, out, close, earning_yield):
print (close[5,100])
print (earning_yield[100,5] )
momentum = Momentum()
pipe = Pipeline()
pipe.add(momentum, 'momentum')
run_pipeline(pipe, start_date='2015-11-01', end_date='2015-11-02')