why gain is negative and profit is positive?