Unfortunately not, except for certain reinvestments in qualified small business stock or empowerment zone business stock (see the Schedule D instructions for these special rollover rules). Apart from these exceptions, all of the gain on the sale of one stock must be reported even if other stock is purchased. The like-kind exchange rules do not apply to securities (stocks, bonds, notes, etc.).
Shifting income to a later year, such as where you defer taxable interest to the following year by purchasing a T-bill or savings certificate maturing after the end of the current year. Investments in qualified retirement plans provide tax deferral.