The wash-sale rule was designed to discourage people from selling securities at a loss simply to claim a tax benefit. ... If you end up being affected by the wash-sale rule, your loss will be disallowed and added to the cost basis of the securities you repurchased.