You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, code computes '1 day' as longer than a day, and also assumes an open price equal to the last close price (which is technically fine, but I think it makes more sense to have open price be the start of the next day).
For example, the code starts out as follows:
Day 1 open: 2021-05-05 08:35:47+0000
Day 1 close: 2021-05-06 09:00:52+0000
Day 2 open: 2021-05-06 09:00:52+0000
Day 2 close: 2021-05-07 09:12:53+0000
...
Day 623 open: 2023-01-25 12:08:35+0000
However, please note that changing this will result in nSecs=24*3600 only working for discrete intervals of exactly 1 day (24*3600) due to .replace(hour=0, minute=0, second=0).
The text was updated successfully, but these errors were encountered:
Currently, code computes '1 day' as longer than a day, and also assumes an open price equal to the last close price (which is technically fine, but I think it makes more sense to have open price be the start of the next day).
For example, the code starts out as follows:
Day 1 open: 2021-05-05 08:35:47+0000
Day 1 close: 2021-05-06 09:00:52+0000
Day 2 open: 2021-05-06 09:00:52+0000
Day 2 close: 2021-05-07 09:12:53+0000
...
Day 623 open: 2023-01-25 12:08:35+0000
Recommended changes:
research/_research-bites/20230112/ResearchBites-20230112-Autoroll.ipynb
Line 121 in 4e463cd
startDay = t.replace(hour=0, minute=0, second=0)
research/_research-bites/20230112/ResearchBites-20230112-Autoroll.ipynb
Line 515 in 4e463cd
if i+1 == len(timestamp30) or (timestamp30[i+1]-startDay).total_seconds()>=nSecs:
research/_research-bites/20230112/ResearchBites-20230112-Autoroll.ipynb
Lines 530 to 537 in 4e463cd
However, please note that changing this will result in
nSecs=24*3600
only working for discrete intervals of exactly 1 day (24*3600) due to.replace(hour=0, minute=0, second=0)
.The text was updated successfully, but these errors were encountered: