The S&P 500 edged higher on Friday in its best week in three months as two slightly softer economic reports, although capping gains, were unable to shake the optimism over the economy that has helped drive stocks to near four-year highs.

The Dow bobbed between small losses and gains. If the blue chips finish in the black, it will mark the Dow's eighth day of consecutive gains and would be its longest such run in more than a year.

The benchmark Standard & Poor's 500 index has risen 2.3 percent this week in its best weekly performance since mid-December. Investors, buoyant over the economic outlook, have pushed the S&P above 1,400 to its highest level since May 2008 after a surge of almost 30 percent from its low in October.

The broad equity market here in the U.S. - as well as overseas - is an indicator of an improving U.S. economy as well as continued support from monetary authorities across the globe, said Chad Morganlander, portfolio manager at Stifel, Nicolaus & Co, in Florham Park, New Jersey.

Investors are surfing a huge wave of liquidity, he added. That wave will continue into the second half of next year.

The latest round of economic data, although softer than hoped, did little to dent that thesis.

The Thomson Reuters/University of Michigan's preliminary reading on the overall index on consumer sentiment slipped to 74.3 from 75.3 in February, shy of economists' forecasts for a gain to 76.0 as climbing energy prices pushed inflation expectations higher for next year.

Separate data on Friday showed factory output edged higher last month, despite a fallback in auto production. However, overall industrial output was flat, held back by a second straight monthly decline in mining activity.

The Dow Jones industrial average <.DJI> inched up 0.49 of a point, or unchanged on a percentage basis, 13,253.25. The Standard & Poor's 500 Index <.SPX> gained 2.14 points, or 0.15 percent, to 1,404.74. The Nasdaq Composite Index <.IXIC> gained 2.42 points, or 0.08 percent, to 3,058.79.

Elsewhere on the economic front, the Labor Department said its Consumer Price Index increased 0.4 percent last month after advancing 0.2 percent in January, matching expectations, while inflation pressure, measured by the core CPI excluding food and energy, remained subdued.

Credit Suisse analyst Andrew Garthwaite raised his year-end 2012 target on the S&P 500 to 1,470 from 1,400, noting equities are now 9 percent above their six-month moving average - but when this has happened, equities have typically risen by 7 percent over the following six months.

But some remained leery that equities could be ripe for a pullback as the CBOE Volatility Index or VIX <.VIX> remains near lows not seen since 2007.

You have to be careful because you can get lulled into complacency, and that is starting to happen now - it's not a question of if the market is up or down, it's how much is the market going to be up, said Joe Saluzzi, co-manager of trading at Themis Trading in Chatham, New Jersey.

This week marks the quarterly expiration and settlement of March equity futures and options, an event termed quadruple witching, which could increase volume and volatility.

Apple Inc rose 0.3 percent to $587.45 as its new iPad proved to be another hot seller on Friday, with hundreds lining up at stores across Asia to be the first to get their hands on the tablet computer.

Several banks, including Goldman Sachs Group , have shown an interest in buying American International Group Inc's complex and troubled assets tied to the insurer's bailout, the Wall Street Journal said, citing people familiar with the matter. Goldman Sachs lost 0.5 percent to $122.40, while AIG shares added 0.4 percent to $28.19.

(Editing by Jan Paschal)