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.
The broad index closed 0.9% higher at 2,933.68, topping its previous record close of 2,930.75. The S&P 500 also ended the day just below its intraday record of 2,940.91. The Nasdaq closed up 1.3% at 8,120.82. The Dow Jones Industrial Average, meanwhile, gained 145.34 points to close at 26,656.39 and was 1.1% from an all-time high.
Tuesday's move toward an all-time closing high comes less than six months after a sharp decline in late December, which led the S&P 500 to its worst annual performance since 2008. But stocks quickly turned around as the Federal Reserve reversed course on monetary policy while the tone around U.S.-China trade talks improved.
"These market levels are justified," said Kevin Barry, chief investment officer at Captrust Advisors. "The fourth-quarter sell-off actually prevented a recession because policymakers responded extremely quickly. Both President Xi and President Trump cooled off the rhetoric and Fed Chairman Jerome Powell came out and reversed course."
Dow members Coca-Cola and United Technologies reported better-than-expected quarterly earnings on Tuesday. Their shares rose 1.7% and 2.3%, respectively.
Twitter shares jumped 15.6% on its stronger-than-expected results. The social media company said its monthly active users totaled 330 million, more than a FactSet estimate of 318 million.
Defense giant Lockheed Martin also rallied more than 5% after its earnings easily topped expectations. The company reported strong operating margins across all its major businesses, which include aeronautics and missiles.
Procter & Gamble also posted stronger-than-forecast earnings, but its stock closed down 2.7%.
This is one of the busiest week of the corporate earnings season. Once the dust settles, more than 140 S&P 500 companies will have released their calendar first-quarter results.
So far, the results have largely topped expectations. More than 78% of the S&P 500 companies that have reported have surpassed analyst expectations, according to FactSet data.
"Among the key companies that have reported, most of them have beaten expectations," said Peter Cardillo, chief market economist at Spartan Capital Securities. "That means we're probably going to escape an earnings recession. That will be key for the market to rally from here."
Wall Street also kept an eye on oil prices as they hit their highest level this year amid intensifying concern about global supplies. It comes after the U.S. announced a further clampdown on Iran's oil exports.
The world's largest economy said Monday that from May 1, it would eliminate all waivers allowing eight economies to buy Iranian oil without facing U.S. sanctions.
—CNBC's Sam Meredith contributed to this report.