The dollar edged down against the yen on Wednesday after U.S. President Donald Trump raised the spectre of a government shutdown to fulfil a campaign pledge, but overall moves among major currencies were limited ahead of this week's Jackson Hole global central bankers' conference.

At a rally with his supporters in Phoenix, Trump referred to his vow to build a wall at the U.S.-Mexican border and said, "If we have to close down the government, we are building that wall."

In wide-ranging comments, he also signalled the possible termination of the NAFTA treaty with Mexico and Canada to jumpstart negotiations, and said the standoff with North Korea over its weapons programs might have taken a positive turn.

The dollar was last off slightly on the day at 109.53 yen after touching a low of 109.37, down from around 109.67 before Trump's statement and below an earlier session high of 109.83 yen.

But it remained well above a four-month low of 108.605 yen set late last week.

"It was not a big move, and it has mostly retraced, but the market seems to have taken Trump's comments as negative for the dollar," said Ayako Sera, senior market economist at Sumitomo Mitsui Trust.

"Investors are focusing much more on the upcoming Jackson Hole conference than on anything Trump is saying today," she said, "particularly since there are many weeks remaining before the government shutdown issue would risk becoming critical."

The U.S. government is bumping up against its debt ceiling, with the possibility that it will be unable to pay all its bills in October and face a shutdown unless Congress approves an increase in its borrowing capacity by the end of next month.

The dollar index, which tracks the greenback against a basket of six major currencies, was flat on the day at 93.513 , after it gained 0.5 percent in the previous session.

The dollar rose on Tuesday as the euro was weighed down by a weaker-than-expected reading on German investor confidence. Position-squaring ahead of the gathering of central bankers in Jackson Hole, Wyoming on Thursday and Friday also supported the dollar, analysts said.

"Ahead of Jackson Hole...investors have started to reduce their short dollar positions," said Heng Koon How, head of markets strategy for United Overseas Bank in Singapore.

Investors are awaiting speeches from Fed Chair Janet Yellen and European Central Bank President Mario Draghi on Friday in Jackson Hole, though neither is expected to announce new policy messages.

Draghi is also due to give a speech in Germany later on Wednesday.

The euro eased slightly to $1.1760, staying on the defensive after shedding 0.5 percent on Tuesday.

A survey out on Tuesday showed a steeper-than-expected drop in German investor morale in August, dragging on the euro. (Reporting by Lisa Twaronite & Masayuki Kitano; Editing by Eric Meijer & Shri Navaratnam)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.