Oil prices rose after two days of declines, as traders monitored Israel's possible response to an Iranian missile attack early last week, while U.S. crude inventories rose by the most since April.

Brent crude was trading near $77 a barrel, while WTI was near $74. The market remains on edge over Israel’s intention to launch a retaliatory attack on Tehran, which has raised fears of an all-out war. Iran has warned it is ready to launch thousands of missiles if necessary.

Oil markets have been shaken by the tensions, with volatility rising sharply and hedge funds increasing their net long positions. U.S. President Joe Biden has urged avoiding attacks on Iranian oil infrastructure and spoke with Israeli Prime Minister Benjamin Netanyahu on Wednesday for the first time in more than a month.

However, concerns about the Chinese economy remain, and the lack of any major new stimulus from Beijing this week led to a broad sell-off in markets on Tuesday, including oil. The central government said it would hold a new press conference on fiscal policy on Saturday.

Meanwhile, U.S. crude oil inventories swelled by 5.8 million barrels last week, the largest increase since late April, according to government data released Wednesday, while gasoline stocks fell.

Oil prices had their most volatile start to a month in nearly two years, with rising tensions between Iran and Israel sparking a major wave of volatility.

Since the start of October, Brent crude has traded at an average daily range of $3.73, the largest during the same period in any month since December 2022, according to data compiled by Bloomberg.

Prices have been volatile mainly due to the risk that Israeli retaliation for a missile attack by Iran could impact energy infrastructure in a region that accounts for a third of global oil production. But there have also been macroeconomic factors, including a strong U.S. jobs report late last week and a strong market reaction to China’s stimulus package.

“The high level of volatility can lead to false buy/sell signals, making it a very difficult environment if you want to initiate trending trades,” said Harry Tchilinguirian, Head of Research at Onyx Capital Group.

Record levels for oil purchase contracts

The sharp swings have also coincided with massive activity in the oil options market. On average, around 250 million barrels of long contracts have been traded over the past 10 days, a record, as traders seek protection from high levels of volatility and potential price spikes.

These large volumes included a significant increase in investor positions in options contracts at the $100 level for both WTI and Brent crude.

“Where do we see the focus in oil? It’s in options, which is part of the reason we’re seeing big moves,” said Jeff Currie, chief energy strategy officer at Carlyle Group. “I think it’s the short-term approach to oil trading.”