fix: run_mr_backtest tp_pct=None兜底默认0.18; evolution_api baseline改为v_weak/v_oversold, get_health_trend默认v_weak
This commit is contained in:
+2
-2
@@ -2299,8 +2299,8 @@ def run_mr_backtest(strategy_version, start_date, end_date, capital=913000,
|
||||
skip_stats['next_open'] += 1; i += 1; continue
|
||||
|
||||
# ── 出场(均值回归:让利润跑向止盈,无 MA20 截断)──
|
||||
tp_pct = exit_cfg.get('tp_pct', 0.18)
|
||||
sl_pct = exit_cfg.get('sl_pct', 0.08)
|
||||
tp_pct = exit_cfg.get('tp_pct', 0.18) or 0.18 # None 时用默认 0.18
|
||||
sl_pct = exit_cfg.get('sl_pct', 0.08) or 0.08
|
||||
max_hold = exit_cfg.get('max_hold_days', 25)
|
||||
target = ep * (1 + tp_pct)
|
||||
stop = ep * (1 - sl_pct)
|
||||
|
||||
Reference in New Issue
Block a user