Skip to content
JJong-03 edited this page Feb 27, 2026 · 24 revisions

Stock Backtesting Platform Wiki

레거시 동기식 백테스트 엔진을 한 줄도 수정하지 않고, Kubernetes Job 기반 비동기 아키텍처 + GitOps로 모더니제이션한 설계 문서.


Project Status

Phase 내용 Status
Phase 1 Containerization & Local Parity ✅ Completed
Phase 2 Kubernetes Runtime + Data Layer ✅ Completed
Phase 3 Web → K8s Job Orchestration ✅ Completed
Phase 4 Automation & GitOps (CI/CD) 🚧 In Progress
Phase 5 Observability Verification & Demo 📋 Planned
Phase 6 Documentation & Retrospective 📋 Planned

Non-Goals (Scope)

이 프로젝트가 의도적으로 다루지 않는 영역. 각 항목에는 근거가 있다.

  • 실시간 트레이딩 시스템이 아님 — 과거 데이터 기반 시뮬레이션만 수행
  • 멀티 테넌트 인증/인가(AuthN/AuthZ) 미구현 — 단일 사용자 포트폴리오 프로젝트
  • 대용량 데이터셋 최적화 미수행 — MVP 데이터 규모에서 이미지 내장으로 충분
  • SQLite는 로컬 개발 전용 — Production은 MySQL StatefulSet
  • Prometheus/Grafana는 Phase 5 optional — stdout/stderr 로깅이 마감 필수 요건
  • Helm/Kustomize 미사용 — raw YAML + GitOps로 투명성 확보
  • Candlestick chart / Intraday timeframe — Phase 2+ 선택적 UI feature
  • Alembic 등 마이그레이션 도구 미사용 — additive-only 스키마 정책

상세 근거 및 trade-off → Scope & Non-Goals


Start Here

문서 내용
Rulebook 프로젝트 비타협 규칙 10가지 공개 요약
Design Principles 아키텍처 원칙 — 규칙을 8가지 원칙으로 재구성
Execution Lifecycle 실행 상태 머신, K8s Job 규격, 생명주기 정책
Reproducibility 재현성 식별자, 데이터 공급 전략, 저장 경계

Architecture Overview

Architecture Overview


Core Modernization Strategy

flowchart TB
    A["Legacy Sync Engine<br/><span style='font-size:12px'>unchanged & validated</span>"]
    B["Containerized Engine<br/><span style='font-size:12px'>Docker image (immutable)</span>"]
    C["Kubernetes Job<br/><span style='font-size:12px'>1 backtest = 1 isolated execution</span>"]
    D["Async Orchestration<br/><span style='font-size:12px'>run_id + DB tracking</span>"]
    E["Stateless Web + MySQL<br/><span style='font-size:12px'>Source of Truth</span>"]

    A -- "Wrap (No Code Change)" --> B
    B -- "Submit per run_id" --> C
    C -- "Persist status/results" --> D
    D -- "Serve UI & /status" --> E

    classDef core fill:#ffffff,stroke:#111827,stroke-width:1px,color:#111827
    classDef emphasis fill:#ffffff,stroke:#111827,stroke-width:2px,color:#111827
    class A,B,D,E core
    class C emphasis
Loading

Wiki Navigation

Architecture

Execution & API

Data

Delivery & Ops

Product & Decisions

Clone this wiki locally