I am trying to convert data from half hourly to hourly. The trading periods occur every half hour hence there are 48 but I am trying to convert it to just hourly. I want 24 trading periods where the new trading period 1 would be the sum of 1 and 2, the new 2 would be the sum of 3 and 4 etc. The format is as follows:
Date tradingperiod_halfhourly TP
1/4/2023 1 2413
1/4/2023 2 3715
1/4/2023 3 1682
1/4/2023 4 3272
etc....
I aim aiming for
Date tradingperiod_hourly TP
1/4/2023 1 6128
1/4/2023 2 4954
etc....
Date tradingperiod_halfhourly TP
1/4/2023 1 2413
1/4/2023 2 3715
1/4/2023 3 1682
1/4/2023 4 3272
etc....
I aim aiming for
Date tradingperiod_hourly TP
1/4/2023 1 6128
1/4/2023 2 4954
etc....
Comment