# Import necessary libraries
from quantopian.pipeline.data.alpha_vertex import precog_top_500 as precog
from quantopian.pipeline import Pipeline
from quantopian.research import run_pipeline
from quantopian.pipeline.filters.morningstar import Q1500US
dir(precog)
def make_pipeline():
# Define the universe
universe = (Q1500US() & precog.predicted_five_day_log_return.latest.notnull())
# Define the pipeline
pipe = Pipeline(columns = {
'prediction':precog.predicted_five_day_log_return.latest,
},
screen = universe)
return pipe
# Run pipeline
output = run_pipeline(make_pipeline(), start_date = '2012-06-09', end_date = '2017-06-09')
output