* Powell: "Several years" of strong jobs, low inflation ahead
* Dollar briefly pares gains after remarks, then strengthens
* S&P 500, MSCI global stock gauge edge higher
* Oil steadies as focus moves from shortage to surplus (Adds Powell testimony, opening of U.S. markets; changes dateline, previous LONDON)
By Lewis Krauskopf
NEW YORK, July 17 (Reuters) - The U.S. dollar held gains on Tuesday against a basket of major currencies following an upbeat economic assessment from the head of the U.S. Federal Reserve, while world stocks edged higher, with Wall Street erasing earlier losses.
In written testimony for the Senate Banking Committee, Fed Chairman Jerome Powell said the economy was on the cusp of "several years" of the job market remaining strong and inflation remaining around the Fed's 2 percent target. moves were generally modest following Powell's prepared remarks, in which he signalled he believed the economy was doing well and that an era of stable growth may continue, provided the Fed gets its policy decisions right.
The U.S. dollar pared gains against a basket of currencies immediately following the release of the testimony, but then bounced back.
“I suspect the market was pricing itself for a potential hawkish surprise, which it didn't get," said Richard Franulovich, head of FX strategy at Westpac Banking Corporation in New York. "But I mean when you parse the comments there's nothing dovish in there. Far from it. The conditions are still solid. He's pretty upbeat on the outlook."
The Dow Jones Industrial Average .DJI rose 8.08 points, or 0.03 percent, to 25,072.44, the S&P 500 .SPX gained 3.87 points, or 0.14 percent, to 2,802.3 and the Nasdaq Composite .IXIC added 7.87 points, or 0.1 percent, to 7,813.59.
Netflix NFLX.O shares tumbled 8.6 percent after the company's subscriber growth fell short of Wall Street expectations. gauge of stocks across the globe .MIWD00000PUS gained 0.01 percent, while the pan-European FTSEurofirst 300 index .FTEU3 rose 0.17 percent.
The dollar index .DXY , tracking it against a basket of major currencies, rose 0.28 percent, with the euro EUR= down 0.17 percent to $1.1689.
Benchmark 10-year notes US10YT=RR last fell 2/32 in price to yield 2.8619 percent, from 2.856 percent late on Monday.
Oil steadied after steep declines on Monday, including a three-month low for Brent. Worries over supply disruptions eased and the focus moved to increasing production and potential damage to global growth from the U.S.-China trade dispute. crude CLcv1 fell 0.96 percent to $67.41 per barrel and Brent LCOcv1 was last at $72.03, up 0.26 percent on the day.