fix: market_data에 unrealized_pnl_pct/holding_days 추가하여 SELL 시나리오 정상화 (#259) #263
Reference in New Issue
Block a user
Delete Branch "feature/issue-259-market-data-pnl-holding-days"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
get_open_position()에timestamp컬럼 추가trading_cycle()market_data 구성 시 open_position 조회 후 보유 종목 정보 enrichment:unrealized_pnl_pct: (현재가 - 매수가) / 매수가 × 100holding_days: 매수일로부터 경과 일수영향
기존: NVDA 38주 보유 중이지만
Condition requires 'unrealized_pnl_pct' but key missing경고와 함께 모든 시나리오 평가 실패 → confidence=0 HOLD 고착수정 후: take-profit(unrealized_pnl_pct > 4%), stop-loss(RSI<45 AND pnl<-2.5%) 시나리오 정상 평가
Test plan
Closes #259