Hi, I'm new to Quantopian and Python.
Firstly thank you in advance to anyone whom can help me with this rather simple problem.
I've just trying to figure out how to echo or print back the variables from calculations into the log or the debugger using the IDE. I can use the debugger to get information out of objects, but not the variables.
It's just a modification of - Pipeline Tutorial - Lesson 12 1.
The code is as follows:
Create our pipeline.
# Base universe set to the QTradableStocksUS.
base_universe = QTradableStocksUS()
# 10-day close price average.
mean_5 = SimpleMovingAverage(
# 30-day close price average.
mean_14 = ExponentialWeightedMovingAverage(
percent_difference = (mean_5 - mean_14) / mean_14
# Filter to select securities to short.
shorts = percent_difference.top(75)
# print shorts
# Filter to select securities to long.
longs = percent_difference.bottom(75)
# Filter for all securities that we want to trade.
securities_to_trade = (shorts | longs)
I am trying
among a dozen other variations.
It would be nice to see what the values are on each iteration of the function and which stock they go with.