Hi, there is discrepancy in a couple of lines of code between the video in Section 6, Unit 1 and the code found in subsequent exercises like in Section 7, Unit 8. In the video these lines include the "shift(1)" method
Df['P_H'] = Df['Open']+Df['Max_U'].shift(1)
Df['P_L'] = Df['Open']-Df['Max_D'].shift(1)
however, in the subsequent coding exercises and downloadable resources, the code is WITHOUT the "shift(1).
Df['P_H'] = Df['Open']+Df['Max_U']
Df['P_L'] = Df['Open']-Df['Max_D']
This is very important because it has to do with the prediction factor that should be added or subtracted to the opening price in order to predict the day's High and Low. I assume that it must be with the shift(1) method since before the Opening price is known today, I already need to know that factor (Max_U and MaxD) in order to calculate what the High and Low of the day is predicted to be.
Can someone please confirm how this should be?
Thanks
Hi Arturo, Thanks for pointing this out. You are right about usage of the "shift(1)" method. These units will be updated.
Hello Arturo, the coding exercises have been updated using the shift(1) method