qstrader icon indicating copy to clipboard operation
qstrader copied to clipboard

Simplified the calculation of total portfolio value in Portfolio

Open nme01 opened this issue 7 years ago • 1 comments

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.

nme01 avatar Oct 16 '17 09:10 nme01

Coverage Status

Coverage remained the same at 57.143% when pulling 8265881d6b5b15c4c27ef1fd670151b8d06c9a13 on nme01:master into dfa66932a882f38c5d172ee3d5e28871806f3ad1 on mhallsmoore:master.

coveralls avatar Oct 16 '17 09:10 coveralls