V2-2-1: L7 실시간 컨텍스트 기록 (시장별) #111

Closed
opened 2026-02-09 23:22:37 +09:00 by agentson · 0 comments
Collaborator

개요

Phase 2 첫 번째 이슈. trading_cycle() 내에서 시장 데이터 수집 직후 ContextStore에 L7_REALTIME 데이터를 기록한다.

현재 상태

  • 기존 코드에서 L7 데이터를 읽기만 하고 있음 (src/main.py)
  • ContextStore.set_context() 메서드는 구현되어 있으나 L7 쓰기가 main.py에서 호출되지 않음

변경 사항

src/main.py 수정

  • trading_cycle() 내 시장 데이터(market_data) 수집 직후 context_store.set_context(L7_REALTIME, ...) 호출 추가
  • Key format: {metric}_{market}_{stock_code} (예: volatility_KR_005930, price_US_AAPL)
  • 기록 항목: current_price, rsi, volume_ratio, price_change_pct 등

tests/test_main.py 수정

  • L7 컨텍스트 기록 테스트 ~5개 추가

의존성

  • 없음 (바로 시작 가능)

검증

  • pytest -v --cov=src
  • ruff check src/ tests/
## 개요 Phase 2 첫 번째 이슈. trading_cycle() 내에서 시장 데이터 수집 직후 ContextStore에 L7_REALTIME 데이터를 기록한다. ## 현재 상태 - 기존 코드에서 L7 데이터를 **읽기만** 하고 있음 (src/main.py) - ContextStore.set_context() 메서드는 구현되어 있으나 L7 쓰기가 main.py에서 호출되지 않음 ## 변경 사항 ### src/main.py 수정 - trading_cycle() 내 시장 데이터(market_data) 수집 직후 context_store.set_context(L7_REALTIME, ...) 호출 추가 - Key format: `{metric}_{market}_{stock_code}` (예: `volatility_KR_005930`, `price_US_AAPL`) - 기록 항목: current_price, rsi, volume_ratio, price_change_pct 등 ### tests/test_main.py 수정 - L7 컨텍스트 기록 테스트 ~5개 추가 ## 의존성 - 없음 (바로 시작 가능) ## 검증 - pytest -v --cov=src - ruff check src/ tests/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#111