Stocks opened higher on Tuesday after some of the largest U.S. companies reported strong quarterly earnings.