Skip to content

docs: correct 2026-09-01 expiry report P&L to broker truth - #117

Merged
kunalrbhatia merged 2 commits into
developmentfrom
fix/expiry-report-2026-09-01-pnl
Sep 1, 2026
Merged

kunalrbhatia merged 2 commits into
developmentfrom
fix/expiry-report-2026-09-01-pnl

Conversation

@kunalrbhatia

Copy link
Copy Markdown
Owner

Summary

Correct the 2026-09-01 NIFTY expiry report P&L to broker-verified truth.

Why

The initial automated report (PR #116) showed +₹2046.85 PROFIT, but broker GET_POSITIONS shows the day was a LOSS. Root cause: the report generator whitelists symbols from positions.json, which was pruned/rebuilt mid-session (11:59 reconcile) — so the algo-traded 24000 CE (−6835.40) / 24000 PE (+4712.50) pair was excluded from the P&L. Adding those back:

  • Algo (smart-api) P&L: −₹76.05 (≈ breakeven)
  • Full NIFTY01SEP book: −₹1164.80 (includes niftyicif foreign legs −₹1088.75)

Change

  • Rewrote expiry-reports/expiry-NIFTY-2026-09-01.md with all 14 broker legs (not just the 8 whitelisted), corrected totals, and a prominent CORRECTION note.
  • Prettier-formatted.

Verification

  • Broker GET_POSITIONS (16:26 IST) per-leg values used verbatim.
  • Sum of all 14 legs = −₹1164.80 = broker total (exact match).
  • Algo subset (10 symbols) = −₹76.05.

Follow-up

  • The report generator's positions.json-whitelist gap (pruned legs missed) needs a fix: use GET_POSITIONS for the session's expiry + known algo symbols from the order book, not just current positions.json. Tracking as a separate item.

Kunal Bhatia added 2 commits September 1, 2026 16:28
… algo / -1165 book)

Initial automated report showed +2046.85 PROFIT but whitelisted only
positions.json symbols, missing the algo-traded 24000 CE/PE pair that was
pruned mid-session. Broker GET_POSITIONS truth: algo P&L -76.05,
full NIFTY01SEP book -1164.80 (incl. niftyicif -1088.75).
@kunalrbhatia
kunalrbhatia merged commit db2fe8f into development Sep 1, 2026
13 checks passed
@kunalrbhatia
kunalrbhatia deleted the fix/expiry-report-2026-09-01-pnl branch September 1, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant