Replies: 2 comments
-
I think I found it. https://github.com/gerrymanoim/exchange_calendars/blob/master/docs/tutorials/calendar_properties.ipynb |
Beta Was this translation helpful? Give feedback.
-
Hi @yzorg, sorry for not replying earlier. Might the calendar's holidays properties serve your needs, |
Beta Was this translation helpful? Give feedback.
-
I help maintain trading systems and our hours & holiday calendars only support North America and London (XTSE, NYSE, OTC, NASDAQ, ARCA, XMEX, XLON). I'm looking at expanding that to international this year. This project looks great.
We render out each exchange trading hours much like the test CSVs, but ours also have
is_holiday
(start_time is null, end_time is null, but is_holiday =1). This gives us performant join in SQL for orders that came in on a holiday.All the North America (and Europe for that matter) follow Mon-Fri, so could use a negative test to know which are holidays. But doesn't cover Middle East (XTAE) that aren't Mon-Fri.
So I searched a bit and found
weekmask(self)
on some calendars to know which are not Mon-Fri week schedules. But I don't see any samples for how to access that via any documented APIs.I'm not doing historical, but in case others are historical would method differ for old or temporary changes to weekmask?
I'll keep digging into how the sessions are generated to try to figure this out myself, but thought I'd ask in case others have already solved it.
Beta Was this translation helpful? Give feedback.
All reactions