feat: Add DART strategy and related configurations
ㅇ Changes: - Introduced the DART strategy to the trading system, including its configuration and integration into the existing framework. - Updated the database schema to include DART-specific tables for disclosures and watchlists. - Enhanced the backtesting and parameter search functionalities to support the DART strategy. - Implemented new rules for browser verification and API interactions to ensure compliance with the updated DART strategy. Impact: - These additions expand the trading capabilities of the system, allowing for more comprehensive analysis and execution of DART-related strategies, while maintaining system integrity and performance.
This commit is contained in:
@@ -75,6 +75,11 @@ from kis_trader.backtest.optuna_scalping import (
|
||||
prepare_scalp_search_context,
|
||||
run_scalp_optuna,
|
||||
)
|
||||
from kis_trader.backtest.optuna_dart import (
|
||||
apply_best_dart_trial,
|
||||
prepare_dart_search_context,
|
||||
run_dart_optuna,
|
||||
)
|
||||
from kis_trader.backtest.optuna_search_space import suggest_tail_params, tail_grid_axis_keys
|
||||
from kis_trader.backtest.param_search_cli_common import (
|
||||
add_portfolio_cli_args,
|
||||
@@ -106,6 +111,7 @@ STRATEGY_MODES: Dict[str, List[str]] = {
|
||||
"momentum": ["fast", "exit", "rr", "coarse", "fine", "wide", "full"],
|
||||
"breakout": ["fast", "coarse", "fine", "wide", "full"],
|
||||
"scalp": ["fast", "trigger", "exit", "coarse", "fine", "full", "wide"],
|
||||
"dart": ["fast", "coarse", "fine"],
|
||||
}
|
||||
|
||||
|
||||
@@ -864,6 +870,23 @@ def main() -> None:
|
||||
if args.apply_best:
|
||||
apply_best_scalp_trial(study)
|
||||
|
||||
elif strategy == "dart":
|
||||
ctx_d = prepare_dart_search_context(args.start, args.end, mode)
|
||||
if ctx_d is None:
|
||||
sys.exit(1)
|
||||
study = run_dart_optuna(
|
||||
ctx_d,
|
||||
n_trials=n_trials,
|
||||
storage_url=storage_url,
|
||||
study_name=study_name,
|
||||
min_trades=args.min_trades,
|
||||
sampler_name=sampler_name,
|
||||
seed=args.seed,
|
||||
show_progress=not args.no_progress,
|
||||
)
|
||||
if args.apply_best:
|
||||
apply_best_dart_trial(study)
|
||||
|
||||
else:
|
||||
ctx_b = prepare_breakout_search_context(
|
||||
args.start, args.end, mode,
|
||||
|
||||
Reference in New Issue
Block a user