U.S. Markets close in 6 hrs 24 mins

US STOCKS-Wall St gains in 2014's first rally; healthcare leads

* U.S. trade deficit smallest in four years

* UnitedHealth jumps on upgrade, Netflix slides on downgrade

* JPMorgan falls; bank to pay over $2 bln in Madoff case

* Dow up 0.7 pct, S&P 500 up 0.6 pct, Nasdaq up 0.9 pct

By Ryan Vlastelica

NEW YORK, Jan 7 (Reuters) - U.S. stocks climbed on Tuesday, putting the S&P 500 on track for its first positive session of 2014 as equities rebounded following a three-day decline.

A sharp decline in the U.S. trade deficit and upbeat German data added to the market's optimism as the data pointed to strengthening economic fundamentals in both the United States and Europe.

"We're getting a nice little snapback following a pretty soggy first couple of days, which created some anxiety because some people think that sets the tone for the year," said Nicholas Colas, chief market strategist of the ConvergEx Group in New York. "Volume and news remain light, but people expect this year to be positive so the negative start probably got a bit overdone."

All 10 S&P sector indexes rose for the day, led by the healthcare index, which gained 1.2 percent after Deutsche Bank upgraded the stock of UnitedHealth Group Inc to a "buy." Shares of UnitedHealth, a Dow component, jumped 4 percent to $77.17. Tenet Healthcare climbed 4.1 percent to $45.73 and was the S&P 500's biggest percentage gainer.

Community Health Systems Inc shares rose 2.9 percent to $43.14 a day after the company said the new U.S. healthcare law should give a slight boost to the company's 2014 earnings.

The S&P 500's gains follow a three-day losing streak, which came as traders took profits following 2013's huge rally that drove the benchmark index up nearly 30 percent.

Data showed U.S. exports hit a record high in November, while weak oil prices restrained import growth, resulting in the smallest U.S. trade deficit in four years. German unemployment unexpectedly fell in December on a seasonally-adjusted basis.

The Dow Jones industrial average was up 111.30 points, or 0.68 percent, at 16,536.40. The Standard & Poor's 500 Index was up 10.93 points, or 0.60 percent, at 1,837.70. The Nasdaq Composite Index was up 36.06 points, or 0.88 percent, at 4,149.74.

Shares of Google Inc hit a record high of $1,136.59. In early afternoon trading, the stock was up 1.4 percent at $1,133.03. JPMorgan, which has an "overweight" rating on Google, raised its target price on the stock to $1,305 from $1,100.

Economic activity may be hurt by a polar vortex - strong upper-level winds in the Northern Hemisphere that normally hover over the polar region - that has been pushed south to envelop a large part of the United States.

JPMorgan Chase & Co shares fell 1.3 percent to $58.26 after the largest U.S. bank holding company said it would pay more than $2 billion of penalties to settle charges by U.S. federal authorities that it failed to report suspicious activity involving Bernard Madoff's Ponzi scheme.

Netflix Inc was one of the day's biggest decliners, dropping 5.7 percent to $338.96 after Morgan Stanley downgraded the stock to "underweight."

On the upside, Micron Tech rose 3.9 percent to $21.48 after Roth Capital raised its price target on the stock by $4 to $25. The company is scheduled to release its quarterly results after the market closes on Tuesday.

In the pharmaceutical space, Neurocrine Biosciences soared 84.9 percent to $18.05 a day after it said its movement disorder drug showed a reduction in symptoms compared with a placebo in a mid-stage study. Stereotaxis shares jumped 16 percent to $4.65 following completion of a clinical trial.