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
Im currently using trading_calendars with zipline.
When I run my backtest, I'm currently getting a HistoryWindowStartsBeforeData error.
I'm starting the backtesting on January 02, 1968. However, it returns:
HistoryWindowStartsBeforeData: History window extends before 1975-01-02. To use this history window, start the backtest on or after 1975-12-31. (I am loading in 1 year worth of data for averages)
From my understanding, the issue is that trading calendar for the NYSE begins on 1975-01-02. This can be seen by running the following code:
from trading_calendars import get_calendar
us_calendar = get_calendar('XNYS')
for x in us_calendar.schedule.index:
print(x, 0.0)
The first date would be Jan. 2nd 1975.
How can we modify trading calendars to move this date further back so we can backtest beyond 1975.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
There was some discussion of this in #147. The current best option to get a calendar at a particular start date is to create the calendar manually instead of using the get_calendar helper:
Im currently using trading_calendars with zipline.
When I run my backtest, I'm currently getting a HistoryWindowStartsBeforeData error.
I'm starting the backtesting on January 02, 1968. However, it returns:
HistoryWindowStartsBeforeData: History window extends before 1975-01-02. To use this history window, start the backtest on or after 1975-12-31. (I am loading in 1 year worth of data for averages)
From my understanding, the issue is that trading calendar for the NYSE begins on 1975-01-02. This can be seen by running the following code:
from trading_calendars import get_calendar
us_calendar = get_calendar('XNYS')
for x in us_calendar.schedule.index:
print(x, 0.0)
The first date would be Jan. 2nd 1975.
How can we modify trading calendars to move this date further back so we can backtest beyond 1975.
Thanks in advance.
The text was updated successfully, but these errors were encountered: