From 7ee4a207bc16825368ee179a3e216e4a0c826f30 Mon Sep 17 00:00:00 2001 From: "wangwenxi.handsome" Date: Thu, 26 Aug 2021 16:26:26 +0000 Subject: [PATCH] add lru --- qlib/backtest/high_performance_ds.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qlib/backtest/high_performance_ds.py b/qlib/backtest/high_performance_ds.py index 6f38b390a..f17f6e14c 100644 --- a/qlib/backtest/high_performance_ds.py +++ b/qlib/backtest/high_performance_ds.py @@ -158,6 +158,7 @@ class CN1min_NumpyQuote(BaseQuote): def get_all_stock(self): return self.data.keys() + @lru_cache(maxsize=512) def get_data(self, stock_id, start_time, end_time, fields=None, method=None): if fields is None and method is not None: raise ValueError(f"method must be None when fields is None")