I am attempting to access the previous hour's asset price, but I consistently encounter a runtime error: "Runtime Error: Index was outside the bounds of the array." Any example demonstrating a solution to this issue would be greatly appreciated.

 

# Get the previous hour's price         

previous_hour = self.Time - timedelta(hours=1)         

history = self.History([self.spy], previous_hour, 1, Resolution.Hour)