refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
@@ -79,10 +79,10 @@ def suggest_tail_params_tpe(trial: optuna.Trial) -> Dict[str, Any]:
|
||||
combo["entry_mode"] = "align"
|
||||
combo["cand_limit"] = trial.suggest_categorical("cand_limit", [0, 20])
|
||||
combo["max_daily_change"] = r1(
|
||||
trial.suggest_float("max_daily_change", 20.0, 45.0, step=1.0),
|
||||
trial.suggest_float("max_daily_change", 10.0, 60.0, step=1.0), # 확장: 20→10, 45→60
|
||||
)
|
||||
combo["min_drop_rate"] = r3(
|
||||
trial.suggest_float("min_drop_rate", 0.01, 0.08, step=0.005),
|
||||
trial.suggest_float("min_drop_rate", 0.005, 0.15, step=0.005), # 확장: 0.01→0.005, 0.08→0.15
|
||||
)
|
||||
combo["min_recovery_ratio"] = r2(
|
||||
trial.suggest_float("min_recovery_ratio", 0.08, 0.35, step=0.01),
|
||||
@@ -103,9 +103,9 @@ def suggest_tail_params_tpe(trial: optuna.Trial) -> Dict[str, Any]:
|
||||
trial.suggest_float("target_atr_mult", 0.8, 3.5, step=0.1),
|
||||
)
|
||||
combo["atr_sl_min_pct"] = r2(trial.suggest_float("atr_sl_min_pct", 0.3, 1.0, step=0.1))
|
||||
combo["atr_sl_max_pct"] = r1(trial.suggest_float("atr_sl_max_pct", 1.0, 8.0, step=0.5))
|
||||
combo["atr_tp_min_pct"] = r2(trial.suggest_float("atr_tp_min_pct", 0.2, 1.0, step=0.1))
|
||||
combo["atr_tp_max_pct"] = r1(trial.suggest_float("atr_tp_max_pct", 1.5, 6.0, step=0.5))
|
||||
combo["atr_sl_max_pct"] = r1(trial.suggest_float("atr_sl_max_pct", 1.0, 12.0, step=0.5)) # 확장: 8.0→12.0
|
||||
combo["atr_tp_min_pct"] = r2(trial.suggest_float("atr_tp_min_pct", 0.1, 2.0, step=0.1)) # 확장: 0.2→0.1
|
||||
combo["atr_tp_max_pct"] = r1(trial.suggest_float("atr_tp_max_pct", 1.0, 10.0, step=0.5)) # 확장: 6.0→10.0
|
||||
|
||||
combo["tail_vol_mult"] = r2(trial.suggest_float("tail_vol_mult", 0.0, 4.0, step=0.1))
|
||||
combo["tail_vol_win"] = trial.suggest_int("tail_vol_win", 2, 8)
|
||||
@@ -134,8 +134,8 @@ def suggest_tail_params_tpe(trial: optuna.Trial) -> Dict[str, Any]:
|
||||
"reentry_min_edge_krw", 0, 1000, step=100,
|
||||
)
|
||||
combo["reentry_require_nonneg"] = False
|
||||
combo["max_daily"] = trial.suggest_int("max_daily", 5, 60, step=5)
|
||||
combo["cooldown_min"] = r1(trial.suggest_float("cooldown_min", 0.0, 15.0, step=1.0))
|
||||
combo["max_daily"] = trial.suggest_int("max_daily", 3, 80, step=5) # 확장: 5→3, 60→80
|
||||
combo["cooldown_min"] = r1(trial.suggest_float("cooldown_min", 0.0, 30.0, step=1.0)) # 확장: 15→30
|
||||
combo["bar_chg_min_pct"] = r1(
|
||||
trial.suggest_float("bar_chg_min_pct", -15.0, -3.0, step=0.5),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user