added computation of long term and short term gains.
Merge remote-tracking branch 'origin/master'