SINGAPORE, July 12 (Reuters) - The yen was soft after a volatile start on Friday as traders weighed its sharp surge after U.S. consumer prices unexpectedly dropped, stoking speculation that Tokyo had intervened to lift the currency away from 38-year lows.

The Japanese currency swung between gains and losses in early trading before trading slightly weaker. It was last down 0.27% at 159.27 per dollar.

It spiked nearly 3% to as high as 157.40 immediately after the consumer inflation report on Thursday.

Tokyo's top currency diplomat, Masato Kanda, said on Friday authorities will take action as needed in the foreign exchange market but declined to comment on whether authorities had intervened.

"Currency interventions should certainty be rare in a floating rate market, but we'll need to respond appropriately to excessive volatility or disorderly moves," Kanda said.

The usual absence of any official comment on intervention leaves investors guessing and focus will now be on data due at the end of the month that shows whether authorities did step in or not.

News outlet Asahi, citing government sources, said officials intervened in the currency market while a Nikkei report, also citing sources, said the BOJ conducted rate checks with banks on the euro against the yen on Friday, adding to market jitters.

"It's just being opportunistic ... (and) the U.S. data is doing the heavy lifting," said Moh Siong Sim, currency strategist at Bank of Singapore. "If they did intervene it shows their intention to cap yen weakness."

Tokyo intervened at the end of April and in early May, spending roughly 9.8 trillion yen ($61.55 billion) to support the currency.

However, the yen has since gone beyond those levels, touching a 38-year low of 161.96 per dollar last week as the wide difference between U.S. and Japan rates weighed, with the currency down over 11% against the dollar so far this year.

This gap has created a highly lucrative trading opportunity, in which traders borrow the yen at low rates to invest in dollar-priced assets for a higher return, known as carry trade.

"It looks like it will be a volatile day today with markets nervous about intervention but carry still very attractive to short the yen and the shift in the fundamental story is only marginal after last night’s cooler U.S. CPI," said Charu Chanana, head of currency strategy at Saxo.

CPI BOOST

The surge in yen was triggered after data on Thursday showed U.S. consumer prices fell for the first time in four years in June, firmly putting disinflation back on track and keeping an interest rate cut from the Federal Reserve on the table.

"The U.S. inflation report was about as good as any dove could have hoped for," said Matt Simpson, senior market analyst at City Index, pointing out that recent data more than suggest the U.S. economy is slowing.

Traders are now pricing in 93% chance of the Fed cutting rates in September, compared with 73% before the CPI reading, CME FedWatch tool showed. Markets are pricing in 61 basis points of easing this year.

The dollar as a result has been on the defensive, with the dollar index, which measures the U.S. currency against six rivals, at 104.49, not far from the one-month low of 104.07 it touched on Thursday.

"With the likelihood of a dovish September Fed rate cut, we could see a softer dollar in the near term," said managing director of investment strategy at OCBC.

Menon, though, cautioned that the market is pricing in a more aggressive pace of rate cuts and flagged the risk of a Donald Trump victory in the upcoming U.S. Presidential election.

"A resurgence of inflation expectation if Trump wins could see the Fed treading cautiously next year."

Elsewhere, the euro was steady at $1.087, just below the one month high of $1.090 touched on Thursday.

Sterling was hovering close to the nearly one-year high hit on Thursday and was last at $1.29075 after data showed the UK economy grew more quickly than expected in May, potentially lowering the chances of an August rate cut. ($1 = 159.2200 yen)

(Reporting by Ankur Banerjee in Singapore; Editing by Sam Holmes and Kim Coghill)