"We're seeing widespread sense of optimism about global economy," said Karl Schamotta, senior market strategist at Western Union Business Solutions.

At the same time, investors say stocks are being underpinned by the Federal Reserve, which has announced plans to keep interest rates low and maintain its current stimulus programs.

Bonds, meanwhile, were under pressure as investors gravitated towards more risky assets. The yield on the 10-year U.S. Treasury note rose to 2.3%, up from about 2% at the beginning of the week, as prices fell.

"We're seeing a lot of cash come off the sidelines," said Schamotta. "That's supportive of the equity market and the risk trade in general."

On Friday, the Dow Jones industrial average (INDU) fell 20 points, or 0.1%, to close at 13,233. The S&P 500 (SPX) edged up 1 point, or less than 0.1%, to 1,405. The Nasdaq (COMP) eased 1 point, or less than 0.1%, to 3,055.

For the week, the Dow and the S&P 500 both advanced 2.4%. The Nasdaq rose 2.2% over the last five trading days.

The S&P 500 and Nasdaq have posted weekly gains for five weeks in a row.

Friday's mixed trading came as investors digested reports on inflation, industrial production and consumer sentiment.

"Some of the economic news today was a bit disappointing, but none of it points to a change in direction," said said Peter Cardillo, market strategist at Rockwell Global Capital.

Meanwhile, options-related activity was adding to some of the choppiness.

Friday marks "quadruple witching," when four types of contracts expire -- those tied to market index futures, market index options, stock options and stock futures. While many traders try to settle out those contracts ahead of expiration, there is often some volatility on the actual day.