Jul-07-2022, 03:31 PM
(This post was last modified: Jul-07-2022, 03:31 PM by Kaizen_Is_A_Bad_Coder.)
Hi All,
Trying to get my head around Pandas and backtesting.py at the moment so apologies for the simple question...
I have the following 1 minute data for the DAX
![[Image: njffjyW.png]](https://i.imgur.com/njffjyW.png)
What I am wanting to do is generate 2 new columns; Hourly Open and Daily Open.
Hourly Open - I would like to fill this column with the open price of the current hour.... so at 11:00 Open = 12888, I would like each subsequent column to be filled with that open price UNTIL the next hour commences at 12:00....
Daily Open - I would like to do the same but fill the column with the open price at 08:00 all day Until the next day at 08:00
If anyone could pls help regarding how I can achieve this I'd be so appreciative! I swear my jupyter notebook is just spitting out error messages to annoy me now :)
hmmmm - maybe I should have posted this is Data Sciences forum. Sorry!
Trying to get my head around Pandas and backtesting.py at the moment so apologies for the simple question...
I have the following 1 minute data for the DAX
![[Image: njffjyW.png]](https://i.imgur.com/njffjyW.png)
What I am wanting to do is generate 2 new columns; Hourly Open and Daily Open.
Hourly Open - I would like to fill this column with the open price of the current hour.... so at 11:00 Open = 12888, I would like each subsequent column to be filled with that open price UNTIL the next hour commences at 12:00....
Daily Open - I would like to do the same but fill the column with the open price at 08:00 all day Until the next day at 08:00
If anyone could pls help regarding how I can achieve this I'd be so appreciative! I swear my jupyter notebook is just spitting out error messages to annoy me now :)
hmmmm - maybe I should have posted this is Data Sciences forum. Sorry!