Skip to content

Commit

Permalink
More debug
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Jan 30, 2025
1 parent 8bc051b commit 7571205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tradeexecutor/analysis/trade_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ def calculate_summary_statistics_for_positions(
# Marked down means we may have never received any profits,
# it was closed to zero without any sells
if not position.is_marked_down():
assert realised_profit_usd is not None, f"Realised profit calculation failed for: {position}"
assert realised_profit_usd is not None, f"Realised profit calculation failed for: {position}. Marked down: {position.is_marked_down()}"

realised_profit_percent = position.get_realised_profit_percent()

Expand Down

0 comments on commit 7571205

Please sign in to comment.