MCPcopy Index your code
hub / github.com/microsoft/qlib / calendar

Method calendar

qlib/data/cache.py:1184–1195  ·  view source on GitHub ↗
(self, start_time=None, end_time=None, freq="day", future=False)

Source from the content-addressed store, hash-verified

1182
1183class MemoryCalendarCache(CalendarCache):
1184 def calendar(self, start_time=None, end_time=None, freq="day", future=False):
1185 uri = self._uri(start_time, end_time, freq, future)
1186 result, expire = MemCacheExpire.get_cache(H["c"], uri)
1187 if result is None or expire:
1188 result = self.provider.calendar(start_time, end_time, freq, future)
1189 MemCacheExpire.set_cache(H["c"], uri, result)
1190
1191 get_module_logger("data").debug(f"get calendar from {C.calendar_provider}")
1192 else:
1193 get_module_logger("data").debug("get calendar from local cache")
1194
1195 return result
1196
1197
1198H = MemCache()

Callers 4

_expressionMethod · 0.45
updateMethod · 0.45
gen_dataset_cacheMethod · 0.45
updateMethod · 0.45

Calls 3

get_cacheMethod · 0.80
set_cacheMethod · 0.80
_uriMethod · 0.45

Tested by

no test coverage detected