## CRITICAL 수정 (20건) - day_trading: global 선언 누락, loss_tracker 연동, ban 체크 추가 - trade_executor: BUY 체결가 order_price로 수정, remaining_pct 누적 계산 - risk_validator: get_current_price dict 파싱, MAX_POSITION_SIZE 동기화, DB 세션 누수 - risk_management/recommendations: date.today() → KST 변환 - mdd_manager: Lock 밖 executed_key 참조 수정 - correlation_filter: output → output2 키 수정 - portfolio: 해외 종목 USD/KRW 환율 적용 분리 - Sharpe Ratio 거래빈도 기반 연간화 - telegram_notifier: send_message() 공개 래퍼 추가 - position_manager: 앱 재시작 시 DB 포지션 복원 - swing exit_service: remaining_pct 조건 범위 수정 - run_backtest: original_qty 기반 remaining_pct 계산 - us_market_schedule: 2027년 미국 공휴일 추가 - Login.tsx: res.ok 검증 추가 - mean_reversion_strategy: RSI 로그 하드코딩 수정 ## HIGH 수정 (10건) - db_worker: DLQ 파일 백업 메커니즘 추가 - korea_investment_api: 만료 토큰 임의 연장 제거 - market_data: chart_cache 최대 100개 + TTL 만료 - main.py: rate_limit_store 1시간 미접근 IP 정리 - recommendations: fire-and-forget try/except 추가 - swing/scheduler: DB 세션 3개 분리 - Dashboard: wsMessages 전체 순회 - Layout: /health 엔드포인트 + 30초 폴링 - ml_ensemble: POST /train require_api_key 추가 - day_trading: record_trade_result_safe() 전환 ## 코드 정리 - 프론트엔드: isUsStock, formatTime 공통 유틸 추출 - 백엔드: dead code 제거, 중복 import 통합 - MCP: JSON 파싱 헬퍼 추출 (~60줄 감소) - 전체 ~100개 파일 한국어 주석 추가 - 테스트 13건 코드 기준 수정 (468 passed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
87 lines
2.4 KiB
JSON
87 lines
2.4 KiB
JSON
{
|
|
"portfolio_constraints": {
|
|
"min_cash_reserve_ratio": 0.2,
|
|
"max_cash_reserve_ratio": 0.3,
|
|
"min_cash_reserve_amount": 1000000,
|
|
"max_holdings_count": 20,
|
|
"max_position_size_ratio": 0.04,
|
|
"min_position_size_ratio": 0.02,
|
|
"max_sector_concentration": 0.4,
|
|
"leverage_etf_max_ratio": 0.20,
|
|
"mean_reversion_max_capital": 0.30,
|
|
"rebalance_threshold": 0.1
|
|
},
|
|
"risk_management": {
|
|
"max_daily_loss": 0.03,
|
|
"max_daily_trades": 10,
|
|
"max_loss_per_trade": 0.08,
|
|
"stop_loss_low_vol": -6.0,
|
|
"stop_loss_high_vol": -10.0,
|
|
"atr_stop_multiplier": 2.5,
|
|
"atr_trailing_multiplier": 1.5,
|
|
"trailing_stop_loss": 0.02,
|
|
"daily_profit_target": 0.05,
|
|
"mdd_pause_threshold": -10,
|
|
"mdd_force_threshold": -20,
|
|
"consecutive_loss_ban_count": 3,
|
|
"consecutive_loss_ban_days": 30,
|
|
"overheat_filter": {
|
|
"enabled": true,
|
|
"max_gain_3day": 15.0,
|
|
"max_gain_5day": 20.0,
|
|
"max_gain_10day": 30.0,
|
|
"max_disparity_20ma": 108.0
|
|
},
|
|
"bear_market_filter": {
|
|
"enabled": true,
|
|
"description": "코스피 200일 MA 기반 하락장 방어 전략 (섹션 7.1)",
|
|
"conditions": {
|
|
"bull": "코스피 > MA200 AND MA200 기울기 양(+)",
|
|
"bear": "위 조건 미충족"
|
|
},
|
|
"bearish_actions": {
|
|
"min_score": 5,
|
|
"max_trades_per_day": 3,
|
|
"position_multiplier": 0.5
|
|
},
|
|
"strong_bearish_actions": {
|
|
"min_score": 8,
|
|
"max_trades_per_day": 1,
|
|
"position_multiplier": 0.1
|
|
}
|
|
}
|
|
},
|
|
"rules": [
|
|
{
|
|
"name": "RSI+볼린저 평균회귀",
|
|
"description": "RSI 과매도 + 볼린저 하단 평균회귀 전략 (CLAUDE.md 섹션 7)",
|
|
"rule_type": "MEAN_REVERSION",
|
|
"is_active": true,
|
|
"priority": 1,
|
|
"conditions": {
|
|
"rsi_bull_max": 40,
|
|
"rsi_bear_max": 30,
|
|
"pct_b_method": "dynamic",
|
|
"min_price_krw": 5000,
|
|
"min_price_usd": 4.0,
|
|
"min_volume_vs_avg": 1.0
|
|
},
|
|
"actions": {
|
|
"action_type": "buy",
|
|
"position_sizing": {
|
|
"method": "fixed_ratio",
|
|
"target_ratio": 0.04
|
|
},
|
|
"stop_loss_atr_mult": 2.5,
|
|
"stop_loss_max_pct": -8.0,
|
|
"take_profit": 5.0,
|
|
"stop_loss": 6.0,
|
|
"exit_1_rsi": 50,
|
|
"exit_1_pct": 0.50,
|
|
"exit_2_rsi_min": 60,
|
|
"exit_2_rsi_max": 65
|
|
}
|
|
}
|
|
]
|
|
}
|