Open LaurensBosscher opened 2 months ago
Hi @LaurensBosscher, sorry about the tardiness of this reply...
By default a calendar ends one year into the future. This can be changed by passing the 'end' option when creating the calendar. For example:
import exchange_calendars as xcals
cal = xcals.get_calendar("XNYS", end="2050")
cal.last_session
outputs...
Timestamp('2049-12-31 00:00:00')
Admittedly this is a bit of an edge case (I'm extrapolating an existing timeseries where timing is an element) but it seems that the trading schedule is limited to 2025-07-18:
I can imagine that this was chose due to memory/performance reasons but perhaps it's possible to implement this with a generator so that exchange_calendars can support infinite timeseries at a constant memory usage?