Files
fxhnt/tests/unit
jgrusewski 110d1bd3b7 fix(bybit): missing-prior-mark 0-pnl (not full notional) + funding-cursor precision + flatten test (C2 final review)
Critical: a held symbol absent from PRIOR marks (rotated out of the crypto
universe then back in) was booking its FULL notional as P&L in
compute_crypto_exec_return, since a missing prior mark fell back to price 0.
Fix falls back to today's mark instead, so a missing prior mark yields 0 P&L
for that symbol this period. Also: document the accepted re-entry-day fee
gap, advance the funding cursor to the reconcile's funding-query timestamp
(no gap to the next period's funding_since), and strengthen the flatten
test to use a nonzero sleeve weight with equity=0, pinning that equity=0
alone flattens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 11:06:37 +02:00
..