Stock indexes finished Tuesday close to where they started as technology companies and household goods makers rose. But weak reports from sporting goods and auto parts retailers left a lot of smaller companies with steep losses.

Dick’s Sporting Goods and Advance Auto Parts both disclosed disappointing second-quarter results and cut their annual forecasts, which affected a slew of other companies. Other retailers also dropped, including Home Depot, which posted strong results.

advertisement | advertise on newsday

Other groups of stocks managed modest gains.

“Especially in the month of August, when not as many investors are around, you get a lot of this group trading,” said Brian Nagel, analyst who covers retailers for Oppenheimer & Co.

Nagel said that if investors grow pessimistic about retail, they may sell all kinds of retailers when one part of the industry struggles.

The Standard & Poor’s 500 index lost 1.23 points, or less than 0.1 percent, to 2,464.61. The Dow Jones industrial average picked up 5.28 points to 21,998.99. The Nasdaq composite fell 7.22 points, or 0.1 percent, to 6,333.01. The Russell 2000 index of smaller-company stocks shed 11.07 points, or 0.8 percent, to 1,383.24. The S&P 600, an index of small-cap stocks, fell 1 percent.

Stocks were coming off their biggest one-day gain in more than three months as the market recovered from last week’s turmoil.