Skip to content

Commit

Permalink
refacto!: value to equity
Browse files Browse the repository at this point in the history
  • Loading branch information
MetzkerLior committed Jul 1, 2024
1 parent bb491d5 commit f9f67db
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bktest/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,12 @@ def __init__(

# TODO: change value to equity
@property
def value(self) -> float:
def equity(self) -> float:
return sum(
holding.market_price
for holding in self._holdings.values()
)

@property
def equity(self) -> float:
#return self.cash + self.value
return self.value

@property
def equity_long(self) -> float:
return sum(
Expand All @@ -48,7 +43,7 @@ def equity_long(self) -> float:

@property
def nav(self) -> float:
return self.cash + self.value
return self.cash + self.equity

@property
def symbols(self) -> typing.Set[str]:
Expand Down

0 comments on commit f9f67db

Please sign in to comment.