NEW YORK (Reuters) - Investor optimism over U.S. tax reforms and the global economy spurred Wall Street and world stock markets to fresh highs on Thursday, while the dollar gained as data pointed to solid U.S. economic growth.

FILE PHOTO: A U.S. Dollar note is seen in this June 22, 2017 illustration photo. REUTERS/Thomas White/Illustration/File Photo

The Dow, S&P 500 and Nasdaq stock indexes notched record-high closes for a fourth consecutive day, as did MSCI’s gauge of equity markets in 47 countries, as rosy economic data and budding signs U.S. tax reform legislation will pass cheered investors.

The Republican-controlled Congress hastened the overhaul of the U.S. tax code by moving closer to agreement on a budget resolution, taking a procedural step that would help advance eventual tax legislation.

U.S. investors are warming to the notion that a new fiscal policy will be in place by the first quarter, said Phil Orlando, chief equity strategist at Federated Investors in New York.

Most investors felt that nothing would come of President Donald Trump’s tax reform effort until last week, he said.

“It sounds like they’re serious about drafting tax reform legislation and that gives everyone greater confidence that this might actually might happen,” Orlando said.

Tax reform could lift economic growth and corporate earnings estimates for 2019, and push his S&P 500 target above 3,000 for that year, Orlando said.

The S&P 500 rose for an eighth straight session and set a sixth consecutive record closing high, the longest such streak since an eight-day run in 1997.

The Dow Jones Industrial Average .DJI rose 113.75 points, or 0.5 percent, to end at 22,775.39. The S&P 500 .SPX gained 14.33 points, or 0.56 percent, to 2,552.07 and the Nasdaq Composite .IXIC added 50.73 points, or 0.78 percent, to 6,585.36.

MSCI's all-country world stock index .MIWD00000PUS gained 0.24 percent. In Europe, the pan-regional FTSEurofirst 300 index .FTEU3 rose 0.2 percent to close at 1,536.56.

A Reuters poll found sentiment that global stocks will continue to climb over the coming year on rising optimism about growth worldwide. However, a slim majority of equity strategists also expect the current eight-year bull run to end in 2018. [nL4N1MF2Q6]

“There really is no alternative to being in the equity market,” said Larry Hatheway, chief economist at GAM Investment Management in Zurich.

“There’s no reason for anybody to sell equities at this point in time. There are no threats to an equity bull market that seem to be material,” he said.

The U.S. trade deficit fell in August as exports of goods and services rose to the highest in more than 2-1/2 years. Separately, the number of Americans filing for unemployment benefits fell more than expected last week.

Gold dipped on news of the data as it bolstered the notion U.S. interest rates will be raised in December. Philadelphia Federal Reserve Bank President Patrick Harker said he was penciling in one more rate increase this year and three in 2018.

U.S. gold futures GCcv1 for December delivery settled down $3.60 at $1,273.20 per ounce.

The dollar index, tracking the greenback against a basket of key currencies, held under seven-week highs as investors awaited Friday’s U.S. payrolls report for September to assess the impact of hurricanes Harvey and Irma. The storms proved a drag on robust business spending that was seen in the trade data.

The dollar index .DXY rose 0.53 percent, with the euro EUR= down 0.47 percent at $1.1704. The Japanese yen JPY= weakened 0.08 percent versus the greenback to 112.83 per dollar.

Oil prices rose as signs Saudi Arabia and Russia will limit production through next year overshadowed record U.S. exports and the return of production at a major Libyan oilfield.

Brent LCOcv1 rose $1.20 to settle at $57.00 per barrel, while U.S. crude CLcv1 settled at $50.79, up 81 cents.