* U.S. stocks rise in thin post-holiday trade
* Oil gains after No. 5 exporter UAE says to cut supplies
* Japan's Nikkei at 6-week closing high
By Daniel Bases
NEW YORK, Dec 26 (Reuters) - U.S. and Japanese stock prices gained in thin post-Christmas on Friday, as higher oil prices lifted energy stocks and auto shares rose as investors picked through the carnage amid the final days of a year many would like to forget.
Crude oil prices rose as No. 5 oil exporter United Arab Emirates cut production.
News that the financing arm of General Motors Corp. arm qualified for government funds boosted the shares of GM and automakers around the world.
Japanese shares closed at a six-week high, aided by a second day of gains for Toyota Motor Corp.
A dismal reading on the U.S. holiday shopping season, however, did not bode well for investors going forward.
"Everyone is hoping for a Santa Claus rally but you look at the underlying data and it's still weak," said Chip Hanlon, president of Delta Global Advisors, Inc. in Huntington Beach, California.
"Retailers are going to be horrendous and news from around the globe continues to weaken. This recession is global and it's deep and, more importantly, it's probably still deepening."
The U.S. dollar climbed versus a basket of currencies.
European stock and debt markets remained closed on Friday.
GM <GM.N> shares jumped 12.6 percent to $3.66 on Wednesday's decision by the the U.S. Federal Reserve to recognize the carmaker's financing arm, GMAC, as a bank holding company. GMAC can now access government lending programs.
"Things are still pretty ugly out there (in terms of sales) but in terms of GM possibly filing for bankruptcy, in my mind that's not going to happen. The reason I'm saying this is what they (the government) are doing with GMAC right now." said Erich Merkle, an auto analyst at consultant Crowe Horwath in Grand Rapids, Michigan.
Last week the White House threw U.S. automakers a $17.4 billion lifeline of emergency loans in an attempt to stave off a collapse that could jeopardize hundreds of thousands of jobs.
By the end of U.S. trade, the Dow Jones industrial average <
> rose 47.07 points, or 0.56 percent, to 8,515.55. The Standard & Poor's 500 Index <.SPX> gained 4.65 points, or 0.54 percent, to 872.80. The Nasdaq Composite Index < > climbed 5.34 points, or 0.35 percent, to 1,530.24.Energy-related shares gained on the higher oil prices. Exxon Mobil <XOM.N> rose 1.9 percent to $77.19.
U.S. financial shares were the laggards. The most actively traded U.S. share, Citigroup <C.N>, fell 0.7 percent to $6.73. JPMorgan Chase <JPM.N> lost 0.2 percent to $29.80.
Shares of Apple <AAPL.O> rose 0.9 percent to $85.81 after top global retailer Wal-Mart Stores Inc <WMT.N> will begin selling some models of Apple's popular iPhone on Sunday.
The S&P 500 stock index is down over 40 percent in 2008, its second worst performance on record after a 47.1 percent drop in 1931.
JAPAN GAINS AMID GLOOM
Japanese share prices rose to a six-week high. The benchmark Nikkei 225 index <
> gained 140.02 points or 1.63 percent to close at 8,739.52.A second day of gains for battered carmaker Toyota <7203.T> helped lead the way, rising 1.93 percent to 2900 yen. Its shares hover above 5-1/2 year lows.
Year-end portfolio window dressing overcame a record 8.1 percent plunge in November industrial production. Core inflation fell faster than forecast, putting the country on course for its second spell of deflation this decade.
The data on deflation plus month-end buying from pension funds drove government bonds higher and pushed the 20-year yield to a five-year low of 1.755 percent, down 6.5 basis points <JP20YTN=RR>.
"The Japanese economy is unlikely to bottom out until October-December next year as output is expected to remain very weak until then," said Naoki Iizuka, senior economist at Mizuho Securities.
Japanese Economics Minister Kaoru Yosano told Reuters in an interview that Tokyo may take more fiscal spending measures if economic conditions worsen further, on top of a stimulus package totaling 75 trillion yen ($829 billion).
Germany said it would likely limit to 25 billion euros ($34.97 billion) a second package of economic stimulus measures, with a focus on investment projects and some consumption incentives, government sources told Reuters.
Benchmark 10-year U.S. Treasuries gained on a safe-haven bid, rising 15/32 of a point in price, pushing the yield down to 2.1367 percent <US10YT=RR>.
The U.S. dollar rose 0.33 percent to 80.982 <.DXY> against a basket of major trading-partner currencies. The greenback rose 0.33 percent to 90.69 against the yen <JPY=>. However, the euro rose 0.29 percent to $1.4053 <EUR=>.
Crude oil prices rose $2.36, or 6.68 percent, to settle at $37.71 a barrel <CLc1>. The UAE's production curbs comply with last week's output cut by OPEC of 2.2 million barrels per day, the cartel's biggest ever.
Gold climbed $23.45 an ounce or 2.78 percent to $867.45 <XAU=>. (Additional reporting by Eric Burroughs in Hong Kong; Aiko Hayashi and Osamu Tsukimori in Tokyo; Soyoung Kim in Detroit; Walden Siew, Chris Reese, Vivianne Rodriques and Leah Schnurr in New York; Editing by Leslie Adler)