U.S. stocks closed higher for the third time in four days as a rally in tech, airlines and biotech firms helped lead gains.
"It's not a market that is being driven by divisive issues," said Peter Cardillo, chief market economist at Rockwell Global Capital. The broad gains are "a good indicator that geopolitical concerns just maybe might wane for the week."
The Dow Jones Industrial Average closed up 0.45 percent for the year, just short of its morning gain of more than 100 points, helped by a nearly 3 percent gain in Intel.
Dow transports rose 0.68 percent, to close 1.45 percent higher for the week, with airlines such as United Continental jumping more than 3 percent on low fuel prices as oil continued to trade near 13-month lows.
The S&P 500 hovered below 1,950 on retail pressures as most of its sectors rose in afternoon trading, led by gains in the biotechnology sector from Vertex Pharmaceuticals and Biogen. Telecoms was the only laggard.
"Tech and healthcare have been consolidating their gains and are leading the market higher," said Marc Chaikin, CEO of Chaikin Analytics, who saw the rally as more of a recovery from last week's decline. "The market has to prove itself and pass resistance in the 1,950-1,960 range."
Advances in pharmaceutical firms, Intel and Amazon pushed the Nasdaq to a gain of 1.02 percent in the close.
"In general healthcare is still reasonably priced and a lot of them are producing pretty good earnings," said Mark Coffelt, president of Empiric Advisors. "That's a great combination."
On Thursday comes the weekly jobless claims report, ahead of PPI and industrial production figures on Friday.
Earlier, business inventories in the United States rose 0.4 percent in June after gaining 0.5 percent in May, while retail sales for July were reported flat, missing estimates and the weakest reading since January.
Leading up to other retail earnings reports expected later this week, department store group Macy's reported an increase in profit but posted earnings that missed analyst estimates on Wednesday morning, which could put the spotlight on the major retailers.
Equipment maker Deere posted earnings that beat on revenue in line with estimates, while lowering its full-year forecast.
"When you talk retail, one does not necessarily mean the other," said Nick Raich, CEO of The Earnings Scout. "It's so company specific."
"With the consumer being such a large part in the U.S. economy, it's important that we see some kind of growth in the sector," said Art Hogan, chief market strategist at Wunderlich Securities. But "a good chunk of teen apparel is not publicly traded so it's difficult to set the tone for back-to-school [figures]."
Gasoline prices remained low, while a weekly U.S. report showed a decline in mortgage application volume despite lower mortgage rates and far less dramatic home prices than a year ago.
"All those things continue to add up to things which should be positive for the U.S. consumer," Raich said. "Overall we think retail is good, but relative to expectations."