Hello Jhon thank you for the answer,
I was looking to compute the average of the signal extracted over a period of one hour. For this purpose, the following lines of code did the job:
end_date = pd.Timestamp.now(tz='Europe/Rome').replace(microsecond=0, second=0, minute=0) #function .replace rounds at the last hour
start_date = end_date - pd.Timedelta('1h')
calculation = "$signal.aggregate(average(), Hours('Europe/Rome'), middleKey())" #compute hourly average
my_data = spy.pull(items = my_signals,
start = str(start_date),
end = str(end_date),
calculation = calculation,
grid = None
)
After adjusting, I obtained the following Dataframe where the column represents the average value of the signal between 8.00am and 9.00am in this case.