feat: Enhance Optuna integration and logging for backtesting framework

Changes:
- Added new API endpoints for continuing and confirming Optuna jobs, allowing for better management of ongoing studies.
- Introduced detailed logging for tick feed tracking and order book processing, improving traceability of vendor performance during backtests.
- Updated database schema to include new fields for managing Optuna study results, enhancing the ability to track study progress and outcomes.
- Refactored existing functions to utilize the new logging and tracking features, ensuring consistency across the backtesting framework.

Impact:
- These enhancements improve the robustness and transparency of the Optuna backtesting process, facilitating better analysis and optimization of trading strategies.
This commit is contained in:
Your Name
2026-08-21 19:05:23 +09:00
parent 0ecac7cb95
commit 0780b2cdd0
76 changed files with 4648 additions and 516 deletions

View File

@@ -593,6 +593,19 @@ def _collect_buy_candidates(
ticks_by_code, code, entry_bar_time, entry_open, params,
min_tick_time=min_tick_time,
)
# 옵투나 원인파악: 통과 후보 샘플에 틱벤더·호가·틱타임 꼬리 (상한 BT_FEED_DETAIL_LOG_MAX)
try:
from kis_trader.backtest.optuna_feed_trace import maybe_log_bt_trigger_sample
maybe_log_bt_trigger_sample(
code, eval_params,
entry_price=float(entry_price or 0),
entry_time=str(entry_time_key or ""),
entry_src=str(entry_src or ""),
context="MOMENTUM-TRIGGER",
)
except Exception:
pass
pe_data: Dict[str, Any] = {
"entry_time": entry_time_key,
"entry_price": entry_price,