What is a Trading Calendar in Zipline
masterA TradingCalendar represents the timing information of a single market exchange. It is the parent class for all exchange calendars in Zipline. A calendar consists of two primary components:
- Sessions: A contiguous set of minutes. Sessions are labeled using midnight UTC (used for convenience, not as a specific point in time).
- Opens/Closes: The specific times the market opens and closes.
Crucial Requirement: The dates accounted for in your data bundle must match the dates in your TradingCalendar. If they do not match (e.g., your calendar says the market is closed on a Saturday, but your data bundle contains Saturday price data), you will encounter errors during backtesting.