Skip to content

Commit

Permalink
TaxCalculator: Fix calculation of gain/loss
Browse files Browse the repository at this point in the history
Fixes #31.
  • Loading branch information
tacgomes committed Jan 6, 2025
1 parent 9d1807f commit 6eaaf4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/investir/taxcalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def get_holdings_table(
weight: Decimal | None = None

if holding_value := holding2value.get(isin):
gain_loss = holding.cost - holding_value
gain_loss = holding_value - holding.cost
weight = holding_value / portfolio_value * 100

table.add_row(
Expand Down

0 comments on commit 6eaaf4f

Please sign in to comment.