hybrid DD tier와 Option C 2차(+1000%) 검증을 추가하고 실거래 사이징을 정합한다.
인과 GT leg 엔진·drawdown tier·train 캘리브레이션, Phase 2 Go/No-Go 및 시뮬 리포트를 반영한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,6 +71,7 @@ def compute_buy_amount_krw(
|
||||
asset_pct_scale: float,
|
||||
min_order_krw: float = GT_MIN_ORDER_KRW,
|
||||
fee_rate: float = TRADING_FEE_RATE,
|
||||
ignore_weight_split: bool = False,
|
||||
) -> float:
|
||||
"""
|
||||
목표=총보유자산×(최적 매수율×scale), 체결=min(목표, 보유현금/(1+fee)) 로 매수 원화를 산출합니다.
|
||||
@@ -86,6 +87,7 @@ def compute_buy_amount_krw(
|
||||
asset_pct_scale: leg·규칙 티어(대형/소형) 스케일.
|
||||
min_order_krw: 최소 주문 원화.
|
||||
fee_rate: 수수료율.
|
||||
ignore_weight_split: True면 weight 분할 없이 scale만 적용 (conviction 매수).
|
||||
|
||||
Returns:
|
||||
매수 원화(0이면 미체결).
|
||||
@@ -94,7 +96,10 @@ def compute_buy_amount_krw(
|
||||
return 0.0
|
||||
total_asset, _, available_cash = portfolio_totals(cash, qty, price)
|
||||
budget = max(available_cash / (1.0 + fee_rate), 0.0)
|
||||
opt_rate = optimal_weight_share(weight, weight_sum_remaining) * asset_pct_scale
|
||||
if ignore_weight_split:
|
||||
opt_rate = asset_pct_scale
|
||||
else:
|
||||
opt_rate = optimal_weight_share(weight, weight_sum_remaining) * asset_pct_scale
|
||||
target = total_asset * opt_rate
|
||||
amount = min(target, budget)
|
||||
if budget >= min_order_krw and 0 < amount < min_order_krw:
|
||||
|
||||
Reference in New Issue
Block a user