Selling a stock at a loss can offset other capital gains, but there are rules to follow. Wash-sale rules disallow tax loss claims if identical stocks are bought 30 days before or after the sale. To ...