A trading signal I have requires the past 60 day rolling % change for a stock. For example, I have:
def initialize(context):
context.spy = sid(8554)
def handle_data(context, data):
spy = context.spy
spy60dayreturn = ???
How do you calculate this?