Stocks snapped a three-day losing streak Thursday, with the S&P 500 finishing just below the 1,700 mark, buoyed by stronger-than-expected Chinese trade data and following a favorable jobless claims report.
The Dow Jones Industrial Average edged up 27.65 points to finish at 15,498.32, lifted by Microsoft and Caterpillar.
The S&P 500 gained 6.57 points to end at 1,697.48. And the Nasdaq rose 15.12 points to close at 3,669.12.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, finished below 13.
(Read more: S&P 1,900possible in 12 months: JPMorgan's Lee)
Most key S&P sectors ended higher, led by materials and consumer discretionary, while telecoms finished in the red.
Major averages have been dented this week amid uncertainty about when the Fed may start winding down its stimulus program. The Dow and S&P 500 have declined more than 1 percent each for the week. The Dow is poised to log its first weekly drop in seven weeks.
"For a significant move, we need to have some clarity on what the Fed is going to be doing—we need to get to the point where we know when the Fed will be tapering and see that things will be fine economically," said Paul Hogan, managing of the FAM Equity-Income Fund. "This becomes a little bit of a stock picker's market."
Most recently, Dallas Fed President Richard Fisher told German business newspaper Handelsblatt that the central bank should begin to taper its bond purchases in September, unless the economy worsens significantly, reiterating his comments from earlier this week.
Fisher's comments echo similar sentiments from other Fed officials. On Tuesday, Chicago Federal Reserve President Charles Evans and Atlanta Fed president Dennis Lockhart both said the initial taper in the central bank's asset purchase program could start as early as September.
"The drumbeat of Fed officials point to a possible tapering later this year and these comments likely had an impact on capping the market upside and leading to a bit of profit taking," said Michael Sheldon, chief market strategist at RDM Financial Group. "September and October have been more difficult months for the markets, so it would be reasonable for investors to be cautious … monetary policy and the Fed will move to the front burner and will be the market mover in the next couple of weeks."
Still, Sheldon noted that market internals have been "extremely positive" over the last several months.
"So unless we see the transports, small caps, and leadership groups like the financials and consumer discretionary falter, the benefit of the doubt is still with the bulls at this point," he said.
Meanwhile, investors cheered as China posted stronger-than-expected July trade figures, rebounding after a disappointing report in June, raising hopes that the world's second biggest economy may be stabilizing. Materials stocks including Cliffs Natural Resources, Newmont Mining and US Steel rallied following the report.
"July seems to reflect a return to a 'normal', relatively uninspiring trend," analysts from Moody's said in a note. "In other words, while the worst seems to be over, the upturn will be relatively flat."
(Read more: China market bounce: trend change or false alarm?)
Meanwhile, Japan's Nikkei extended losses after tumbling 4 percent in the previous session, after the Bank of Japan opted to leave monetary policy unchanged at the end of its two-day meeting. The dollar-yen traded near a seven-week low of 96.15.
CBS edged higher after the media company's executive said it has resumed negotiations with Time Warner Cable. Time Warner Cable's blackout of CBS programming is now in its seventh day.
JCPenney spiked to lead the S&P 500 gainers after hedge fund manager Bill Ackman wrote in a letter to the retailer's board that the company has started its search for a new CEO, replacing interim CEO Mike Ullman. Ackman is the largest shareholder in JCPenney and has a seat on the retailer's board.
In the letter, Ackman also expressed his frustration that the search process is not going fast enough, adding that he wants a new CEO to be installed within 30 to 45 days. In addition, Ackman said he has asked former JCPenney CEO Allen Questrom to return as the company's chairman.
McDonald's ticked higher after the fast-food giant posted July same-store sales that rose 0.7 percent, edging past expectations, as stronger-than-expected sales in the U.S. helped offset weakness in Europe.
(Read more: Food prices couldkeep falling as crops boom)
Among retailers, L Brands rallied after the parent company of Victoria's Secret and Bath & Body Works posted same-store sales that rose 3 percent in July and lifted its second quarter earnings guidance.
Costco posted July same-store sales that rose 4 percent, but still missed expectations, hurt by a stronger dollar.
Aeropostale slumped after the teen apparel retailer said same-store sales in the second quarter plunged 15 percent and the company now sees a second-quarter loss of between 23 cents a share and 25 cents a share, versus Wall Street estimates for a loss of 17 cents a share. Adding to woes, teen specialty apparel store Zumiez posted a weaker-than-expected 0.8 percent gain in July same-store sales. Roth Capital cut its price target on Zumiez to $32 a share from $36.
And earlier this week, rival teen clothing retailer American Eagle Outfitters said its second-quarter profit will likely be less than half of what Wall Street was expecting, citing weak sales and lower margins.
Among earnings, Groupon spiked nearly 25 percent after the daily-deals website named co-founder Eric Lefkofsky its CEO and reported a record quarter for its North American business. In addition, the firm announced a $300 million share buyback program. At least eight brokerages lifted their price targets on the company.
Tesla surged after the electric-car maker posted earnings and revenue that blew past Wall Street expectations. In an earnings calls, CEO and founder Elon Musk said a compact electric sedan model due in 2016 is expected to have a 200-mile range per charge. At least five brokerages boosted their price targets on the firm.
(Read more: Half of small carsfail on tougher US crash tests)
Orbitz soared nearly 20 percent after the travel website posted topped earnings expectations and handed in a full-year revenue guidance that beat estimates.
Beam posted quarterly results that exceeded expectations and announced a stock buyback program of up to 3 million shares. The company also reiterated its full-year earnings target.
Lions Gate Entertainment, Nvidia and Priceline.com are among notable companies slated to report quarterly results after the closing bell.
Approximately 90 percent of S&P 500 companies have reported second-quarter results so far, with 67 percent of firms topping earnings estimates and 54 percent exceeding revenue forecasts, according to the latest data from Thomson Reuters. If all remaining companies report earnings in line with estimates, earnings will be up 4.5 percent from last year's second quarter.
On the economic front, weekly jobless claims ticked up 5,000 to a seasonally adjusted 333,000 last week, according to the Labor Department, but still remained near its lowest level since the recession. Economists polled by Reuters had expected first-time applications to rise to 336,000 last week.
The government auctioned $16 billion in 30-year bonds at high yield of 3.652 percent. The bid-to-cover ratio, an indicator of demand was 2.11, versus a recent average of 2.55.
In Europe, shares staged a mild recovery following the Bank of England's press conference, at which governor Mark Carney outlined his plans to link interest rates to unemployment.
—Follow JeeYeon on Twitter: @JeeYeonParkCNBC
First published August 8 2013, 1:51 PM