Files
QuantEngineByItz/verify_kis_data.py
kjh2064 83a5e7bd3d KIS 데이터 수집: 실제 시장 데이터 로드
kis_data_collection.db에 5개 종목 초기 데이터 수집:
- 005930 (삼성전자)
- 000660 (SK하이닉스)
- 035420 (NAVER)
- 051910 (LG화학)
- 373220 (LG에너지솔루션)

load_kis_sample_data_v1.py: KIS API 데이터 로더
verify_kis_data.py: 데이터 검증 스크립트

각 종목별 가격, 손절/익절, 기술지표(MA20, ATR20, RSI14) 포함

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-23 00:28:34 +09:00

38 lines
1.0 KiB
Python

#!/usr/bin/env python3
import sqlite3
from pathlib import Path
db_path = 'src/quant_engine/kis_data_collection.db'
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# 테이블 확인
cursor.execute("SELECT name FROM sqlite_master WHERE type='table'")
tables = [row[0] for row in cursor.fetchall()]
print('='*80)
print('KIS Data Collection DB Status')
print('='*80)
print(f'File size: {Path(db_path).stat().st_size / 1024:.2f} KB')
print(f'Tables: {tables}')
# data_feed 레코드 조회
if 'data_feed' in tables:
cursor.execute('SELECT COUNT(*) FROM data_feed')
count = cursor.fetchone()[0]
print(f'\ndata_feed table: {count} records')
# 샘플 출력
cursor.execute('''
SELECT ticker, name, close_price, entry_date, entry_stage, sector
FROM data_feed
ORDER BY entry_date DESC
''')
print('\n[Loaded Records]')
for row in cursor.fetchall():
ticker, name, price, date, stage, sector = row
print(f' {ticker:8} | {name:15} | {price:>10.0f} KRW | {date} | {stage:4} | {sector}')
conn.close()