Hello Jeff,
Give this a go:
def initialize(context):
context.stocks = [sid(19662), # XLY Consumer Discrectionary SPDR Fund
sid(19656), # XLF Financial SPDR Fund
sid(19658), # XLK Technology SPDR Fund
sid(19655), # XLE Energy SPDR Fund
sid(19661), # XLV Health Care SPRD Fund
sid(19657), # XLI Industrial SPDR Fund
sid(19659), # XLP Consumer Staples SPDR Fund
sid(19654), # XLB Materials SPDR Fund
sid(19660)] # XLU Utilities SPRD Fund
def handle_data(context, data):
prices = history(390,'1m','low')
lows = prices.min()
lows_idx = prices.idxmin()
print lows
print lows_idx
Grant