What exactly is the difference between these two? Intuitively, Returns should give the percentage change between two prices and DailyReturn should return some kind of return series of daily returns but it seems to me they do exactly the same, as the following pipeline suggests
def make_pipeline():
base_universe = QTradableStocksUS()
daily_returns1 = DailyReturns(window_length=21, mask=base_universe)
daily_returns2 = Returns(window_length=21, mask=base_universe)
return_filter1 = daily_returns1.top(3)
return_filter2 = daily_returns2.top(3)
return Pipeline(
columns = {
'DailyReturns':daily_returns1,
'Returns':daily_returns2,
}, screen=return_filter1 & return_filter2)
run_pipeline(make_pipeline(), '2016-06-05', '2016-06-05')
I am trying to generate some Pipeline output that is based on computations performed on the return time-series. Is there any way of doing that does not involve a CustomFactor?