I can defer capital gains on sale of stock

Is there any way to defer capital gains on sale and reinvestment of stock similar to the 1031 exchange tax treatment of property sales and purchases?