refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user