By Anora Mahmudova and Carla Mozee, MarketWatch

NEW YORK (MarketWatch) -- The U.S. stock market finished the volatile week with modest gains, helped by a bounce on the main benchmarks Friday.

Broad-based gains on the S&P 500 were led by technology and healthcare sector stocks, particularly biotechnology companies.

Investors focused on earnings reports from companies such as Google, Inc and Huntington Bancshares and brushed aside implications of a Malaysia Airlines jet crash in Ukraine and Israel's invasion of Gaza, which triggered a selloff on Thursday.

The S&P 500 (SPX) rose 20.1 points, or 1%, to 1,978.22. The Dow Jones Industrial Average (DJI) added 123.37 points, or 0.7%, to 17,100.18.

The Nasdaq Composite (RIXF) jumped 68.70 points, or 1.6%, to 4,432.15, as biotech and Internet stocks rallied sharply, after steep drops the day before. The iShares Nasdaq Biotechnology ETF rose 3%, while the Global X Social Media Index ETF rose 1.8%.

Equities on Thursday were rattled by news that 298 passengers were killed in a Malaysia Airlines crash in eastern Ukraine, where fighting between pro-Russian separatists and Ukrainian troops has been going on for months.

U.S. intelligence officials said the jet was shot down by a surface-to-air missile. Follow developments on Flight MH17 here.

Meanwhile, Israel launched an open-ended ground invasion of Gaza aimed at crushing Hamas militants after 10 days of aerial bombardment.

"Geo-political headlines dampen consumer sentiment, but this market has been remarkably resilient," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management. "Ultimately, this is an earnings-driven market and earnings so far have been encouraging, especially among large banks."

Investors had a muted reaction to a weaker-than-expected consumer sentiment report. Separately, the Conference Board's June leading-economic index rose in June, a sign that the economy could strengthen in the second half of the year.

Google rallies after earnings; AMD tumbles

Shares of General Electric (GE) closed 0.6% lower after the industrial conglomerate's second-quarter earnings met Wall Street's projection. GE also said it's targeting the IPO of its Synchrony Financial business for the end of July.

Huntington Bancshares Inc.(HBAN) climbed 4.8% after the regional bank's second-quarter profit rose 9%.

Google (GOOG) shares rallied 3.7%, after the Internet company late Thursday posted second-quarter revenue that beat Wall Street's expectation.

Shares of Advanced Micro Devices Inc. (AMD) tumbled 16% after the chip maker's second-quarter adjusted earnings missed analysts' projections. For more on today's notable movers, read our regular Movers and Shakers column.

In Asia, Japan's Nikkei Average fell 1% as investors sought the perceived safety of the Japanese yen. But the U.S. dollar (USDJPY) eventually pared its losses against the yen. European stocks slid on the geopolitical tensions, and Russia's MICEX dropped 1.3%.

In the commodities market, the safe-haven benefits for gold(GCQ4) faded on Friday, with the precious metal dropping in electronic trading, as a lack of physical follow-through made that upward move unsustainable, according to analysts.

Crude-oil futures(CLQ4) settled marginally lower Friday.

More must-reads from MarketWatch:

A glimpse of lives lost on Flight MH17

We're in the third biggest stock bubble in U.S. history

Brokerages don't want to put your interests first

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

GE Aerospace (NYSE:GE)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more GE Aerospace Charts.
GE Aerospace (NYSE:GE)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more GE Aerospace Charts.