Capital Gains and Losses: Classification, Netting Order, and Carryforwards