Stocks tried to claw back some gains on Wednesday, but the morning's rally fizzled as Nvidia and other megacap technology stocks sold off in the afternoon. Nvidia shares ended the day down 5.1%, while Tesla tumbled 4.

4%. Meta Platforms shed about 1.1%, while Microsoft slipped 0.

3%. All told, the tech-heavy Nasdaq Composite closed down 1.1% at 16,195.

81. The Dow Jones Industrial Average and the S & P 500 also ended the day lower. This week's steep sell-off of the market's reigning technology leaders could be a buying opportunity, if the U.

S. manages to skirt a recession, Morgan Stanley said. On the heels of Monday's pullback, analyst Erik Woodring argued that valuations for the group sit 30% off their 5-year trailing highs, 50% above their lows for that period and in-line with the average.

However, when adjusting for future earnings-per-share growth, the stocks trade at a 40% discount. "As a result, we'd conclude that while Mag 7 valuations still face significant downside valuation risk in a black swan or recession scenario, current Mag 7 valuations relative to future growth prospects are attractive after the recent drawdown," he wrote. As of Wednesday's close, the group is down about 8.

6% on average since the start of the month, underperforming both the S & P and Nasdaq. Investors have been rotating out of the sector in recent weeks, with the sell-off accelerating Monday on the heels of a weak July jobs report Friday and the unwinding of the yen "carry trade." AI darling Nvid.