fix(ml): align dataset_builder default SL/TP with config (2.0/2.0)
Module-level ATR_SL_MULT was 1.5, now 2.0 to match config.py and CLI defaults. This ensures generate_dataset_vectorized() produces correct labels even without explicit parameters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import pandas_ta as ta
|
||||
from src.ml_features import FEATURE_COLS
|
||||
|
||||
LOOKAHEAD = 24 # 15분봉 × 24 = 6시간 뷰
|
||||
ATR_SL_MULT = 1.5
|
||||
ATR_SL_MULT = 2.0 # config.py 기본값과 동일 (서빙 환경 일치)
|
||||
ATR_TP_MULT = 2.0
|
||||
WARMUP = 60 # 15분봉 기준 60캔들 = 15시간 (지표 안정화 충분)
|
||||
|
||||
|
||||
@@ -43,12 +43,12 @@ def test_sltp_params_are_passed_through(signal_df):
|
||||
|
||||
|
||||
def test_default_sltp_backward_compatible(signal_df):
|
||||
"""SL/TP 파라미터 미지정 시 기존 기본값(1.5, 2.0)으로 동작해야 한다."""
|
||||
"""SL/TP 파라미터 미지정 시 기본값(2.0, 2.0)으로 동작해야 한다."""
|
||||
r_default = generate_dataset_vectorized(
|
||||
signal_df, adx_threshold=0, volume_multiplier=1.5,
|
||||
)
|
||||
r_explicit = generate_dataset_vectorized(
|
||||
signal_df, atr_sl_mult=1.5, atr_tp_mult=2.0,
|
||||
signal_df, atr_sl_mult=2.0, atr_tp_mult=2.0,
|
||||
adx_threshold=0, volume_multiplier=1.5,
|
||||
)
|
||||
if len(r_default) > 0:
|
||||
|
||||
Reference in New Issue
Block a user