Returns computation

Course Name: Natural Language Processing in Trading, Section No: 5, Unit No: 1, Unit type: Notebook

shouldn’t we add shift(-1) to returns as we decide to take trade today in open using signal at that time and close it next day open. so for the trade taken today teh returns have to be comapred with open price of next day. shouldnt the code be written as : prices[‘strategy_return’] = prices[‘signal’].shift(1) * prices[‘return’].shift(-1)