Hi Mikeyman,
Capital losses work as the offset to capital gains. When you make $4500 - you then take off the $4500 you lost. Then you claim 50% of the net positive or loss and if there is more negative you can carry it over. The one rule is you can not buy for 30 days after you sell.