The Dow Jones industrial average rose 44 points to 13,988 as of 11:17 a.m. EST Friday. The Standard & Poor's 500 index was up six points at 1,516 and the Nasdaq composite rose 29 points to 3,192.
The trade deficit fell nearly 21 percent in December from November to $38.6 billion, as exports rose while oil imports plummeted, the Commerce Department said Friday. That's the smallest in nearly three years. The smaller trade gap means the economy likely performed better in the final three months of last year than first estimated last week.
"The trade balance was surprisingly very good," said Phil Orlando, chief market strategist at Federated Investors.
The government estimated last week that the U.S. economy contracted at an annual rate of 0.1 percent in the last three months of 2012. Orlando estimates that growth may now be revised to show growth of 0.5 percent.
Shares of LinkedIn, the online professional networking service, jumped $22.75, or 18 percent, to $146.70 after the company reported fourth-quarter results late Thursday that beat analysts' forecasts. Microchip Technology, a semiconductor maker, jumped $2.90 to $36.84 after its earnings beat estimates. The company said it was seeing "exceptionally strong" bookings.
Currently, analysts are expecting earnings for the fourth quarter of 2012 to rise 6.5 percent for S&P 500 companies, according to data from S&P Capital I&Q. That's an increase from the 2.4 percent growth rate recorded for the preceding quarter.
Wall Street is also bracing for what is forecast to be the largest winter storm in more than a year with up to 2 feet of snow forecast along the densely populated Interstate 95 corridor from the New York City area to Boston and beyond.
Markets are little changed for the week, suggesting that a rally that pushed the major indexes close to record levels early this year may have stalled.
The Dow had its best January in almost two decades and is up 6.9 percent on the year. The S&P 500 is 6.4 percent higher in the same period. A last-minute budget deal to avoid the "fiscal cliff" and optimism about the housing market and a gradually improving jobs market have powered the rally.
Stocks have benefited as investors poured a net $4.1 billion into stock mutual funds since the start of the year, according to data provided by Lipper.
As stocks have gained, Treasurys have slumped. The yield on the 10-year note rose, which moves inversely to its price, rose two basis points to 1.98 percent.
Among other stocks making big moves, Activision Blizzard, the video game maker that counts blockbuster "Call of Duty" among its titles, rose $1.84, or 15.4 percent, to $13.90. The company posted sharply higher earnings and revenue in the fourth quarter, surpassing Wall Street's expectations.