Is it possible to get stddev of a mavg? In the code below, I get the following error: Runtime exception: AttributeError: 'float' object has no attribute 'stddev'
Also, is there a way to bring up a console in order to print the contents of variables or dataframes?
Thanks! Looking forward to contributing but still learning. Saw a few meetups in SF so I plan on going to those too.
def initialize(context):
context.spy = sid(8554)
def handle_data(context, data):
price = data[context.spy].price
ma = data[context.spy].mavg(50)
if ma != None:
ma = data[context.spy].mavg(50)
std = ma.stddev(20)
if std != None:
std = ma.stddev(20)/ma