From 8d53d1c0b4f689c881bcd61fb776e19bfee2440f Mon Sep 17 00:00:00 2001 From: dsyoon Date: Tue, 9 Jun 2026 18:51:30 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Ground=20Truth=20=EC=82=B0=EC=B6=9C?= =?UTF-8?q?=EB=AC=BC=EC=9D=84=20spot/futures=20=ED=8F=B4=EB=8D=94=EB=A1=9C?= =?UTF-8?q?=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 현물 GT JSON·차트를 spot/로 이동하고 선물 futures/ 디렉터리를 준비한다. Co-authored-by: Cursor --- .env.example | 20 ++++++++++--------- README.md | 15 ++++++++++---- data/ground_truth/futures/.gitkeep | 0 .../{ => spot}/ground_truth_trades_v1.json | 0 .../{ => spot}/ground_truth_trades_v2.json | 0 .../{ => spot}/ground_truth_trades_v3.json | 0 docs/02_ground_truth/futures/.gitkeep | 0 .../{ => spot}/ground_truth_chart.html | 0 .../{ => spot}/ground_truth_chart_data.js | 0 .../{ => spot}/ground_truth_chart_sim_v1.html | 0 .../ground_truth_chart_sim_v1_data.js | 0 .../{ => spot}/ground_truth_chart_sim_v2.html | 0 .../ground_truth_chart_sim_v2_data.js | 0 .../{ => spot}/ground_truth_chart_sim_v3.html | 0 .../ground_truth_chart_sim_v3_data.js | 0 .../{ => spot}/ground_truth_chart_v1.html | 0 .../{ => spot}/ground_truth_chart_v1_data.js | 0 .../{ => spot}/ground_truth_chart_v2.html | 0 .../{ => spot}/ground_truth_chart_v2_data.js | 0 .../{ => spot}/ground_truth_chart_v3.html | 0 .../{ => spot}/ground_truth_chart_v3_data.js | 0 src/deepcoin/config.py | 18 ++++++++--------- 22 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 data/ground_truth/futures/.gitkeep rename data/ground_truth/{ => spot}/ground_truth_trades_v1.json (100%) rename data/ground_truth/{ => spot}/ground_truth_trades_v2.json (100%) rename data/ground_truth/{ => spot}/ground_truth_trades_v3.json (100%) create mode 100644 docs/02_ground_truth/futures/.gitkeep rename docs/02_ground_truth/{ => spot}/ground_truth_chart.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_data.js (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_sim_v1.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_sim_v1_data.js (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_sim_v2.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_sim_v2_data.js (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_sim_v3.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_sim_v3_data.js (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_v1.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_v1_data.js (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_v2.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_v2_data.js (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_v3.html (100%) rename docs/02_ground_truth/{ => spot}/ground_truth_chart_v3_data.js (100%) diff --git a/.env.example b/.env.example index c72ab76..3669f66 100644 --- a/.env.example +++ b/.env.example @@ -40,18 +40,20 @@ GT_DIV_LOCAL_ORDER=20 GT_DIV_MIN_BARS_BETWEEN=1500 GT_DIV_MIN_RSI_DIFF=5.0 GT_DIV_MIN_FUTURE_MOVE_PCT=4.0 -GROUND_TRUTH_FILE=data/ground_truth/ground_truth_trades_v3.json -GROUND_TRUTH_V1_FILE=data/ground_truth/ground_truth_trades_v1.json -GROUND_TRUTH_V2_FILE=data/ground_truth/ground_truth_trades_v2.json -GROUND_TRUTH_CHART_V1_FILE=docs/02_ground_truth/ground_truth_chart_v1.html -GROUND_TRUTH_CHART_V2_FILE=docs/02_ground_truth/ground_truth_chart_v2.html -GROUND_TRUTH_CHART_V3_FILE=docs/02_ground_truth/ground_truth_chart_v3.html +GROUND_TRUTH_FILE=data/ground_truth/spot/ground_truth_trades_v3.json +GROUND_TRUTH_V1_FILE=data/ground_truth/spot/ground_truth_trades_v1.json +GROUND_TRUTH_V2_FILE=data/ground_truth/spot/ground_truth_trades_v2.json +GROUND_TRUTH_CHART_V1_FILE=docs/02_ground_truth/spot/ground_truth_chart_v1.html +GROUND_TRUTH_CHART_V2_FILE=docs/02_ground_truth/spot/ground_truth_chart_v2.html +GROUND_TRUTH_CHART_V3_FILE=docs/02_ground_truth/spot/ground_truth_chart_v3.html # --- Ground Truth 2단계 (수익 시뮬, 최근 1년) --- GT_SIM_LOOKBACK_DAYS=365 -GROUND_TRUTH_CHART_SIM_V1_FILE=docs/02_ground_truth/ground_truth_chart_sim_v1.html -GROUND_TRUTH_CHART_SIM_V2_FILE=docs/02_ground_truth/ground_truth_chart_sim_v2.html -GROUND_TRUTH_CHART_SIM_V3_FILE=docs/02_ground_truth/ground_truth_chart_sim_v3.html +GROUND_TRUTH_CHART_SIM_V1_FILE=docs/02_ground_truth/spot/ground_truth_chart_sim_v1.html +GROUND_TRUTH_CHART_SIM_V2_FILE=docs/02_ground_truth/spot/ground_truth_chart_sim_v2.html +GROUND_TRUTH_CHART_SIM_V3_FILE=docs/02_ground_truth/spot/ground_truth_chart_sim_v3.html + +# 선물(futures) GT·차트 경로는 docs/02_ground_truth/futures/, data/ground_truth/futures/ 사용 예정 # --- 매매 기법 (2단계) --- TECHNIQUES_DIR=data/techniques diff --git a/README.md b/README.md index d91df00..50eea28 100644 --- a/README.md +++ b/README.md @@ -104,15 +104,22 @@ DeepCoin/ │ ├── 01_download.py │ ├── 02_ground_truth.py │ └── 03_run_techniques.py -├── data/ground_truth/ -├── data/techniques/ -├── docs/02_ground_truth/ -├── docs/03_analysis/ +├── data/ +│ ├── ground_truth/ +│ │ ├── spot/ # 현물 GT JSON +│ │ └── futures/ # 선물 GT JSON (예정) +│ └── techniques/ +├── docs/ +│ ├── 02_ground_truth/ +│ │ ├── spot/ # 현물 GT·sim 차트 HTML +│ │ └── futures/ # 선물 GT·sim 차트 (예정) +│ └── 03_analysis/ └── coins.db ``` ## 변경 이력 +- 2026-06-09: Ground Truth 산출물 현물(spot)/선물(futures) 폴더 분리 - 2026-06-08: 2단계 매매 기법 8종 + GT 정합 비교 리포트 추가 - 2026-06-08: 1단계 Ground Truth (ZigZag 스윙 매수·매도 타점) 추가 - 2026-06-07: BTC 최대 2년 분·일·주·월봉 수집 지원 diff --git a/data/ground_truth/futures/.gitkeep b/data/ground_truth/futures/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/ground_truth/ground_truth_trades_v1.json b/data/ground_truth/spot/ground_truth_trades_v1.json similarity index 100% rename from data/ground_truth/ground_truth_trades_v1.json rename to data/ground_truth/spot/ground_truth_trades_v1.json diff --git a/data/ground_truth/ground_truth_trades_v2.json b/data/ground_truth/spot/ground_truth_trades_v2.json similarity index 100% rename from data/ground_truth/ground_truth_trades_v2.json rename to data/ground_truth/spot/ground_truth_trades_v2.json diff --git a/data/ground_truth/ground_truth_trades_v3.json b/data/ground_truth/spot/ground_truth_trades_v3.json similarity index 100% rename from data/ground_truth/ground_truth_trades_v3.json rename to data/ground_truth/spot/ground_truth_trades_v3.json diff --git a/docs/02_ground_truth/futures/.gitkeep b/docs/02_ground_truth/futures/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/02_ground_truth/ground_truth_chart.html b/docs/02_ground_truth/spot/ground_truth_chart.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart.html rename to docs/02_ground_truth/spot/ground_truth_chart.html diff --git a/docs/02_ground_truth/ground_truth_chart_data.js b/docs/02_ground_truth/spot/ground_truth_chart_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_data.js diff --git a/docs/02_ground_truth/ground_truth_chart_sim_v1.html b/docs/02_ground_truth/spot/ground_truth_chart_sim_v1.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_sim_v1.html rename to docs/02_ground_truth/spot/ground_truth_chart_sim_v1.html diff --git a/docs/02_ground_truth/ground_truth_chart_sim_v1_data.js b/docs/02_ground_truth/spot/ground_truth_chart_sim_v1_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_sim_v1_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_sim_v1_data.js diff --git a/docs/02_ground_truth/ground_truth_chart_sim_v2.html b/docs/02_ground_truth/spot/ground_truth_chart_sim_v2.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_sim_v2.html rename to docs/02_ground_truth/spot/ground_truth_chart_sim_v2.html diff --git a/docs/02_ground_truth/ground_truth_chart_sim_v2_data.js b/docs/02_ground_truth/spot/ground_truth_chart_sim_v2_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_sim_v2_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_sim_v2_data.js diff --git a/docs/02_ground_truth/ground_truth_chart_sim_v3.html b/docs/02_ground_truth/spot/ground_truth_chart_sim_v3.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_sim_v3.html rename to docs/02_ground_truth/spot/ground_truth_chart_sim_v3.html diff --git a/docs/02_ground_truth/ground_truth_chart_sim_v3_data.js b/docs/02_ground_truth/spot/ground_truth_chart_sim_v3_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_sim_v3_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_sim_v3_data.js diff --git a/docs/02_ground_truth/ground_truth_chart_v1.html b/docs/02_ground_truth/spot/ground_truth_chart_v1.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_v1.html rename to docs/02_ground_truth/spot/ground_truth_chart_v1.html diff --git a/docs/02_ground_truth/ground_truth_chart_v1_data.js b/docs/02_ground_truth/spot/ground_truth_chart_v1_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_v1_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_v1_data.js diff --git a/docs/02_ground_truth/ground_truth_chart_v2.html b/docs/02_ground_truth/spot/ground_truth_chart_v2.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_v2.html rename to docs/02_ground_truth/spot/ground_truth_chart_v2.html diff --git a/docs/02_ground_truth/ground_truth_chart_v2_data.js b/docs/02_ground_truth/spot/ground_truth_chart_v2_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_v2_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_v2_data.js diff --git a/docs/02_ground_truth/ground_truth_chart_v3.html b/docs/02_ground_truth/spot/ground_truth_chart_v3.html similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_v3.html rename to docs/02_ground_truth/spot/ground_truth_chart_v3.html diff --git a/docs/02_ground_truth/ground_truth_chart_v3_data.js b/docs/02_ground_truth/spot/ground_truth_chart_v3_data.js similarity index 100% rename from docs/02_ground_truth/ground_truth_chart_v3_data.js rename to docs/02_ground_truth/spot/ground_truth_chart_v3_data.js diff --git a/src/deepcoin/config.py b/src/deepcoin/config.py index cd2bbf7..300eeca 100644 --- a/src/deepcoin/config.py +++ b/src/deepcoin/config.py @@ -108,39 +108,39 @@ def load_settings(env_path: Path | None = None) -> Settings: db_path = _PROJECT_ROOT / db_path gt_file = _resolve_project_path( - os.getenv("GROUND_TRUTH_FILE", "data/ground_truth/ground_truth_trades_v3.json") + os.getenv("GROUND_TRUTH_FILE", "data/ground_truth/spot/ground_truth_trades_v3.json") ) gt_v1_file = _resolve_project_path( - os.getenv("GROUND_TRUTH_V1_FILE", "data/ground_truth/ground_truth_trades_v1.json") + os.getenv("GROUND_TRUTH_V1_FILE", "data/ground_truth/spot/ground_truth_trades_v1.json") ) gt_v2_file = _resolve_project_path( - os.getenv("GROUND_TRUTH_V2_FILE", "data/ground_truth/ground_truth_trades_v2.json") + os.getenv("GROUND_TRUTH_V2_FILE", "data/ground_truth/spot/ground_truth_trades_v2.json") ) gt_chart_v1 = _resolve_project_path( - os.getenv("GROUND_TRUTH_CHART_V1_FILE", "docs/02_ground_truth/ground_truth_chart_v1.html") + os.getenv("GROUND_TRUTH_CHART_V1_FILE", "docs/02_ground_truth/spot/ground_truth_chart_v1.html") ) gt_chart_v2 = _resolve_project_path( - os.getenv("GROUND_TRUTH_CHART_V2_FILE", "docs/02_ground_truth/ground_truth_chart_v2.html") + os.getenv("GROUND_TRUTH_CHART_V2_FILE", "docs/02_ground_truth/spot/ground_truth_chart_v2.html") ) gt_chart_v3 = _resolve_project_path( - os.getenv("GROUND_TRUTH_CHART_V3_FILE", "docs/02_ground_truth/ground_truth_chart_v3.html") + os.getenv("GROUND_TRUTH_CHART_V3_FILE", "docs/02_ground_truth/spot/ground_truth_chart_v3.html") ) gt_chart_sim_v1 = _resolve_project_path( os.getenv( "GROUND_TRUTH_CHART_SIM_V1_FILE", - "docs/02_ground_truth/ground_truth_chart_sim_v1.html", + "docs/02_ground_truth/spot/ground_truth_chart_sim_v1.html", ) ) gt_chart_sim_v2 = _resolve_project_path( os.getenv( "GROUND_TRUTH_CHART_SIM_V2_FILE", - "docs/02_ground_truth/ground_truth_chart_sim_v2.html", + "docs/02_ground_truth/spot/ground_truth_chart_sim_v2.html", ) ) gt_chart_sim_v3 = _resolve_project_path( os.getenv( "GROUND_TRUTH_CHART_SIM_V3_FILE", - "docs/02_ground_truth/ground_truth_chart_sim_v3.html", + "docs/02_ground_truth/spot/ground_truth_chart_sim_v3.html", ) )