The  and Nasdaq Composite rallied on Tuesday to notch record closing highs as Wall Street cheered stronger-than-expected quarterly profits from some of the largest publicly traded U.S. companies.