(Bloomberg) -- Major technology and internet stocks have rallied throughout this year, with July the latest in a lengthy streak of monthly gains. 

The Nasdaq 100 Index rose 3.8% this month, its fifth straight monthly gain. This represents its longest such stretch since August 2020. It has risen 44% in 2023, with excitement surrounding artificial intelligence a primary driver behind the gains. 

The index is heavily weighted toward megacap internet and technology stocks, which have led the market higher over the year. Quarterly results out of the sector — including from stocks like Alphabet Inc. and Meta Platforms Inc. — have underlined how big tech continues to offer robust fundamentals.

“We continue to expect global tech earnings growth to turn more positive in the second half and potentially grow by low teens next year,” wrote Solita Marcelli, chief investment officer Americas at UBS Global Wealth Management. However, she adds that “given the strong year-to-date performance and elevated valuations in global tech, we expect volatility in tech stocks to remain elevated in the near term.”

Apple Inc. is the biggest component of the Nasdaq 100, comprising nearly 12% of the index weight. The iPhone maker rose 1.3% over the month of July, making for its seventh straight positive month, its longest since 2014. The stock is up more than 50% this year. 

The next test for Apple will come later this week, when it reports its third-quarter results on Aug. 3. Amazon.com Inc. is also due to report on the same day. The e-commerce and cloud-computing company is another megacap that has been on a lengthy streak. Shares of Amazon rose 2.6% this month, its fifth straight monthly gain and longest since 2018. 

The stock has risen nearly 60% in 2023.

Perhaps most notably, Meta Platforms rose 11% in July, in its ninth straight positive month. This is the longest streak of monthly gains on record for the Facebook parent, which last week reported strong quarterly results and gave a bullish forecast.

The gains haven’t been limited to US stocks. The Nasdaq Golden Dragon China Index rose 20% this month, with July its biggest monthly gain since November. Among major gainers, PDD Holdings rose 30% this month while JD.com Inc. rose 21%; the pair represent the two biggest percentage gainers among Nasdaq 100 components in July.

(Updates to market close.)

©2023 Bloomberg L.P.