Stocks inched higher in choppy trade on Friday on optimism over the expected passage of an economic stimulus and government plans to shore up the housing market.

However, the market faced headwinds as financial sector shares declined after Britain's Lloyds Banking Group posted big losses, and also due to persistent worries about the effectiveness of the government's plans to rescue banks.

Among the top gainers were big manufacturers, which are among companies set to benefit from the $789 billion economic stimulus that the U.S. Congress is expected to approve later on Friday.

Boeing (BA.N) climbed more than 3 percent to $41.06, making the stock a top boost to the Dow, while Caterpillar Inc (CAT.N) climbed 2.5 percent to $31.76.

On Nasdaq, shares of big-cap technology companies, including chip makers Qualcomm Inc (QCOM.O) and Intel Corp (INTC.O) were among the top boosts. Qualcomm rose 2.2 percent to $36.33, as Intel climbed 1.8 percent to $14.25.

As far as the market is concerned, the S&P 500 is trying to hold the 800 level and it seems there are value investors who see inherent value in some of the blue-chip companies, said Cleveland Rueckert, market analyst at Birinyi Associates Inc, in Stamford, Connecticut. The hope is that the economy will start to turn around in the next 6-12 months.

The Dow Jones industrial average (.DJI) rose 29.95 points, or 0.38 percent, to 7,962.71. The Standard & Poor's 500 Index (.SPX) climbed 3.23 points, or 0.39 percent, to 838.42. The Nasdaq Composite Index (.IXIC) added 9.22 points, or 0.60 percent, to 1,550.93.

The U.S. Congress on Friday is expected to pass a $789 billion economic stimulus package that is aimed at unleashing large spending and tax cuts to help dig the economy out of a 14-month recession.

The Democratic-controlled House of Representatives and Senate are expected to approve the emergency package, giving President Barack Obama a political victory but falling short of his goal of broad Republican backing.