전 봉 BB·일목 조합 분석 및 simulation 단일 실행으로 통합

9개 간격(1~1440분) BB·일목 위치 특징을 3분 타임라인에 맞춰 분석하고,
discover로 매수·매도 규칙을 찾은 뒤 HTML 차트에 해당 체결만 표시한다.
simulation_1h.py를 simulation.py로 변경했으며, 파라미터 없이 실행하면
analyze→discover→차트가 한 번에 수행된다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dsyoon
2026-05-29 01:20:36 +09:00
parent 7d53090034
commit e218a8ea32
15 changed files with 1510 additions and 803 deletions

View File

@@ -18,6 +18,7 @@ from config import (
DB_PATH,
DOWNLOAD_INTERVALS,
DOWNLOAD_MONTHS,
DOWNLOAD_MONTHS_1M,
KR_COINS,
SYMBOL,
)
@@ -71,9 +72,18 @@ def interval_label(interval: int) -> str:
return f"{interval}분봉"
def months_for_interval(interval: int, default_months: int) -> int:
"""간격별 DB 보관 개월 수 (1분봉은 별도 상한)."""
if interval == 1:
return DOWNLOAD_MONTHS_1M
return default_months
def download_jobs() -> list[tuple[int, str]]:
labels = {
1: "1분",
3: "3분",
5: "5분",
10: "10분",
15: "15분",
30: "30분",
@@ -241,6 +251,7 @@ def download_symbol(
months: int,
) -> None:
"""한 간격의 봉을 API로 받아 증분 저장합니다."""
months = months_for_interval(interval, months)
label = interval_label(interval)
last_ts = get_last_timestamp(symbol, interval)
existing = get_row_count(symbol, interval)