US stocks rose slightly on Wednesday as Urban Outfitters and Target helped retailers rally.
Urban Outfitters and Target did better in the second quarter than analysts expected, and Target raised its forecasts for the year.
That helped companies that sell clothing and other retailers. Technology companies and firms that make and sell household goods also traded higher.
A wide variety of retailers saw their shares sink the day before based on weak earnings reports.
With Wal-Mart and Ross Stores in line to report their own results on Thursday, investors could change their minds again.
"This sector is not for the faint of heart," said JJ Kinahan, chief strategist for TD Ameritrade.
"The market is trying to figure out who the winners and losers are going to be."
He said turbulence for retailers will be a constant as online competition keeps growing and customers want more features like same-day delivery.
The Standard & Poor's 500 index picked up 3.50 points, or 0.1% to 2,468.11. The Dow Jones industrial average added 25.88 points, or 0.1%, to 22,024.87. The Nasdaq composite gained 12.10 points, or 0.2%, to 6,345.11. The Russell 2000 index of smaller companies inched up 0.30 points to 1,383.53.
Clothing and accessories retailer Urban Outfitters had a better second quarter than Wall Street expected, and analysts said there are some signs the company's business is recovering after years of struggles.
The stock rose 2.94 US dollars, or 17.5%, to 19.76 US dollars. Even with those gains, it is down 31% this year and recently traded at eight-year lows, far below its price of 45 US dollars a share in early 2015.
Target gained 1.96 US dollars, or 3.6%, to 56.31 US dollars. The company raised its annual estimates after it did better than analysts expected in the second quarter.
Stocks made bigger gains earlier in the day, but they slipped after a group of CEOs, including the heads of 3M and Campbell Soup, said they were leaving a manufacturing jobs group over comments about made by President Donald Trump about the racially charged violence in Charlottesville, Virginia this past weekend.
President Trump then tweeted that he is ending that council as well as a strategy and policy group.
The furore could create more obstacles for Mr Trump's pro-business agenda of tax cuts and infrastructure spending.
The Dow rose as much as 86 points earlier on.