Files
MoFin/venv/lib/python3.12/site-packages/exchange_calendars/exchange_calendar_xstu.py
T
知微 fa45d8aa5f fix: 小果地址统一node122(兼容LAN+EasyTier)
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
  Privoxy对node122:18003返回500,直连正常
2026-06-30 02:56:35 +08:00

71 lines
1.4 KiB
Python

from datetime import time
from zoneinfo import ZoneInfo
from pandas.tseries.holiday import EasterMonday, GoodFriday
from .common_holidays import (
boxing_day,
christmas,
christmas_eve,
european_labour_day,
new_years_day,
new_years_eve,
)
from .exchange_calendar import HolidayCalendar, ExchangeCalendar
# Regular Holidays
# ----------------
NewYearsDay = new_years_day()
EuropeanLabourDay = european_labour_day()
ChristmasEve = christmas_eve()
Christmas = christmas()
BoxingDay = boxing_day()
NewYearsEve = new_years_eve()
class XSTUExchangeCalendar(ExchangeCalendar):
"""
Exchange calendar for the Börse Stuttgart (XSTU).
https://www.boerse-stuttgart.de/en/investing/market-hours/
Open Time: 7:30 AM, CET
Close Time: 10:00 PM, CET
Regularly-Observed Holidays:
- New Years Day
- Good Friday
- Easter Monday
- Labour Day
- Christmas Eve
- Christmas Day
- Boxing Day
- New Years Eve
"""
name = "XSTU"
tz = ZoneInfo("Europe/Berlin")
open_times = ((None, time(7, 30)),)
close_times = ((None, time(22)),)
@property
def regular_holidays(self):
return HolidayCalendar(
[
NewYearsDay,
GoodFriday,
EasterMonday,
EuropeanLabourDay,
ChristmasEve,
Christmas,
BoxingDay,
NewYearsEve,
]
)