feat: Enhance trading system with new e_min_chg_pct parameter and related logic
Changes: - Introduced the `e_min_chg_pct` parameter to define the minimum price change percentage compared to the previous day's close, enhancing the momentum trading strategy. - Updated various functions and classes to incorporate this new parameter, ensuring it is utilized in both backtesting and live trading scenarios. - Improved documentation and comments to clarify the purpose and usage of the new parameter across the codebase. Impact: - This addition allows for more precise control over trading conditions, potentially increasing the effectiveness of the momentum strategy while maintaining system integrity and performance.
This commit is contained in:
@@ -34,6 +34,7 @@ _MOMENTUM_BASE_KEYS: List[str] = [
|
||||
"mom_rsi_max",
|
||||
"mom_vol_mult",
|
||||
"mom_vol_win",
|
||||
"e_min_chg_pct",
|
||||
"tp_pct",
|
||||
"tp_max_pct",
|
||||
"sl_pct",
|
||||
@@ -82,6 +83,10 @@ def suggest_momentum_params_tpe(
|
||||
|
||||
combo["mom_vol_mult"] = r2(trial.suggest_float("mom_vol_mult", 1.0, 10.0, step=0.1))
|
||||
combo["mom_vol_win"] = trial.suggest_int("mom_vol_win", 3, 10)
|
||||
# HTS K: 전일종가 대비 최소등락(%) — 실매 앵커 0.2 포함 연속 텀 (step 0.1)
|
||||
combo["e_min_chg_pct"] = r1(
|
||||
trial.suggest_float("e_min_chg_pct", 0.0, 2.0, step=0.1),
|
||||
)
|
||||
|
||||
combo["tp_pct"] = r2(trial.suggest_float("tp_pct", 1.5, 15.0, step=0.1))
|
||||
combo["tp_max_pct"] = r2(trial.suggest_float("tp_max_pct", 2.0, 20.0, step=0.5))
|
||||
|
||||
Reference in New Issue
Block a user