Oil at $110: Analyzing energy market chaos with AI

Using Deephaven + AI to track the Iran crisis impact on global energy prices

April 10 2026

Margaret KennedyMargaret KennedyCommunications Director @Deephaven
Abstract heat map visualization with gradients from blue through orange to red, representing energy market volatility

Last month, the Strait of Hormuz effectively closed — and 20% of the world's oil supply vanished overnight.

Brent crude jumped from $75 to over $110 in weeks. The International Energy Agency called it "the largest supply disruption in the history of the global oil market." Bitfarms and other companies are pivoting away from Bitcoin mining because electricity costs have become unpredictable. Airlines are hedging fuel costs months out. And traders are glued to every headline out of the Persian Gulf.

When oil moves 5% on a single news event, you need answers instantly — not after an hour of query writing.

The problem isn't finding data. It's making sense of it fast enough to act. In this post, we'll load oil and gas price data into Deephaven, connect Claude to it, and ask questions in plain English. The same setup works whether you're analyzing yesterday's close or watching prices move in real time — no code changes required when you swap a historical feed for a live one.

Loading energy market data

First, let's pull historical price data. The U.S. Energy Information Administration (EIA) provides free API access to petroleum, natural gas, and electricity data. For real-time prices, services like OilPriceAPI offer 5-minute updates.

Here's how to load WTI and Brent crude prices into Deephaven:

Oil prices table

Now let's add natural gas prices to see how the crisis is rippling across energy markets:

Natural gas prices table

Connecting Claude to your data

With oil and gas prices in Deephaven, the next step is connecting Claude so you can describe what you want and get answers directly from your data — no query writing.

The connection runs through MCP (Model Context Protocol), an open standard for linking AI assistants to external tools. Once configured, Claude can see your Deephaven tables, write queries against them, run them, and return results in the chat. During a crisis, you don't have time to remember syntax or re-run notebooks. You just ask.

Install the MCP bridge

On your local machine, install the Deephaven MCP package:

Configure Claude Desktop

Open ~/Library/Application Support/Claude/claude_desktop_config.json and add:

The deephaven_mcp.json file points at your running Deephaven session. Restart Claude Desktop after saving. For Cursor, Windsurf, or other agents, see the MCP setup guide.

"How much has oil spiked since the crisis started?"

You: Compare today's Brent price to February 15th, before the Strait of Hormuz closure. What's the percentage increase?

Claude: I'll compare the current Brent price to the pre-crisis baseline.

Result:

Price comparison table

Brent has surged over 70% since the Strait of Hormuz crisis began. This is the fastest sustained price increase since the 1973 oil embargo.

"What's the WTI-Brent spread telling us?"

You: Show me the WTI-Brent spread over the last 60 days. Is it widening or narrowing?

Claude: The WTI-Brent spread indicates regional supply dynamics. A widening spread often signals US supply is more insulated from global disruptions.

Result:

Spread analysis table

The spread has widened dramatically. WTI is now trading $15-20 below Brent versus the typical $3-5 discount. Plotting it makes the timing unmistakable. Right-click spread_analysis in Deephaven and select Chart Builder, with Date on X and Spread on Y:

WTI-Brent spread over time

The crisis shows up as a sharp jump around mid-February. The spread has held elevated since, with global supply fears keeping Brent at a persistent premium.

"How are natural gas prices correlating with oil?"

You: What's the correlation between oil and natural gas prices over the last 90 days?

Claude: I'll join the two datasets, compute the Pearson correlation, and check whether the relationship is tighter than usual.

Result:

Energy combined table

Pearson correlation: 0.94. In normal conditions this figure sits closer to 0.3–0.5. Plot both columns against Date in Chart Builder and the lines move almost identically. Both markets are being pulled up by the same supply shock, not by independent demand signals.

Adding a live feed

The analysis above uses daily historical data. Deephaven works the same way with live feeds — swap the data source and every downstream table, chart, and calculation updates automatically, including Claude's query results.

Swap the data source, keep the queries. The same analysis you built on historical data works identically on a live feed.

Note

Real-time commodity data typically requires a subscription. OilPriceAPI offers a free tier with 5-minute delayed prices. For institutional use, Bloomberg or Refinitiv provide tick-level feeds.

Once the ticking table is running, you can track the change between each 5-minute refresh:

Ask Claude "is WTI moving up or down right now?" and it answers from live_with_change — no extra query logic, same syntax as before.

Why this matters

Energy price volatility doesn't just affect traders. It ripples through:

  • Airlines and logistics — fuel is often their largest variable cost.
  • Manufacturing — energy-intensive industries see margin compression.
  • Inflation forecasts — oil feeds directly into CPI calculations.
  • Geopolitical analysis — price movements signal market expectations about conflict duration.

Connect Claude to your Deephaven tables and you can ask questions in plain English, get answers from the latest data, and keep working as prices move. When headlines shift markets in minutes, that speed matters.

The Strait of Hormuz crisis won't be the last supply shock. Building the analytical infrastructure now means you're ready for the next one.

Try it yourself

  1. Try it in the browser — no install required.
  2. Install Deephaven — free, takes about five minutes.
  3. Connect Claude — point your AI at your Deephaven session.
  4. Load energy data — register for a free EIA API key and use the code above as your starting point.
  5. Start asking — one question in plain English, no queries to write.

The Iran crisis has made one thing clear: when 20% of the world's oil supply is at risk, you need analytical tools that keep up with the news cycle.

Questions? Join us on Slack.