The Nasdaq Composite reversed course to close in positive territory on Wednesday, driven by a sharp rally in software stocks that offset weakness in the semiconductor sector.

The index had been under pressure earlier in the session before the rotation in buying interest helped stabilize the market.

The divergence highlights a shift in investor sentiment within the technology complex.

While chipmakers faced selling pressure, software companies attracted capital, lifting the broader index.

This intra-sector rotation suggests investors are selectively positioning for growth rather than betting on the entire tech complex uniformly.

The move follows a period of volatility for US equities, with markets reversing early caution to close higher in recent sessions.