Stocks finish higher, boosted by energy; Syria worries weigh

Stocks finished in positive territory Wednesday, reversing two-straight sessions of losses, as the energy sector jumped on rising oil prices amid speculation of a U.S.-led military strike on Syria.

(Read more: Gartman's trade of the moment on the Syrian crisis)

"The market was somewhat impervious to the geopolitical risk that was out there and now it's come home to roost I think you want to watch both oil and gold," said Art Cashin, director of floor operations at UBS Financial Services. "We're playing a game of headline roulette here…you really don't know. The difficulty is that once events begin to take place, they can accelerate and that becomes a problem."

S&P 500

The Dow Jones Industrial Average climbed 48.38 points to finish at 14,824.51, led by Hewlett-Packard and Chevron.

The S&P 500 advanced 4.48 points to end at 1,634.96. The Nasdaq rose 14.83 points to close at 3,593.35.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, slid below 17.

Among key S&P sectors, energy rallied, while interest rate-sensitive areas including consumer staples and telecoms dipped.

"You've got to be a little nervous here—the interest-sensitive sectors of the economy are showing signs of weakness," said Ethan Harris, co-head of global economic research at Bank of America/Merrill Lynch. "I think a fair reading of the data is not that things are collapsing, but we're still stuck in the mid in this 2-percent economy."

Major averages have stumbled in the last two days amid escalating concerns over Syria. The United States and its allies geared up for a probable military strike against Syria in response to a gas attack that killed hundreds of civilians in a rebel-held suburb of Damascus.

Senior U.S. officials told NBC News the U.S. could launch missile strikes on Syria "within days." President Barack Obama and his officials have conducted a flurry of international consultations this week on how to respond to a alleged chemical weapons attack by Syria on its own citizens.

(Read more: 'Broken market'? Whythere's more trouble ahead)

Senator John McCain told CNBC the crisis in Syria is turning into a regional conflict with the potential for major economic consequences.

Fears and uncertainty over Syria propelled oil prices to its highest level in nearly two years, while safe haven gold spiked to hit a 3-1/2 month peak. Energy company Marathon Oil led the S&P 500 gainers. Hess and BP also traded higher.

Worries over Syria coupled with the recent string of tepid economic reports have raised questions as to whether the Federal Reserve will really start dialing back its asset purchases at next month's meeting.

"I think that the tapering case has been weakening pretty fast in the recent weeks," said Harris. "I think you can argue for tapering on the grounds that it's only a technical adjustment...but the fundamental case for a Fed exit is very weak at this point."

On the economic front, pending home sales declined 1.3 percent in July, according to the National Association of Realtors. And weekly mortgage applications fell for a third-straight week as average rates hit their highest level in 2013, though demand for purchase loans increased, according to the Mortgage Bankers Association.

Among earnings, Joy Global tumbled to lead the S&P 500 laggards after the mining equipment maker posted a decline in quarterly orders and warned of sharply lower revenue.

Williams-Sonoma posted quarterly results that topped Wall Street expectations but shares edged lower after the kitchenware retailer reported current-quarter earnings and revenue fell short of estimates. The company was expected to report earnings after the closing bell.

Facebook crossed above $40 a share after an encouraging report from eMarketer that said the social-networking giant is poised to capture nearly 16 percent of the mobile ad market this year, up from 5 percent in 2012.

Treasury prices extended their losses after the government auctioned $35 billion in five-year notes at a high yield of 1.624 percent. The bid-to-cover ratio, an indicator of demand, was 2.38, versus a recent average of 2.74.

(Read more: 'Time running short'for 'new normal': El-Erian)

—By CNBC's JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)

Coming Up This Week:

THURSDAY: GDP, jobless claims, corporate profits, natural gas inventories, 7-yr note auction, Fed's Lacker speaks, Fed's balance sheet/money supply, Fed's Bullard speaks, AMR hearing, weekly rail numbers; Earnings from Campbell Soup, Pall,, Splunk, Krispy Kreme
FRIDAY: Personal income & outlays, Fed's Bullard speaks, Chicago PMI, consumer sentiment, farm prices

What's Trending on