(Updates with close of European markets)
* Dollar falls after data on factory and services activity
* Weaker greenback lifts slumping oil
* Energy, housing stocks help lift Wall Street
By Chuck Mikolajczak
NEW YORK, June 23 (Reuters) - World stocks advanced on Friday and were on track to end the week with a slight gain as a drop in the dollar helped boost slumping oil prices.
The dollar fell against a basket of major currencies as preliminary data on U.S. factory and services activities in June fell short of analyst forecasts, stoking doubts about U.S. economic growth for the rest of 2017. drop in the greenback helped crude oil pull away from 10-month lows, although prices were still set for their worst first-half performance since 1997. On the week, both Brent and WTI crude have lost nearly 4 percent.
"In relative terms, it is not such a big move," said JJ Kinahan, chief market strategist at TD Ameritrade in Chicago.
"Part of the reason it sparked oil a little bit is it's the end of the week, there was a big selloff, so I imagine you are just seeing people flatten some positions."
U.S. crude CLcv1 rose 0.58 percent to $42.99 per barrel and Brent LCOcv1 was last at $45.50, up 0.62 percent on the day.
The climb in crude helped lift energy stocks on Wall Street, with the group .SPNY up 0.5 percent.
The U.S. dollar briefly managed to recoup some of its declines after economic data showed new U.S. single-family home sales rose in May and the median sales price surged to an all-time high. The PHLX housing index .HGX advanced 0.6 percent. Dow Jones Industrial Average .DJI rose 13.75 points, or 0.06 percent, to 21,411.04, the S&P 500 .SPX gained 6.74 points, or 0.28 percent, to 2,441.24 and the Nasdaq Composite .IXIC added 31.89 points, or 0.51 percent, to 6,268.57.
The slide in energy prices in recent weeks has worsened the outlook for inflation, creating a problem for the world's major central banks as they attempt to normalize interest rates after years of ultra-loose policy.
The pan-European FTSEurofirst 300 index .FTEU3 lost 0.28 percent and MSCI's gauge of stocks across the globe .MIWD00000PUS gained 0.26 percent.
The dollar index .DXY fell 0.33 percent, with the euro EUR= up 0.41 percent to $1.1196.
The dollar hit a one-month high on Tuesday following comments with a hawkish tone from Fed officials including New York Fed President William Dudley and Boston Fed President Eric Rosengren. But it has been stuck in a tight range since and is up slightly on the week.
Earlier on Friday, St. Louis Fed President James Bullard said the central bank should wait on any further rate increases until it is clear inflation is reliably heading to the Fed's 2 percent target. Cleveland Fed President Loretta Mester said failure to hike rates in the U.S. could mean missing inflation and employment goals that could cause a recession. Board Governor Jerome Powell is also due to speak on Friday.
The lower dollar also helped boost gold prices, but the prospect of further interest rate rises in the United States limited gains. gold XAU= added 0.4 percent to $1,255.34 an ounce. U.S. gold futures GCcv1 gained 0.54 percent to $1,256.20 an ounce.
<^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Global assets in 2017
http://reut.rs/1WAiOSC Global currencies vs. dollar
http://tmsnrt.rs/2egbfVh Global bonds dashboard
http://tmsnrt.rs/2fPTds0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>