summaryrefslogtreecommitdiff
path: root/docs/TODO.md
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 17:16:49 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 17:16:49 +0900
commit3c880c4de185aa44c3672687497aea269bbec220 (patch)
treecf3b673a69d6e259a722f43d15708938008c26ec /docs/TODO.md
parent8c11cae987292421840658585c0667706790c8ca (diff)
docs: update TODO — mark Critical, High, Medium as completed
Diffstat (limited to 'docs/TODO.md')
-rw-r--r--docs/TODO.md114
1 files changed, 32 insertions, 82 deletions
diff --git a/docs/TODO.md b/docs/TODO.md
index 26ff44b..9e24ac2 100644
--- a/docs/TODO.md
+++ b/docs/TODO.md
@@ -4,90 +4,37 @@
## Current State
-- 156 tests passing, lint clean
+- **243 tests passing**, lint clean
- 5 microservices + CLI + shared library
- 7 trading strategies (RSI, Grid, MACD, Bollinger, EMA Crossover, VWAP, Volume Profile)
- Operations infra: SQLAlchemy ORM, Alembic, structlog, Telegram, resilience, Prometheus
+- Edge case coverage, parameter validation, DB transaction safety
---
-## Critical (Deployment Blockers)
+## Completed
-### 1. Alembic Initial Migration 생성
-- `shared/alembic/versions/` 에 마이그레이션 파일이 없음
-- DB 스키마 생성 불가
-- **Fix:** `cd shared && alembic revision --autogenerate -m "Initial schema"`
+### Critical (Deployment Blockers) — All Done
+- [x] Alembic 초기 마이그레이션 (6 테이블)
+- [x] Docker Compose 헬스체크 포트 노출 (8080-8083)
+- [x] numpy 의존성 추가
-### 2. Docker Compose 헬스체크 포트 노출
-- 서비스들이 내부적으로 8080-8083 포트를 사용하지만 docker-compose.yml에 미노출
-- Prometheus 스크래핑 불가, 헬스체크 실패
-- **Fix:** 각 서비스에 `ports` + `healthcheck` 추가
- ```yaml
- data-collector:
- ports: ["8080:8080"]
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
- ```
+### High Priority — All Done
+- [x] CLI 명령어 구현 (backtest, strategy, portfolio, data)
+- [x] Backtester sys.path 해킹 제거 (STRATEGIES_DIR 환경변수)
+- [x] Integration tests (7개: strategy flow, order flow, portfolio, backtest)
+- [x] Dockerfile 의존성 정리 + PYTHONPATH 설정
-### 3. numpy 의존성 누락
-- `grid_strategy.py`, `volume_profile_strategy.py`가 numpy를 import하지만 `strategy-engine/pyproject.toml`에 미선언
-- **Fix:** `services/strategy-engine/pyproject.toml`에 `numpy>=1.20` 추가
+### Medium Priority — All Done
+- [x] Edge case tests (30개: zero volume, empty data, extreme values, reset, notifier)
+- [x] DB transaction rollback + transaction() context manager
+- [x] Portfolio snapshots (주기적 저장 + Telegram 일일 요약)
+- [x] Strategy parameter validation (41 tests, 7 strategies)
+- [x] VWAP division by zero 버그 수정
---
-## High Priority (Production 전)
-
-### 4. CLI 명령어 구현 완성
-- `trading backtest run` — placeholder 텍스트만 출력
-- `trading service up/down/logs` — 미구현
-- `trading portfolio show/history` — 미구현
-- 실제 서비스 호출 로직 필요
-
-### 5. Backtester sys.path 해킹 제거
-- `services/backtester/src/backtester/main.py`에서 `../../../../strategy-engine` 상대 경로 사용
-- 디렉토리 구조 변경 시 깨짐
-- **Fix:** 전략을 공유 패키지로 분리하거나 proper package import 사용
-
-### 6. Integration Tests
-- 현재 unit test만 존재 (mock 기반)
-- Redis/PostgreSQL 연동 테스트 없음
-- Docker Compose 환경에서의 E2E 테스트 없음
-- **필요:** `tests/integration/` 디렉토리에 서비스 간 통신 테스트
-
-### 7. Service별 pyproject.toml 의존성 정리
-- 각 서비스가 shared를 사용하지만 structlog, aiohttp 등 새 의존성이 각 서비스 Dockerfile에 반영되는지 확인 필요
-- Dockerfile에서 `pip install shared/` 시 transitive dependency로 해결되는지 검증
-
----
-
-## Medium Priority (Beta 전)
-
-### 8. Edge Case 테스트 추가
-- [ ] 0 볼륨 캔들 처리
-- [ ] 0으로 나누기 (VWAP에서 vwap==0)
-- [ ] 빈 캔들 리스트로 백테스트
-- [ ] 동시 시그널 처리 (같은 심볼, 같은 시간)
-- [ ] Redis/DB 연결 끊김 시 복구
-- [ ] Telegram API 장시간 실패
-
-### 9. Database Transaction 관리
-- 현재 각 DB 작업이 개별 commit
-- 에러 시 rollback 누락 가능
-- **Fix:** context manager 패턴으로 트랜잭션 범위 명확화
-
-### 10. Portfolio Snapshots 구현
-- `portfolio-manager`에서 주기적 스냅샷 저장 로직 미구현
-- spec에 `snapshot_interval_hours` 설정은 있음
-- **Fix:** asyncio 타이머로 주기적 DB 저장 + Telegram 일일 요약 연동
-
-### 11. Input Validation
-- CLI 입력값 검증 부족
-- 전략 YAML 파라미터 검증 없음 (음수 period 등)
-- **Fix:** Pydantic validator 또는 Click 타입 검증 추가
-
----
-
-## Low Priority (향후 개선)
+## Remaining — Low Priority (향후 개선)
### 12. Grafana Dashboard Provisioning
- Prometheus는 설정됨, Grafana는 빈 상태
@@ -121,16 +68,14 @@
- 자동 테스트 + 린트 + Docker 빌드
- 자동 배포
----
-
-## Estimated Effort
+### 19. Docker Compose E2E 테스트
+- 실제 Redis/PostgreSQL로 전체 파이프라인 검증
+- `docker compose up` 후 candle → signal → order 흐름 테스트
-| 카테고리 | 예상 작업량 |
-|----------|------------|
-| Critical (배포 차단) | 1-2시간 |
-| High Priority | 8-12시간 |
-| Medium Priority | 1-2주 |
-| Low Priority | 지속적 개선 |
+### 20. 보안 강화
+- /health, /metrics 엔드포인트 인증
+- API 키 암호화 저장
+- Rate limiting on all external APIs
---
@@ -147,7 +92,7 @@ pip install -e shared/
# 3. 인프라 실행
make infra
-# 4. DB 마이그레이션 (Critical #1 해결 후)
+# 4. DB 마이그레이션
make migrate
# 5. 테스트
@@ -158,4 +103,9 @@ make up
# 7. 모니터링 (선택)
docker compose --profile monitoring up -d
+
+# 8. CLI 사용
+trading strategy list
+trading backtest run --strategy rsi --symbol BTCUSDT --from 2025-01-01 --to 2025-12-31
+trading portfolio show
```