I would be careful selling and buying back immediately in order to claim a capital loss. That sounds an awful lot like a wash sale.