qstrader
qstrader copied to clipboard
Simplified the calculation of total portfolio value in Portfolio
The value of self.equity
is incremented by the position's P&L. In my opinion there is no need to calculate unrealised P&L once again, since there is already a field for that in the Position
class. The field is updated on each Position.update_market_value()
call.