You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
I Luk Kim d387d567c5 fix: correct equity calculation — use market value, not unrealized PnL
equity was computed as cash + unrealized_pnl where unrealized_pnl =
(close - entry) × shares. Since cash already had entry cost subtracted,
this double-counted the cost basis:

  buggy:   equity = (initial - entry×shares) + (close - entry)×shares
                  = initial + close×shares − 2×entry×shares  ← WRONG

  correct: equity = cash + market_value
                  = (initial - entry×shares) + close×shares
                  = initial + (close − entry)×shares          ← RIGHT

This caused drawdown to spike to ~73% the instant a position opened
(e.g. TSLA $330 × 222 shares → equity appeared to drop from 100k to
27k), falsely triggering the kill switch at 25% and blocking all
subsequent entries.

Before fix: 3 trades, +0.08% return, 39.2% max drawdown (fake)
After fix:  10 trades, -2.63% return, 4.24% max drawdown (real)

Also: when bar data is missing, positions now use entry_price as
fallback market value instead of treating the position as worthless.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 months ago
apps fix: correct equity calculation — use market value, not unrealized PnL 5 months ago
configs fix: correct simulation loop and equity curve calculation after real-data testing 5 months ago
dev feat: implement Phase 3 -- LLM enrichment, labeler, review queue, dataset export 5 months ago
docker feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
libs fix: correct simulation loop and equity curve calculation after real-data testing 5 months ago
tests fix: correct simulation loop and equity curve calculation after real-data testing 5 months ago
.env.example feat: implement Phase 3 -- LLM enrichment, labeler, review queue, dataset export 5 months ago
.gitignore feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
.python-version feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
Makefile feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
alembic.ini feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
docker-compose.yml feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
pyproject.toml feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago