How to determine Basis / Gain