feat: trades 테이블 mode 컬럼 추가 (#212) #221

Merged
jihoson merged 4 commits from feature/issue-212-trades-mode-column into main 2026-02-23 12:34:26 +09:00
Collaborator

Summary

  • #212 (HIGH) trades 테이블에 mode TEXT DEFAULT 'paper' 컬럼 추가
    • 실전(live)과 모의(paper) 거래 데이터를 DB 레벨에서 분리
    • 기존 DB 자동 마이그레이션: ALTER TABLE 으로 mode 컬럼 추가
    • log_trade() 함수 mode 파라미터 추가 (기본값 'paper')
    • trading_cycle()run_daily_session() 에서 settings.MODE 자동 전달

Test plan

  • test_log_trade_stores_mode_paper — paper 모드 저장 확인
  • test_log_trade_stores_mode_live — live 모드 저장 확인
  • test_log_trade_default_mode_is_paper — 기본값 paper 확인
  • test_mode_column_exists_in_schema — 스키마 검증
  • test_mode_migration_adds_column_to_existing_db — 기존 DB 마이그레이션 검증
  • 전체 747개 테스트 통과

🤖 Generated with Claude Code

## Summary - **#212** (HIGH) `trades` 테이블에 `mode TEXT DEFAULT 'paper'` 컬럼 추가 - 실전(`live`)과 모의(`paper`) 거래 데이터를 DB 레벨에서 분리 - 기존 DB 자동 마이그레이션: `ALTER TABLE` 으로 `mode` 컬럼 추가 - `log_trade()` 함수 `mode` 파라미터 추가 (기본값 `'paper'`) - `trading_cycle()` 및 `run_daily_session()` 에서 `settings.MODE` 자동 전달 ## Test plan - [x] `test_log_trade_stores_mode_paper` — paper 모드 저장 확인 - [x] `test_log_trade_stores_mode_live` — live 모드 저장 확인 - [x] `test_log_trade_default_mode_is_paper` — 기본값 paper 확인 - [x] `test_mode_column_exists_in_schema` — 스키마 검증 - [x] `test_mode_migration_adds_column_to_existing_db` — 기존 DB 마이그레이션 검증 - [x] 전체 747개 테스트 통과 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agentson added 1 commit 2026-02-23 10:33:12 +09:00
feat: trades 테이블 mode 컬럼 추가 (paper/live 거래 분리) (#212)
Some checks failed
CI / test (pull_request) Has been cancelled
11dff9d3e5
- trades 테이블에 mode TEXT DEFAULT 'paper' 컬럼 추가
- 기존 DB 마이그레이션: ALTER TABLE으로 mode 컬럼 자동 추가
- log_trade() 함수에 mode 파라미터 추가 (기본값 'paper')
- trading_cycle(), run_daily_session()에서 settings.MODE 전달
- 테스트 5개 추가 (mode 저장, 기본값, 스키마 검증, 마이그레이션)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
agentson added 1 commit 2026-02-23 12:28:35 +09:00
BULLISH 시장에서도 confidence < 80 → HOLD 규칙이 동일하게 적용됨을 명시.
시장 전망별 임계값: BEARISH=90(더 엄격), BULLISH/NEUTRAL=80(최소값).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
agentson added 2 commits 2026-02-23 12:34:08 +09:00
시장 전망별 BUY confidence 최소 임계값:
- BEARISH: 90 (더 엄격)
- NEUTRAL/기본: 80
- BULLISH: 75 (낙관적 시장에서 완화)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jihoson merged commit 641f3e8811 into main 2026-02-23 12:34:26 +09:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#221