feat(옵투나): score·min_trades·후처리 재탐색 및 웹 job 개선
PnL/(MDD+ADD) score·legacy 정렬·거래일×min_trades 게이트를 공통화한다. 후처리 ob_modes·study store·4전략 TPE 순차 스크립트와 문서를 갱신한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -76,14 +76,18 @@ run_one() {
|
||||
study="${strat}_${bo_extra}_tpe_${START//-/}_${END//-/}_${ts}"
|
||||
log="logs/optuna_${strat}_${bo_extra}_tpe_${ts}.log"
|
||||
fi
|
||||
sort_by="pnl"
|
||||
case "$strat" in
|
||||
momentum|us_momentum|scalp) sort_by="score" ;;
|
||||
sort_by="${SORT_BY:-score}"
|
||||
case "$sort_by" in
|
||||
score|score_legacy|pnl|daily_avg|win_rate) ;;
|
||||
*) sort_by="score" ;;
|
||||
esac
|
||||
|
||||
local min_trades_arg
|
||||
min_trades_arg=$("$PY" -c "from kis_trader.backtest.optuna_common import resolve_optuna_min_trades; print(resolve_optuna_min_trades('${START}', '${END}', '${strat}')['min_trades'])")
|
||||
|
||||
{
|
||||
echo ""
|
||||
echo "-------- [$strat${entry_mode:+/$entry_mode}${sl_mode:+/$sl_mode}${bo_extra:+/$bo_extra}] START $(date -Is) study=$study univ=$UNIVERSE_HISTORY_SOURCE --------"
|
||||
echo "-------- [$strat${entry_mode:+/$entry_mode}${sl_mode:+/$sl_mode}${bo_extra:+/$bo_extra}] START $(date -Is) study=$study univ=$UNIVERSE_HISTORY_SOURCE min_trades=$min_trades_arg --------"
|
||||
} | tee -a "$MASTER"
|
||||
echo "$log" > "logs/optuna_${strat}_tpe_latest.logpath"
|
||||
echo "$study" > "logs/optuna_${strat}_tpe_latest.study"
|
||||
@@ -112,7 +116,7 @@ run_one() {
|
||||
--start "$START"
|
||||
--end "$END"
|
||||
--trials "$TRIALS"
|
||||
--min_trades "$MIN_TRADES"
|
||||
--min_trades "$min_trades_arg"
|
||||
--min_win_rate "$MIN_WIN_RATE"
|
||||
--min_pf "$MIN_PF"
|
||||
--orderbook-filter "$([[ "$strat" == "breakout" ]] && echo "$ob_mode" || echo off)"
|
||||
|
||||
Reference in New Issue
Block a user