NEW YORK (CNNMoney) -- Stocks ended mixed Friday but the major gauges all posted gains of more than 2% for the week on rising hopes for the U.S. economy.
"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 () fell 20 points, or 0.1%, to close at 13,233. The S&P 500 ( ) edged up 1 point, or less than 0.1%, to 1,405. The Nasdaq ( ) 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.
Stocks finished higher Thursday, as investors welcomed a batch of better-than-expected economic news.
Higher gasoline prices were the biggest factor in the rise, accounting for more than 80% of the increase. The report showed consumer prices were up 2.9% year-over-year.
Industrial production was unchanged in February, according to data from the Federal Reserve. The report was expected to have shown an increase of 0.5%.
The University of Michigan Consumer Sentiment Index for March fell to 74.3 from 75.3 in February, according to a preliminary report. Economists had expected the index to have risen to 75.8.
Oil for April delivery rose $1.95 to settle at $107.06 a barrel.
Gold futures for April delivery eased $3.71 to end at $1,655.80 an ounce.
World markets: European stocks moved higher. Britain's FTSE 100 ( ) rose 0.3%, the DAX ( ) in Germany added 0.2%, while France's CAC 40 ( ) edged higher by 0.5%.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||4.09%||4.03%|
|15 yr fixed||3.25%||3.18%|
|30 yr refi||4.12%||4.07%|
|15 yr refi||3.29%||3.19%|
Today's featured rates: