yes and no, up to $3K in stock losses can be used to offset
CD dividend(or your ordinary income) per year, so, you cannot claim $10K stock loss in one year, even if you earn $10K CD dividend in the same year. CD dividend is considered as income(with some exception).