* Global stocks rally as oil prices slide; banks soar
* Oil prices extend two-week decline on U.S. inventory
* Bonds fall as traders unwind safe-haven gains
* Dollar extends gains as stocks surge, oil prices fall (Recasts throughout with U.S. market focus, adds byline; dateline previous LONDON)
By Herbert Lash
NEW YORK, July 23 (Reuters) - Global stocks rose on Wednesday in a broad rally driven by a strengthening dollar, sliding oil prices and a surge in bank stocks in anticipation of a bailout in the slumping U.S. housing finance sector.
Oil fell for a second straight session after a U.S. government report showed larger-than-expected increases in inventories of gasoline and distillates.
Sliding oil prices and rising stock markets combined to cut any flight-to-safety bids for U.S. and euro zone government debt, leading bond prices to fall.
The drop in oil and improving confidence in the battered U.S. financial sector helped the dollar rally to a one-month peak against the yen and a two-week high against the euro.
Investors snapped up shares and bonds of mortgage finance companies Fannie Mae <FNM.N> and Freddie Mac <FRE.N>, which would receive an emergency government lifeline under a bill President George W. Bush was expected to sign into law.
Concerns about the health of the two companies, which own or guarantee almost half of the $12 trillion in U.S. mortgage debt outstanding, had weighed on financial markets and dashed hopes for quicker recovery in battered U.S. housing market.
"Congress is planning on passing this housing bill today and the president said he was going to sign it," said Ronald Simpson, managing director of global currency analysis at Action Economics in Tampa, Florida.
"While it's not a fix to the problem, it certainly is going to allay some fears at least for the short term," he said.
Shares of Freddie Mac jumped 10 percent to $10.65, while Fannie Mae climbed 15 percent to $15.40.
Banks shares also rose, but pared gains by midday.
"Financials are leading the market place up and they continue to be strong right across the board," said James Rosenthal, head trader at Punk Ziegel & Company in New York.
"The housing rescue package is certainly helpful for the banking industry as well. Fannie Mae and Freddie Mac paper doesn't need to be marked down."
Before 1 p.m., the Dow Jones industrial average <
> was up 10.83 points, or 0.09 percent, at 11,613.33. The Standard & Poor's 500 Index <.SPX> was up 5.26 points, or 0.41 percent, at 1,282.26. The Nasdaq Composite Index < > was up 11.80 points, or 0.51 percent, at 2,315.76.European shares rose more than 2 percent as banks enjoyed their best day in four months, while automakers gained on strong earnings and a fall in crude oil.
Banks, which are still down 30 percent so far this year, recorded their biggest one-day gain since mid-March with the DJStoxx European banking index <.SX7P> soaring 6.2 percent.
HBOS <HBOS.L> rallied 16.8 percent on trader speculation that Spain's BBVA <BBVA.MC> had cast an acquisitive eye on the British lender. Both banks declined to comment.
Other big advancers included Barclays <BARC.L>, up 11.8 percent, Credit Agricole <CAGR.PA>, up 7.4 percent, and Credit Suisse <CSGN.VX>, up 7.1 percent.
The FTSEurofirst 300 index <
> of top European shares closed 2.1 percent higher at 1,188.99 points.Oil fell. The U.S. Energy Information Administration (EIA) said gasoline stocks rose by 2.9 million barrels last week against forecasts of a 300,000 barrels build.
"This looks like another pretty bearish report with a large build in distillates and gasoline ... People are not driving as much, it looks like consumers are slowing demand," said Rob Kurzatkowski, futures analyst at OptionsXpress in Chicago.
Gold fell more than 2 percent as the dollar climbed to its firmest level since July 10 against the euro, denting the precious metal's appeal as a currency hedge.
A combination of weaker oil prices, declines in the price of other commodities, improving credit market and the belief that the Federal Reserve may be focusing more on inflation are working to push gold lower.
"Gold has four major things hitting it today so I would be very suprised, given the way other commodities and financial markets are moving, if gold wasn't down," said HSBC analyst James Steel.
U.S. Treasury debt prices fell, taking benchmark yields to their highest in nearly a month, while euro zone government bonds fell for a sixth straight session.
"The driver is a classic asset allocation/safe-haven flow idea whereby European equities are up ... exerting pressure on bonds," said John Davies, fixed income strategist at WestLB.
Lower oil prices have helped boost stocks and hurt bonds, under the premise that weaker energy prices will help to bolster consumer spending and the struggling U.S. economy.
The benchmark 10-year U.S. Treasury note <US10YT=RR> was down 14/32 to yield 4.16 percent. The 30-year U.S. Treasury bond <US30YT=RR> fell 24/32 to yield 4.71 percent.
The dollar rose against major currencies, with the U.S. Dollar Index <.DXY> up 0.34 percent at 72.712. Against the yen, the dollar <JPY=> was up 0.36 percent at 107.73.
The euro <EUR=> was down 0.51 percent at $1.5703.
U.S. light sweet crude oil <CLc1> fell 72 cents to $127.70 a barrel.
Spot gold <XAU=> fell $18.20 to $926.80.
An easing of risk aversion also was seen in Asia, where Japan's Nikkei share average <
> rose 1 percent to a two-week high. The Nikkei has posted back-to-back gains of at least 1 percent for the first time since April.Outside of Japan, shares in the Asia-Pacific region <.MIAPJ0000PUS> climbed 2.2 percent to their highest level in three weeks, according to an MSCI index.
Hong Kong's Hang Seng <
> rose 1.9 percent to a one-month high. (Reporting by Ellis Mnyandu, Chris Reese, Wanfeng Zhou in New York and Patrizia Kokot, Alex Lawler, Santosh Menon and Jan Harvey in London.) (Reporting by Herbert Lash. Editing by Richard Satran)