diff --git a/qstrader/portfolio.py b/qstrader/portfolio.py index 6cb6b0ef..dba61212 100644 --- a/qstrader/portfolio.py +++ b/qstrader/portfolio.py @@ -39,9 +39,7 @@ def _update_portfolio(self): ask = close_price pt.update_market_value(bid, ask) self.unrealised_pnl += pt.unrealised_pnl - self.equity += ( - pt.market_value - pt.cost_basis + pt.realised_pnl - ) + self.equity += pt.unrealised_pnl + pt.realised_pnl def _add_position( self, action, ticker,