NEW YORK — Stocks extended their rally to a second day Wednesday after an upbeat employment report from payroll company ADP made investors cautiously optimistic about the government's upcoming July employment report. The Dow Jones industrial average rose more than 100 points.

Automatic Data Processing said private sector employment rose by 9,000 during this month. After seeing jobs disappear by the thousands in recent months, the stock market is eager for any insights into the Labor Department's take on the job market on Friday.

The Federal Reserve announced it was extending its emergency borrowing program for Wall Street banks, which reassured the market that investment banks won't suffer from liquidity problems. The central bank will also now allow commercial banks to bid on cash loans that last for 84 days, besides the 28-day loans that are now available. The original program allowing investment firms to turn to the Fed for a quick source of cash will now run through Jan. 30, having been extended from mid-September.

The latest overtures from the federal government, some of which had been expected, nonetheless helped lift investor sentiment.

Meanwhile, the price of oil rose after a weekly Energy Department report on domestic supplies showed a surprise increase. Oil's sharp drop Tuesday contributed to Wall Street's huge rally; light, sweet crude rose 55 cents to $122.74 on the New York Mercantile Exchange.

Alan Levenson, chief economist at T. Rowe Price Associates Inc., said Wall Street has started interpreting recent economic data more optimistically. And the decline in oil over the past two weeks — despite the turn higher Wednesday — is making investors more comfortable about stocks. Oil has fallen more than $20 since hitting a high above $147 on July 11.

"The decline in commodity prices, particularly oil, is helpful for the U.S. consumer and therefore the U.S. economy. The drag from food and energy prices has been Public Enemy No. 1 to most consumers for much of this year," he said.

In midmorning trading, the Dow rose 102.67, or 0.90 percent, to 11,500.23. On Tuesday, the Dow rose 266 points, more than wiping out a nearly 240-point loss from the previous session.

Broader stock indicators also rose. The Standard & Poor's 500 index advanced 12.24, or 0.97 percent, to 1,275.44, and the Nasdaq composite index rose 10.88, or 0.47 percent, to 2,330.50.

Bond prices fell after the Fed announced its plans and as stocks advanced. The yield on the benchmark 10-year Treasury note, which moves opposite its price, rose to 4.09 percent from 4.04 percent late Tuesday.

The dollar was higher against other major currencies, while gold prices fell.

Investors are still seeing restrictions on a type of trade that can exacerbate a stock's decline. The Securities and Exchange Commission on Tuesday extended a temporary restriction on short-selling of the stocks of mortgage finance companies Fannie Mae, Freddie Mac and 17 big investment banks. The SEC said the ban on "naked" short selling will go through Aug. 12 and won't be extended.

Short sellers used borrowed shares and profit by correctly betting that they will fall. "Naked" short sellers, however, don't borrow shares before they sell them and try to cover their moves after they've placed their bets.

The cap, put in place July 15 after a sharp drop in shares of Fannie Mae and Freddie Mac, helped calm the markets and drive a short-lived but substantial run-up in shares of financial companies.

The government-chartered mortgage companies, which together hold or back nearly half of all U.S. mortgage debt, rose on news of the Fed's latest moves. Fannie Mae advanced 32 cents, or 2.8 percent, to $11.92, while Freddie Mac rose 18 cents, or 2.3 percent, to $8.60.

Wall Street also received a mixed batch of quarterly reports from companies in a range of sectors.

Comcast Corp. said Wednesday its second-quarter profit rose 8 percent as cable TV rates rose and consumers ordered more digital and premium services. The results fell short of Wall Street's forecast. The stock rose $1.36, or 7.2 percent, to $20.32.

Northrop Grumman Corp. rose 74 cents to $68.28 after reporting that its second-quarter profit increased 8 percent on strong performance in the company's shipbuilding and aerospace segments.

Corning Inc. said its second-quarter earnings jumped on a one-time tax gain and strong demand for glass used in flat-screen televisions and computers. But the company issued a third-quarter sales forecast that missed Wall Street's target. The stock fell 82 cents, or 3.9 percent, to $20.50.

Office Depot Inc. rose 14 cents to $7.04 after the company posted a loss of $2 million in the second quarter, citing weak demand in North America. The office-supply retailer's results excluding items topped analysts' forecast.

Overseas, Japan's Nikkei stock average rose 1.58 percent. In afternoon trading, Britain's FTSE 100 jumped 1.97 percent, Germany's DAX index advanced 1.30 percent, and France's CAC-40 jumped 1.81 percent.

On the Net:

New York Stock Exchange:

Nasdaq Stock Market: