Skip to content

Commit

Permalink
Rename 'DayPnL%' to 'TotalPnL%'
Browse files Browse the repository at this point in the history
Why rename? There is already a value called 'DailyPnL' but its value is
unrelated to how we construct 'DayPnL%' so it looked confusing.

'TotalPnL%' is just the current (realized + unrealized) percentages
gains added together (which changes every day as IBKR removes old
execution profit results since the IBKR API only returns one or two days
of trade history before being lost forever).
  • Loading branch information
mattsta committed Jul 16, 2024
1 parent 50bebee commit 4556261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion icli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ def updateSummary(self, v):

# Also combine realized+unrealized to show the current daily total PnL percentage because
# maybe we have 12% realized profit but -12% unrealized and we're actually flat...
update["DayPnL%"] = (
update["TotalPnL%"] = (
update["RealizedPnL%"] + update["UnrealizedPnL%"]
)
case _:
Expand Down

0 comments on commit 4556261

Please sign in to comment.