When purchasing securities there needs to be a parcel identifier linked to the cost per security so that when selling the securities this parcel identifier can be selected (multiple lines if more than one parcel involved) which will then calculate the realized gain for that transaction and report to the P&L Statement (sale total minus identified cost).