Stocks crept higher again in July as the S&P 500 index (^GSPC 1.17%) finished the month up 2.2%.

Enthusiasm for AI stocks continued with Nvidia and Microsoft crossing the $4 trillion mark, but they weren't the two best-performing stocks in the index.

A bull charging through a stock chart.

Image source: Getty Images.

1. Generac Holdings (up 36%)

Generac Holdings (GNRC 0.31%), a leading maker of backup power generators, was the S&P 500's top-performing stock last month, finishing up 36%.

The gains came entirely at the end of the month following a better-than-expected earnings report.

Revenue in the quarter rose 6% to $1.06 billion, ahead of estimates of $1.03 billion, with balanced growth in the residential, commercial, and industrial segments. Better-than-expected shipments lifted results.

On the bottom line, adjusted earnings per share in the quarter jumped from $1.35 to $1.65, well ahead of the consensus of $1.32. Management noted the company grabbed market share in the portable generator market and ramped up shipments of energy storage systems to Puerto Rico.

Generac also raised its net income margin guidance from 7.5% to 8.5% due to lower tariff assumptions, a clear positive for the company. It sees stronger free-cash-flow conversion under the "big, beautiful bill." 

2. Invesco (up 33.2%)

Invesco (IVZ 0.95%), the investment manager that may be best known for the Invesco QQQ Trust, was the second-best performer on the S&P 500.

Invesco's surge last month came as it filed with the SEC to change the QQQ ETF from a unit investment trust to an open-end fund, which would allow it to earn more revenue from the now-$352 billion fund.

The change would also allow it to reduce its annual expense ratio from 0.20% to 0.18%, benefiting investors.

TD Cowen called the move a "game-changing event" and upgraded the stock to a buy with a price target of $25. It's unclear how much Invesco would earn from the move, but given the size of the QQQ ETF and Invesco's market cap at just $10 billion, the tailwind could be substantial.