The Dow rose three quarters of a percent. The S&P 500 added more than a percent, while the tech-heavy Nasdaq ended the session with 2% gain.

Investors felt renewed enthusiasm for tech stocks ahead of earnings from Microsoft and Tesla this week.

But the momentum may be short-lived, said James Demmert, founder and chief investment officer at Main Street Research.

"I think that the Microsoft, Tesla, IBM earnings are something that people should focus on and everything next week. I mean, there's got to be half the S&P 500 reporting in the next two weeks. And this is the, sort of, we're going to find out if these the canaries in the coal mine. You know, Microsoft just had a big layoff. I think what you're going to see from the Teslas, the IBMs, the Microsofts, is they're going to probably maybe miss the numbers, even though estimates have been lowered. What we've been seeing, particular in technology, is they're still not making them. And I think, more importantly, not just the announcement of the earnings, it's the guidance. You know, what are these CFOs, CEOs saying on these calls, which our team listens to? And I think there's where you're going to start to hear that concern; 'Hey, we're worried about what's going to happen this quarter or next, hence we're laying people off.' A lot of this is very much what you see in the last phase of the bear markets and sort of getting close to a tougher economic climate."

Shares of Microsoft rose about a percent ahead of earnings set for Tuesday.

And shares of Tesla surged more than seven and a half percent ahead of earnings scheduled for Wednesday.

CEO Elon Musk took the stand again on Monday in his fraud trial related to a tweet saying he had backing to take the electric car company private, a deal that never materialized.

Shares of Baker Hughes fell about one and a half percent after the energy company missed quarterly profit estimates due to inflation pressures and ongoing disruptions due to Russia's war on Ukraine.

And cloud-based software firm Salesforce jumped 3% following news that activist investor Elliot Management has taken a multi-billion dollar stake in the company.