trading_agent.doctor.checks.market_calendar_check
¶
Checks that the exchange calendar is found and covers this year.
Typical usage example:
result = MarketCalendarCheck(Path('.../calendars')).run()
MarketCalendarCheck
¶
Bases: DoctorCheck
Checks the exchange holiday calendar.
Creates the check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calendar_directory
|
Path | None
|
UBI's calendars folder, or None when none is configured. |
required |
Source code in src/trading_agent/doctor/checks/market_calendar_check.py
run
¶
Reads the calendar.
Returns:
| Type | Description |
|---|---|
CheckResult
|
OK when this year is covered, otherwise a warning, because without it holidays look like trading days to the risk engine and the scheduler. |