Some better-than-expected earnings reports helped pushed markets higher Friday.

After a somewhat bumpy week, both the Nasdaq and S&P 500 logged their sixth straight week of gains. The Dow closed down slightly after topping the 14,000 hurdle a week ago.

The Dow Jones industrial average and the S&P 500 both rose between 0.3% and 0.5% Friday.

The Nasdaq jumped nearly 1% as investors liked what they saw from AOL and LinkedIn.

Markets have had a good run so far this year. The Dow and S&P 500 are both up nearly 7% and near their all-time highs, while the Nasdaq has gained nearly 6%.

AOL (AOL) shares surged 7%, after the web portal reported revenue growth for the first time in eight years. Fourth quarter profits were in line with expectations.

Shares of LinkedIn (LNKD) hit an all-time high, one day after the company reported a spike in membership. The online network targeted to professionals handily beat earnings and revenue estimates for the fourth quarter.

Apple (AAPL) closed up 1.4% after the company said it would consider additional ways to return cash to shareholders.

Related: Einhorn to Apple: Give us more cash!

Shares of credit ratings agency Moody's (MCO) fell 8% on worries that the government might sue the firm over its ratings of mortgage securities. Shares of Moody's and of McGraw Hill, the parent company of its rival Standard & Poor's, have dropped precipitously this week. On Friday, McGraw-Hill's (MHP) stock dropped another 3%.

Coinstar's (CSTR) stock tumbled 7%, after the company issued a weak outlook for the first quarter.

In economic news, the trade deficit shrank in December to $38.5 billion, down from $48.6 billion the previous month, according to the U.S. Department of Commerce.

Wholesale inventories for December dropped 0.1% compared to expectations that those inventories would rise 0.3%. Still that negative economic report did little to dampen investors' appetite for buying stocks.

European markets closed up between 0.5% and 1.4%, after European Union leaders agreed on a budget deal. An EU Council spokeswoman told CNN the deal was reached after marathon meetings in Brussels, Belgium.

Healthy growth in Chinese imports and exports last month also helped give global markets as lift, even as price pressures subsided.

Related: Fear & Greed Index hovers at "extreme greed"

Asian markets ended mixed. Japan's Nikkei lost 1.8%, amid worries voiced by Japanese Finance Minister Taro Aso that the yen has weakened more than the government had hoped. Hong Kong's Hang Seng added 0.2% and the Shanghai Composite increased 0.6% in the final day of trading before an extended Chinese New Year holiday.

Oil and gold prices rose slightly.

The yield on the 10-year Treasury note dropped slightly to 1.96%.

The U.S. dollar moved slightly higher against the euro, but lost ground against the British pound and the Japanese yen.