From 8f5f187fcd875f89203f628d2c05a33885943580 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 10 Jun 2019 13:29:03 +0800 Subject: [PATCH] [Mod] clear previously loaded history data --- vnpy/app/cta_strategy/backtesting.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vnpy/app/cta_strategy/backtesting.py b/vnpy/app/cta_strategy/backtesting.py index 115881cc..456ab7fa 100644 --- a/vnpy/app/cta_strategy/backtesting.py +++ b/vnpy/app/cta_strategy/backtesting.py @@ -214,6 +214,8 @@ class BacktestingEngine: if not self.end: self.end = datetime.now() + self.history_data.clear() # Clear previously loaded history data + # Load 30 days of data each time and allow for progress update progress_delta = timedelta(days=30) total_delta = self.end - self.start