feat: Enhance trading system with new permanent subscription features and order book management
Changes: - Added a new API endpoint for managing permanent subscriptions, allowing users to enable or disable subscriptions dynamically. - Implemented a function to fill candle data from Kiwoom, ensuring that only relevant data is inserted into the database. - Introduced a mechanism to handle master subscription states, improving the management of subscription statuses. - Updated the database schema to include new fields for managing subscription states and order book filtering. Impact: - These enhancements improve the flexibility and reliability of the trading system, allowing for better management of subscriptions and order book data, while reducing the risk of data inconsistencies. 히스토리 align 제거 븅신같은 초기설계 아예 제거 진입모드에 구멍메움 호가진입을 켜도 호가가 안들어올때 호가 안보고 그냥 사버림
This commit is contained in:
@@ -866,6 +866,7 @@ def evaluate_breakout_param_combo(
|
||||
program_by_code: Any = None,
|
||||
log_verdict_by_code: Any = None,
|
||||
share_denom_by_code: Optional[Dict[str, float]] = None,
|
||||
include_trades: bool = False,
|
||||
) -> Optional[Dict[str, Any]]:
|
||||
"""단일 돌파 조합 백테 — Grid 워커·Optuna objective 공통."""
|
||||
if "prev_chg_min" in combo and "prev_chg_max" in combo:
|
||||
@@ -939,8 +940,8 @@ def evaluate_breakout_param_combo(
|
||||
merged["max_stocks"] = int(max_stocks)
|
||||
merged["total_budget_krw"] = float(total_budget_krw)
|
||||
|
||||
from kis_trader.backtest.optuna_common import attach_daily_stability
|
||||
return attach_daily_stability({
|
||||
from kis_trader.backtest.optuna_common import attach_daily_stability, attach_optional_backtest_trades
|
||||
return attach_optional_backtest_trades(attach_daily_stability({
|
||||
"params": {k: ui_params[k] for k in grid_keys if k in ui_params},
|
||||
"total_pnl": int(total_pnl),
|
||||
"win_rate": round(win_rate, 2),
|
||||
@@ -956,7 +957,7 @@ def evaluate_breakout_param_combo(
|
||||
(meta.get("skip_stats") or {}).get("skipped_micro_buys") or 0
|
||||
),
|
||||
"merged_params": merged,
|
||||
}, trades)
|
||||
}, trades), trades, include_trades)
|
||||
|
||||
|
||||
def _evaluate_breakout_chunk(
|
||||
|
||||
Reference in New Issue
Block a user