US Markets

Stocks end with weekly gains as Ukraine tensions ebb

A trader works on the floor of the New York Mercantile Exchange.
Getty Images

U.S. stocks rose on Friday, with the S&P 500 rebounding after its largest drop in three months, as investors drew cheer from the latest round of corporate earnings and found solace in the view that geopolitical tensions appeared contained.

"As tragic as it is, it is probably not something that is going to proliferate," said Matthew Kaufler, portfolio manager at Federated Investors of the airliner crash that came a day after the United States and the European Union strengthened sanctions on Russia.

Running not-so-scared: Investors are dumping risk

Google climbed after the Internet search engine tallied second-quarter results; IBM rose after the technology company posted quarterly earnings that topped expectations. AbbVie rose after the drug maker agreed to purchase Shire. General Electric turned lower as the conglomerate planned an initial public offering of its credit-card business.

"Cyclical-oriented industrials should post pretty good results. Valuations are reasonable; I don't think they are cheap, but I don't think they are dear either," Kaufler said.

Don't get out of the market, but be defensive: Pro

Friday's "gains are related to earnings that are better than expected from companies like Google and GE, and second, after the worries due to the downing of the airliner and invasion of Gaza, the fact that there is no escalation is being taken as a good sign," said Kate Warne, an investment strategist at Edward Jones.

On Friday, President Barack Obama said at least one American was among the 298 people who died in Thursday's downing of a Malaysian passenger plane at the Ukraine-Russia border. The the investigation of the crash must be credible, Obama said.

Read MoreTime and Money explain why Malaysia Airlines MH17 was flying over Ukraine

Separately, Israel on Thursday announced a ground offensive in Gaza, with Obama saying in his statement Friday that he strongly supported Israel's right to defend itself.

"It's disappointing that both of these conflicts have worsened, but it doesn't seem that either is escalating," said Warne.

A day after surging 32 percent, its biggest jump in more than a year, the CBOE Volatility Index .VIX on Friday fell 17 percent to 12.06, with the gauge of investor uncertainty well below historical norms.

Major U.S. Indexes

The Dow Jones Industrial Average rose 123.37 points, or 0.7 percent, to 17,100.18, up 0.9 percent on the week, with Johnson & Johnson leading blue-chip gains that extended to 28 of 30 components.

The rose 20.10 points, or 1 percent, to 1,978.22, tallying a 0.5 percent rise from last Friday's finish, with health care and technology the best performing among its 10 major sectors, all of which advanced.

The Nasdaq gained 68.70 points, or 1.6 percent, to 4,432.15, scoring a 0.4 percent weekly gain.

For every share falling, five gained on the New York Stock Exchange, where nearly 758 million shares traded. Composite volume approached 3.1 billion.

NTSB, FBI to send investigators to Ukraine

The dollar gained as did the 10-year Treasury yield, up 3 basis points at 2.482 percent.

Gold futures for August delivery shed $7.40 to $1,309.40 an ounce and crude-oil futures for August delivery declined 6 cents to $103.13 a barrel on the New York Mercantile Exchange.

Wall Street offered little reaction to economic reports on Friday that had leading indicators up 0.3 percent in June.

And, the Thomson Reuters/University of Michigan's initial July reading on consumer sentiment at 81.3, less than estimated.

"You've got about 150 S&P 500 companies reporting next week, and so far, this week, while dominated by financials, earnings in general have been pretty good," Dan Greenhaus, chief strategist at BTIG said on CNBC.

"I'm waiting for one of the themes that is driving the bull market to change. Right now, those themes have not changed," Greenhaus added.

U.S. stocks tumbled on Thursday, with the Dow falling back below 17,000, as investors fled equities and other risky assets after the crash of a passenger plane in Ukraine and as Israel launched a ground offensive in Gaza.

Read MoreStocks end sharply lower amid geopolitical unrest

Positive earnings boost Nasdaq