What is a Trading Calendar and why is it used?
mainA TradingCalendar represents the timing information of a single market exchange. It consists of two main components:
- Sessions: A contiguous set of minutes with a label (conventionally midnight UTC).
- Opens/Closes: The specific times the market starts and ends trading.
Importance for Backtesting:
Your TradingCalendar must match the dates available in your data bundle. If you attempt to place a trade on a day when the exchange is closed (e.g., a Saturday for the NYSE), the backtest will fail or produce errors. This applies to both minutely and daily data.