Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help

Hello,
I received the errors below. I am not exactly sure where my mistake might be.

**def intialize(context):
context.appl = sid(24)

def handle_data(context, data):
hist = data.history(context.appl,'price',50, '1d')
log.info(hist.head())
sma_50 = hist.mean()
sma_20 = hist[-20:].mean()**

Thanks,

Warning Local variable 'sma_50' is assigned to but never used
Warning Local variable 'sma_20' is assigned to but never used

1 response

What are you trying to do? The output isn't an error just a warning that you maybe missed something. In this case you assigned a value to sma_50 and sma_20 but you never used those variables.