From 66af232f6d8fb9adee08967ff932f81c37da8d43 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 17 六月 2025 17:49:58 +0800 Subject: [PATCH] ‘功能完善 --- strategy/time_series_backtest.py | 4 +++- main.py | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 3e73088..a275ab3 100644 --- a/main.py +++ b/main.py @@ -109,8 +109,12 @@ # 鍒濆鍖栨暟鎹� strategy_manager.low_suction_strtegy = strategy_manager.LowSuctionStrategy(tool.get_now_date_str()) logger_system.info("鍒濆鍖栫瓥鐣ュ璞℃垚鍔�") - strategy_manager.low_suction_strtegy.load_data() - logger_system.info("鍔犺浇绛栫暐鏁版嵁鎴愬姛") + try: + strategy_manager.low_suction_strtegy.load_data() + logger_system.info("鍔犺浇绛栫暐鏁版嵁鎴愬姛") + except Exception as e: + logger_system.error(f"鍔犺浇绛栫暐鏁版嵁澶辫触锛歿str(e)}") + logger_system.exception(e) # -------鍚姩L2 market璁㈤槄------ __run_l2_market_subscript() diff --git a/strategy/time_series_backtest.py b/strategy/time_series_backtest.py index 05540ab..691488e 100644 --- a/strategy/time_series_backtest.py +++ b/strategy/time_series_backtest.py @@ -714,6 +714,8 @@ if block_in_datas: stock_variables.璧勯噾娴佸叆鏉垮潡 = block_in_datas + + stock_variables.褰撳墠浠� = big_order[1][4] compute_result = self.__run_backtest(code, stock_variables) # print(compute_result) self.__process_test_result(code, stock_variables, next_trade_day, big_order[1][4], @@ -808,7 +810,7 @@ # "2025-05-30", "2025-06-03", "2025-06-04", "2025-06-05", "2025-06-06", "2025-06-09", "2025-06-10", # "2025-06-11", "2025-06-12", "2025-06-13", "2025-06-16", "2025-06-17"] - # days = ["2025-06-13"] + days = ["2025-05-23"] days.reverse() for day in days: -- Gitblit v1.8.0