calculateGainLoss()