Skip to content

Commit

Permalink
Formatting typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cciechad committed Apr 13, 2024
1 parent 9ec4f63 commit 03b59ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AnalyzeLots.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def by_symbol(data: DataFrame, symbols: list[str], is_long: Series, is_short: Se

def summary(data: DataFrame, is_long: Series, is_short: Series) -> None:
is_loss: Series[bool] = data['gain'] < 0
print(f"Total cost {format_dollar(total_cost :=data['cost'].sum())}")
print(f"Total cost {format_dollar(total_cost := data['cost'].sum())}")
print(f"Total value {format_dollar(total_value := data['value'].sum())}")
print(f"Total gain/loss {((total_value / total_cost) - 1) * 100:.3f}%")
print(f"Short term total value {format_dollar(data.loc[is_short, 'value'].sum())}")
Expand Down

0 comments on commit 03b59ae

Please sign in to comment.