refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.

This commit is contained in:
Your Name
2026-08-12 10:19:19 +09:00
parent cb7e5037a0
commit c6bd62a25f
218 changed files with 31613 additions and 759 deletions

View File

@@ -64,21 +64,31 @@ run_one() {
echo "$study" > "logs/optuna_${strat}_tpe_latest.study"
set +e
"$PY" -u kis_trader/backtest/param_search_optuna.py \
--strategy "$strat" \
--mode "$MODE" \
--start "$START" \
--end "$END" \
--trials "$TRIALS" \
--min_trades "$MIN_TRADES" \
--min_win_rate "$MIN_WIN_RATE" \
--min_pf "$MIN_PF" \
--orderbook-filter off \
--no-progress \
--study-name "$study" \
--sort-by "$sort_by" \
--universe-history-source "$UNIVERSE_HISTORY_SOURCE" \
>"$log" 2>&1
set +e
local cmd_args=(
--strategy "$strat"
--mode "$MODE"
--start "$START"
--end "$END"
--trials "$TRIALS"
--min_trades "$MIN_TRADES"
--min_win_rate "$MIN_WIN_RATE"
--min_pf "$MIN_PF"
--orderbook-filter off
--no-progress
--study-name "$study"
--sort-by "$sort_by"
--universe-history-source "$UNIVERSE_HISTORY_SOURCE"
)
if [[ -n "${TICK_SOURCE:-}" ]]; then
cmd_args+=("--tick-source" "$TICK_SOURCE")
fi
if [[ -n "${OB_SOURCE:-}" ]]; then
cmd_args+=("--ob-source" "$OB_SOURCE")
fi
"$PY" -u kis_trader/backtest/param_search_optuna.py "${cmd_args[@]}" >"$log" 2>&1
local rc=$?
set -e