* Stocks heading for rare plus month after huge annual losses
* Dollar gains against major currencies
(For winners and losers of 2008, double click [
])By Jeremy Gaunt, European Investment Correspondent
LONDON, Dec 31 (Reuters) - World stock markets closed out the year on Wednesday with some having registered their worst annual losses in history, although December looked set to end on a rare up note and there was some optimism about 2009.
Dollar was broadly higher while oil <CLc1> fell below $39 a barrel, a 60 percent loss for the year.
Global stocks as measured by MSCI <.MIWD00000PUS> were up slightly on the day, setting the stage for their first monthly gain in seven months.
Over 2008, however, they have fallen a record 43.7 percent, wiping around $14 trillion off the index, which is a major benchmark for global investors. The pan-European FTSEurofirst index <
>, meanwhile, was down around 45 percent for the year, although it was up 0.6 percent on Wednesday.Japan's Nikkei <
> closed the year on Tuesday, down 42 percent, the biggest annual drop in its 58-year history.Many investors, however, are hoping for a better year in 2009, somewhat reflected in December's performance.
"If there's any optimism, it's on the basis that stock markets recover in recessions," said Justin Urquhart Stewart, director at Seven Investment Management.
"Now we have the real recession, rather than the phoney recession. Last year we were so optimistic, that we were fooling ourselves. It's now gone too far the other way. We've discounted a huge amount of bad news."
The London Stock Exchange was to close at 1230 GMT and Euronext's Paris, Amsterdam and Brussels bourses at 1300 GMT.
Germany, Austria, Denmark, Finland, Norway, Sweden, Italy, Spain and Switzerland were already closed for the year.
DOLLAR GAIN FOR YEAR
The euro was steady against the dollar in thin trade, but it was poised to record its first annual fall against the dollar in three years.
The dollar also gained against a basket of currencies <.DXY> for the first time since 2005.
The euro has fallen by around 3.4 percent against the dollar over the year. However, it recovered towards the end of the year, jumping by over 10 percent during December, a trend analysts expect will continue.
The euro rose 0.1 percent against the dollar <EUR=> to $1.4064.
Euro zone government bond markets were closed. Two and 10-year euro zone government bond yields fell to their lowest in nearly two decades on Tuesday. (Additional reporting by Brian Gorman; editing by Tony Austin)