GT MTF 프로필·캘리브레이션과 04 매칭/시뮬/실거래 파이프라인을 추가한다.
3분~일봉 GT 타점 분석(03c), leg 체결 순서 수정, 총자산 90% 검증 루프, walk-forward Go/No-Go 시뮬, monitor·live_trader 및 reference 문서를 포함한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
11
scripts/03_gt_mtf_profile.py
Normal file
11
scripts/03_gt_mtf_profile.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""03c단계: GT 타점 MTF 프로필 분석 (3분~일봉, 매수/매도 대조)."""
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from deepcoin.matching.gt_mtf_profile import run_gt_mtf_profile
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_gt_mtf_profile()
|
||||
17
scripts/03_patch_gt_snapshots.py
Normal file
17
scripts/03_patch_gt_snapshots.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
"""03b CSV에 누락된 GT 타점만 MTF 스냅샷 보강."""
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from config import CHART_LOOKBACK_DAYS, SYMBOL
|
||||
from deepcoin.analysis.general_analysis_snapshot import append_missing_gt_snapshots
|
||||
from deepcoin.data.mtf_bb import load_frames_from_db
|
||||
from deepcoin.ops.monitor import Monitor
|
||||
|
||||
if __name__ == "__main__":
|
||||
mon = Monitor(cooldown_file=None)
|
||||
frames = load_frames_from_db(mon, SYMBOL, lookback_days=CHART_LOOKBACK_DAYS)
|
||||
n = append_missing_gt_snapshots(frames)
|
||||
print(f"완료: {n}건 추가")
|
||||
11
scripts/04_calibrate_gt_assets.py
Normal file
11
scripts/04_calibrate_gt_assets.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""GT 총자산 90% 목표 MTF 프로필 반복 캘리브레이션 (03b 스냅샷)."""
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from deepcoin.matching.gt_profile_iterate import run_profile_calibration_loop
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_profile_calibration_loop()
|
||||
11
scripts/04_gt_comparison_report.py
Normal file
11
scripts/04_gt_comparison_report.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""GT(450타점) vs 규칙 발화·시뮬 Go/No-Go 비교 리포트."""
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from deepcoin.matching.gt_comparison import run_gt_comparison_report
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_gt_comparison_report()
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""04단계: GT 근접 규칙 선택 (스텁)."""
|
||||
"""04단계: GT 프로필 + 전구간 EV 매칭 (04a~04d)."""
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from deepcoin.matching.match_rules import run_match_stub
|
||||
from deepcoin.matching.pipeline import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_match_stub()
|
||||
main()
|
||||
|
||||
11
scripts/04_simulation_report.py
Normal file
11
scripts/04_simulation_report.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""1단계: walk-forward·민감도·Go/No-Go 시뮬레이션 리포트."""
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from deepcoin.matching.simulation import run_simulation_report
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_simulation_report()
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""05단계: WLD 실시간 모니터 루프."""
|
||||
"""05단계: WLD 실시간 모니터 루프 (04 규칙 알림 포함)."""
|
||||
import argparse
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
@@ -8,4 +9,12 @@ runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
from deepcoin.ops.monitor_coin import MonitorCoin
|
||||
|
||||
if __name__ == "__main__":
|
||||
MonitorCoin(cooldown_file=None).run_schedule()
|
||||
parser = argparse.ArgumentParser(description="WLD 모니터")
|
||||
parser.add_argument("--once", action="store_true", help="1회만 출력 후 종료")
|
||||
parser.add_argument("--no-rules", action="store_true", help="04 규칙 평가 생략")
|
||||
args = parser.parse_args()
|
||||
mon = MonitorCoin(cooldown_file=None, check_rules=not args.no_rules)
|
||||
if args.once:
|
||||
mon.monitor_wld()
|
||||
else:
|
||||
mon.run_schedule()
|
||||
|
||||
22
scripts/06_execute_live.py
Normal file
22
scripts/06_execute_live.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
"""3단계: 실거래 (monitor_rules + 빗썸 주문). LIVE_TRADING_ENABLED=1 필수."""
|
||||
import argparse
|
||||
import runpy
|
||||
from pathlib import Path
|
||||
|
||||
runpy.run_path(str(Path(__file__).resolve().parent / "_bootstrap.py"))
|
||||
|
||||
from config import LIVE_TRADING_ENABLED, MONITOR_LOOP_SLEEP_SEC
|
||||
from deepcoin.ops.live_trader import LiveTrader
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="WLD 실거래 (06)")
|
||||
parser.add_argument("--once", action="store_true", help="1회만 실행")
|
||||
args = parser.parse_args()
|
||||
trader = LiveTrader()
|
||||
if not LIVE_TRADING_ENABLED:
|
||||
print("주의: LIVE_TRADING_ENABLED=0 — 주문 없이 dry_run 로그만")
|
||||
if args.once:
|
||||
trader.run_once()
|
||||
else:
|
||||
trader.run_loop(MONITOR_LOOP_SLEEP_SEC)
|
||||
@@ -7,10 +7,12 @@ python scripts/01_download.py
|
||||
python scripts/02_ground_truth.py
|
||||
python scripts/03_analyze_enrich.py
|
||||
python scripts/03_analyze_trades.py
|
||||
python scripts/04_match_rules.py # 스텁
|
||||
python scripts/04_match_rules.py
|
||||
python scripts/04_simulation_report.py # 1단계 Go/No-Go
|
||||
python scripts/05_run_monitor.py # 알림만
|
||||
python scripts/06_execute_live.py # 3단계 실거래
|
||||
python scripts/05_chart_truth.py
|
||||
python scripts/05_chart_bb.py
|
||||
python scripts/05_run_monitor.py
|
||||
python scripts/verify_env.py
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user