mirror of
https://github.com/chrisnov-it/quantumbotx.git
synced 2026-07-27 18:57:47 +00:00
Fix Python 3.12 dependency and strategy imports
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import math
|
||||
import logging
|
||||
import os
|
||||
from core.strategies.strategy_map import STRATEGY_MAP
|
||||
from core.strategies.strategy_map import resolve_strategy_class
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
# Set appropriate logging level
|
||||
@@ -263,7 +263,7 @@ def run_enhanced_backtest(strategy_id, params, historical_data_df, symbol_name=N
|
||||
)
|
||||
|
||||
# Get strategy
|
||||
strategy_class = STRATEGY_MAP.get(strategy_id)
|
||||
strategy_class = resolve_strategy_class(strategy_id)
|
||||
if not strategy_class:
|
||||
return {"error": "Strategy not found"}
|
||||
|
||||
@@ -486,4 +486,4 @@ def run_enhanced_backtest(strategy_id, params, historical_data_df, symbol_name=N
|
||||
# Wrapper function for backward compatibility
|
||||
def run_backtest(strategy_id, params, historical_data_df, symbol_name=None):
|
||||
"""Backward compatible wrapper for enhanced backtesting"""
|
||||
return run_enhanced_backtest(strategy_id, params, historical_data_df, symbol_name)
|
||||
return run_enhanced_backtest(strategy_id, params, historical_data_df, symbol_name)
|
||||
|
||||
Reference in New Issue
Block a user