Back to Community
pipeline troubles

When I run this pipeline it won't give me a log of stocks that meet all the pipelines requirements. I'm hoping someone can help me with my next step and also understanding the next step/what i may have done wrong. I ran this pipeline in my notebook and it came back with 23 stocks for 4/21/17

from quantopian.algorithm import attach_pipeline, pipeline_output
from quantopian.pipeline import Pipeline
from import USEquityPricing
from quantopian.pipeline.factors import AverageDollarVolume
from quantopian.pipeline.filters.morningstar import Q1500US
import talib
from quantopian.pipeline.factors import RSI
from quantopian.pipeline.factors import SimpleMovingAverage

def initialize(context):

def make_pipeline():
mean_close_200 = SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=200)
latest_close = USEquityPricing.close.latest
close_price_filter = latest_close < 20
dollar_volume = AverageDollarVolume(window_length=30)
mean_close_200_filter = mean_close_200 > latest_close
high_dollar_volume = (dollar_volume > 5000000)
rsi= RSI()
rsi_filter = rsi < 30

    return Pipeline(  
                '200_day_mean_close': mean_close_200,  
                'latest_close_price': latest_close,  
                'close_price_filter': close_price_filter,  
                'high_dollar_volume': high_dollar_volume,  
                'mean_close_200_filter': mean_close_200_filter,  
                'rsi': rsi,  
                'rsi_filter': rsi_filter  
              screen= high_dollar_volume & close_price_filter & mean_close_200_filter & rsi_filter  
1 response

Hmm, not sure why you weren't getting any stocks. BTW, it is REALLY helpful if you attach a backtest instead of pasting code.

Anyway, I inserted your code into a basic algorithm. I also added two lines to log the number of stocks returned by the pipe and the list of securities returned. Check the logs. You will see that the pipe returns securities every day from 1/4-4/21/2017.

Not sure what you were doing wrong.

Clone Algorithm
Backtest from to with initial capital
Total Returns
Max Drawdown
Benchmark Returns
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58feb097634090617e2fa9d4
There was a runtime error.