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
when doing a backfill we get the data from alpaca/polygon at the beginning of the execution
then we change the tz info to match the NY tz
due to day light savings, we get an offset by M minutes (changes with the day and year)
how does it influence us?
e.g we need minute data from X to Y, but we get Y - M
M is the offset
so, backtrader doesn't "think" it has all the data it requires to start
we change replace() to localize() which takes care of the issue.
we could see the difference here:
when doing a backfill we get the data from alpaca/polygon at the beginning of the execution
then we change the tz info to match the NY tz
due to day light savings, we get an offset by M minutes (changes with the day and year)
how does it influence us?
e.g we need minute data from X to Y, but we get Y - M
M is the offset
so, backtrader doesn't "think" it has all the data it requires to start
we change
![image](https://user-images.githubusercontent.com/7924802/85865564-c2f1e480-b7ce-11ea-83a5-24d9196b1c1b.png)
replace()
tolocalize()
which takes care of the issue.we could see the difference here:
you can read more about it here:
https://stackoverflow.com/a/1592837/2739124
https://stackoverflow.com/questions/35462876/python-pytz-timezone-function-returns-a-timezone-that-is-off-by-9-minutes
http://pytz.sourceforge.net/
The text was updated successfully, but these errors were encountered: