Update (replace) calcProfitLoss with more efficient code

Signed-off-by: Mark Tompkins <mtompkins@firmusgrp.com>