The IBEX 35 opened Friday with a sharp advance, as markets embraced renewed optimism regarding a potential imminent agreement between the United States and Iran following several days of volatility linked to the Middle East conflict.

The opening gains helped stabilize a turbulent week for the Spanish benchmark, which could end the week up nearly 1.5% if current levels hold. This follows a series of conflicting signals from the region, where U.S. and Iranian forces have exchanged strikes in recent days.

The upward momentum was primarily supported by comments from U.S. President Donald Trump, who once again suggested that a peace deal with Iran could be signed as early as this weekend, coming just hours after he had threatened new offensives.

Although Tehran indicated that a final decision has not yet been reached, and despite previous bouts of optimism failing to produce a pact, the market reaction was decidedly risk-on. Asian markets rose, bonds advanced, and oil prices fell to two-month lows, helping to ease inflationary fears.

"The market is partially pricing in a de-escalation between the U.S. and Iran, though the lack of a definitive decision from Tehran keeps the window for volatility open," warned Sergio Avila, market analyst at IG.

In tandem, investors are shifting their focus to next week's Federal Reserve meeting, the first to be chaired by Kevin Warsh. A potential peace agreement could facilitate a more accommodative shift in monetary policy.

Recent data shows that U.S. core producer prices rose significantly less than expected in May, even as the headline index recorded its largest annual increase in three and a half years due to rising energy costs stemming from the Middle East conflict.

In Europe, the European Central Bank opted on Thursday to raise interest rates for the first time in nearly three years to combat war-driven inflation. However, a potential reopening of the Strait of Hormuz would reduce the likelihood of further hikes in the short term.

Against this geopolitical backdrop, the market is also watching the stock market debut of Elon Musk's SpaceX. The company is set for the largest IPO in history after raising $75bn, reaching a valuation of $1.77tn.

"Demand has exceeded the available supply by four times, with retail investor orders topping $100,000m, well above the 30% reserved for this tranche," noted analysts at Renta 4. They emphasized that "the outcome of this debut will be a key indicator of investor appetite for the other two major IPOs planned for this year: Anthropic and OpenAI."

As a result, at 0702 GMT on Friday, the Spanish IBEX 35 was up 313.20 points, or 1.71%, at 18,603.30 points, while the FTSE Eurofirst 300 index of leading European shares advanced 0.98%.

In the banking sector, Santander rose 3.42%, BBVA gained 2.74%, Caixabank advanced 2.18%, Sabadell climbed 1.73%, Bankinter added 2.08%, and Unicaja Banco rose 1.82%.

Among large-cap non-financial stocks, Telefonica edged up 0.03%, Inditex advanced 1.59%, Iberdrola fell 0.44%, Cellnex gained 0.74%, and the oil major Repsol dropped 3.18%.

(Reporting by Tomas Cobos: editing by Benjamin Mejias Valencia)