Expectations about the earnings season were muted prior to this week. Analysts expected S&P 500 earnings to have fallen by 2% in the fourth quarter, FactSet data showed.

So far, the earnings season is off to a solid start. Around 7% of S&P 500 companies have reported earnings thus far, according to FactSet data. Of those companies, 76.5% have posted better-than-expected earnings.

The S&P 500 jumped 0.8% to 3,316.81, breaking above 3,300 for the first time. The Dow Jones Industrial Average gained 267.42 points, or 0.9% to close at 29,297.64. The Nasdaq Composite advanced 1.1% to 9,357.13 as Microsoft hit record levels while Google-parent Alphabet's market cap topped $1 trillion for the first time.

Stocks rose on Thursday to fresh record highs after Morgan Stanley reported quarterly figures that easily topped analyst expectations while investors digested solid data on the U.S. economy.

Traders work on the floor of the New York Stock Exchange (NYSE) on the morning that online image board Pinterest Inc. makes its initial public offering on April 18, 2019 in New York City.

"Many, including us, are highlighting how stock prices have become expensive relative to their earnings," said Nick Raich, CEO of The Earnings Scout, in a note. "Market bulls said not to worry because earnings would eventually catch up to price. Are they correct? This week, and in early 2020, those bulls are correct."

Strong economic data also lifted sentiment on Wall Street. Weekly jobless claims unexpectedly dropped by 10,000 to 204,000. Economists polled by Reuters expected a print of 216,000. Meanwhile, retail sales climbed by 0.3% in December, matching expectations. The Philadelphia Federal Reserve business index also jumped to 17 in January from 2.4 in December.

Stocks closed well off their session highs on Wednesday after President Donald Trump and Chinese Vice Premier Liu He signed a "phase one" trade deal in Washington, D.C.

As a result of the deal, U.S. exports to China should in theory rise to $263 billion in 2020 and $309 billion in 2021. Both figures would represent a record-breaking acceleration of U.S. exports to China.

That said, China's other suppliers of agricultural commodities will not be impacted by the Sino-U.S. trade deal since buying will be based on market principles, Vice Premier Liu He said, according to a report from state-owned CCTV on Thursday.

"Phase one is behind us and it met market expectations," said Tom Essaye, founder of The Sevens Report, in a note. "Now the very real question of whether phase one results in an uptick in economic growth lies in front of us, and the truth is it's unclear. Nothing in phase one will specifically add much to global growth."

But Tom Martin, senior portfolio manager at GLOBALT, noted the fact that a deal was even signed is a "stake in the ground for actual de-escalation." of U.S.-China trade tensions.

"We now have a great deal of stability in a number of areas," said Martin. "Things that were not so stable midway through last year have stabilized. Trade with China is a good example."

—CNBC's Silvia Amaro contributed to this report.