By Sinéad Carew and Nell Mackenzie

NEW YORK/LONDON July 14 (Reuters) - Shares were up modestly on Tuesday after softer than expected U.S. inflation data and strong second-quarter earnings from major banks, while oil prices rose for a second day as the U.S. and Iran battled for control of the Strait of Hormuz.

The U.S. Consumer Price Index increased by a less than expected 3.5% in the 12 months through June after surging 4.2% in May.

On a monthly basis it fell 0.4% after advancing in May and compared with analyst expectations for a 0.1% month over month dip. The easing mostly reflects last month's retreat in gasoline prices from multi-year highs as a fragile U.S.-Iran ceasefire took hold last month.

But on Tuesday, oil rose again after Iran fired ballistic missiles at a U.S. air base in Jordan and the U.S. attacked Iranian targets for five hours, in its third successive night of attacks. After Iran said on Saturday that it was closing the Strait of Hormuz, a crucial energy conduit, U.S. President Donald Trump responded by saying that the U.S. was reinstating its blockade of Iranian shipping.

U.S. crude oil futures were up 1.05% at $78.94 a barrel after earlier hitting a one-month high, while Brent rose to $84.57 per barrel, up 1.52% on the day.

Shares of big U.S. banks rallied after quarterly results were boosted by strong trading revenue and corporate deal making. Bank of America  and Citigroup  exceeded Wall Street estimates for second-quarter profit and JPMorgan Chase <JPM.N> reported a record quarterly profit, pushing its shares to an all-time high.

While share traders appeared to shrug off the Middle East escalation, Tim Ghriskey, senior portfolio strategist at Ingalls & Snyder, said that geopolitics is still an overhang for equity investors.

"It depends how long this stage of this ongoing war lasts. Right now the market is discounting this issue but it's lingering. It's dampening market strength from the very strong results we saw from financial companies," he said, adding that "the favorable CPI number we see could be very different next month given what we're seeing in the oil market."

At 11:04 a.m. ET (1504 GMT), the Dow Jones Industrial Average <.DJI> was down 27.79 points, or 0.05%, at 52,474.12, the S&P 500 was up 23.89 points, or 0.31%, at 7,538.92, and the Nasdaq Composite rose 194.64 points, or 0.75%, to 26,067.81.

MSCI's gauge of stocks across the globe rose 4.35 points, or 0.39%, to 1,121.21.

The pan-European STOXX 600 index fell 0.04%.

DOLLAR WEAKER AFTER INFLATION DATA

Also in focus on Tuesday was Federal Reserve Chair Kevin Warsh's delivery of the central bank's semi-annual monetary policy report to Congress.

In currencies, the dollar broadly weakened after the softer-than-expected U.S. inflation data tempered expectations for Fed policy tightening.

The dollar index, which measures the greenback against a basket of currencies including the yen and the euro, fell 0.52% to 100.74, with the euro up 0.55% at $1.1444.

Against the Japanese yen, the dollar weakened 0.28% to 161.98.

U.S. Treasury yields also fell in response to the inflation data.

The yield on benchmark U.S. 10-year notes fell 3.46 basis points to 4.575%, from 4.61% late on Monday, while the 30-year bond yield slipped 1.04 basis points to 5.0876%.

The 2-year note yield, which typically moves in step with interest rate expectations for the Federal Reserve, fell 6.96 basis points to 4.193%.

In precious metals, spot gold was up 2.02% at $4,080.49 an ounce.

(Reporting by Sinéad Carew in New York, Nell Mackenzie in London, Gregor Stuart Hunter in Singapore; Editing by Kevin Buckland, Stephen Coates, William Maclean and Susan Fenton)

Find it fast

Looking for more insights? Explore our other news sections for updates on sustainable finance, companies and financial education