[BUG] get_calendar() and get_missing_dates() in MarqueeRiskModel always return empty
Author: rlgoodmanCreated Mar 30, 2026Updated Apr 1, 2026
Describe the bug
When business_dates were changed to date objects instead of strings it caused the MarqueeRiskModel methods get_calendar() and get_missing_dates() now always return empty lists when called with start and end dates.
To Reproduce
>>> model=FactorRiskModel('AXIOMA_AXWW51T',
... name='WW51AxiomaTH',
... coverage=CoverageType.Global,
... universe_identifier=RiskModelUniverseIdentifier.sedol,
... term=RiskModelTerm.Trading,
... vendor='Axioma (Qontigo)',
... version=1)
>>> model.get(model.id)
>>> import datetime
>>> cal = model.get_calendar()
>>> len(cal.business_dates)
4246
>>> cal.business_dates[-30:]
(datetime.date(2026, 3, 18), datetime.date(2026, 3, 19), datetime.date(2026, 3, 20), datetime.date(2026, 3, 23), datetime.date(2026, 3, 24),
datetime.date(2026, 3, 25), datetime.date(2026, 3, 26), datetime.date(2026, 3, 27), datetime.date(2026, 3, 30), datetime.date(2026, 3, 31),
datetime.date(2026, 4, 1), datetime.date(2026, 4, 2), datetime.date(2026, 4, 3), datetime.date(2026, 4, 6), datetime.date(2026, 4, 7),
datetime.date(2026, 4, 8), datetime.date(2026, 4, 9), datetime.date(2026, 4, 10), datetime.date(2026, 4, 13), datetime.date(2026, 4, 14),
datetime.date(2026, 4, 15), datetime.date(2026, 4, 16), datetime.date(2026, 4, 17), datetime.date(2026, 4, 20), datetime.date(2026, 4, 21),
datetime.date(2026, 4, 22), datetime.date(2026, 4, 23), datetime.date(2026, 4, 24), datetime.date(2026, 4, 27), datetime.date(2026, 4, 28))
>>> cal1 = model.get_calendar(datetime.date(2026,3,1),datetime.date(2026,4,1))
>>> len(cal1.business_dates)
0
>>>Expected behavior
It is expected that the get_calendar() method would return the dates from the model between the passed dates.
Systems setup:
- OS: Ubuntu version 24.04
- Python version 3.12.3
- GS-Quant version 1.4.27 (Note that version 1.1.1 does not have this problem)
Additional context A pull request to fix this problem will be forthcoming shortly from me.
Source: goldmansachs/gs-quant