All four major U.S. equity benchmarks climbed toward record highs as oil jumped on optimism OPEC will agree to cut output. The dollar halted its longest advance ever against the euro.

The S&P 500 Index, the Dow Jones Industrial Average, the Nasdaq Composite Index and the Russell 2000 Index rallied to their peaks together for the first time since 1999. Oil climbed as Iran signaled optimism that OPEC will agree to a supply-cut deal and Iraq said it will offer new proposals to help bolster unity before next week’s meeting in Vienna. The greenback’s decline versus the shared currency was its first in 11 days. Treasuries rose.

American stocks achieved the new milestone as companies ended a five-quarter profit slump and Donald Trump’s election fueled optimism that his plans to cut taxes and boost fiscal spending will benefit industries more geared toward economic growth. Acknowledging the strength in the economy, Federal Reserve Chair Janet Yellen said Thursday that the central bank is close to lifting interest rates.

“There’s optimism that it’s more likely that Trump is going to put us on an economic fast track versus Clinton,” said Terry Morris, manager director of equities at BB&T Institutional Investment Advisors in Wyomissing, Pennsylvania. “The election had something to do with this, and I also think there’s some short covering going on. People that were hedging the election had to rush to cover after the news, and I think generally the perception is the economy is starting to pick up as the Fed is likely to raise rates in December.”

Traders are now pricing in a 100 percent chance of a move next month, compared with a 68 percent probability in the beginning of November. If the Fed doesn’t act as expected, it may bring on more market turmoil, says Seven Investment Management’s Ben Kumar.

Stocks

The S&P 500 rose 0.6 percent to 2,195.50 at 2:30 p.m. in New York. The Dow Average and the Nasdaq advanced at least 0.4 percent. The Russell 2000 of smaller companies rose for a 12th day in its longest rally since 2003.

“It’s a push on the upper end of the equity markets due to this renewed belief that there’s tax cuts and stimulus spending coming in 2017 and 2018,” said Chad Morganlander, a money manager at Stifel, Nicolaus & Co. in Florham Park, New Jersey, where he helps oversee about $172 billion. “The overall equity markets are taking a cue from that and they are trading on the belief that earnings will move higher as well as revenues in 2017.”

Chesapeake Energy Corp. and Murphy Oil Corp. led gains in energy shares. Tyson Foods Inc. tumbled after posting earnings that missed estimates and appointing Tom Hayes to succeed Donnie Smith as chief executive officer.

The Stoxx Europe 600 Index rose 0.3 percent, erasing an earlier slide of as much as 0.8 percent, amid gains in energy producers and miners as commodities climbed. Among stocks moving on corporate news, Mitie Group Plc, which provides office cleaners, tumbled after saying it sees earnings below a previous forecast. Essentra Plc sank after the U.K. maker of plastic caps cut its operating profit forecast.

MSCI’s emerging-market gauge rose 0.4 percent, trimming their monthly slide.

Commodities

The Bloomberg Commodity Index, which measures returns on raw materials, advanced 2.2 percent, set for its first two-day gain since Oct. 24.

Oil rose as much as 4.6 percent in New York, adding to last week’s 5.3 percent gain. Iranian Oil Minister Bijan Namdar Zanganeh said it’s “highly probable” OPEC will reach a consensus, according to comments published by Shana news service. Iraq will make proposals at the meeting to help reach an agreement, Oil Minister Jabbar Al-Luaibi said. Goldman Sachs Group Inc. said it’s got a “tactically bullish” outlook on a “stronger OPEC-cut rationale.”

“Market players are positioning themselves for higher prices, and oil will be in the $50 to $55 range if there is a deal,” said Giovanni Staunovo, an analyst at UBS Group AG in Zurich. “OPEC members are building a lot of expectations and taking too much exposure to let a deal fail.”

Copper rallied and nickel rebounded from a two-week low as metal markets renewed their advance on stronger oil prices and optimism over demand in China and the U.S.

Currencies

The Bloomberg Dollar Spot Index, which tracks the currency against 10 major peers, fell 0.3 percent after a two-week surge.

The euro gained 0.2 percent to $1.0611, ending 10 days of losses that were its longest losing streak since its 1999 debut.

While Europe’s single currency was helped by news that Angela Merkel will run for a fourth term as German chancellor, the recovery may prove short-lived, according to Georgette Boele, a currency strategist at ABN Amro Bank NV in Amsterdam.

The euro’s rise is mainly “profit-taking after the large moves,” Boele said. “If U.S. data start to come in strong again this week, the dollar will likely resume its uptrend.”

South Africa’s rand led gains among major currencies as the country proposed labor law reforms a few days before a credit-rating review. The currencies of Colombia, Russia and Brazil gained at least 0.9 percent.

Bonds

Benchmark 10-year yields fell two basis points, or 0.02 percentage point, to 2.33 percent, according to Bloomberg Bond Trader data.

A $26 billion two-year U.S. note auction drew a yield of 1.085 percent, the highest for a sale of the maturity since 2009. The bid-to-cover ratio, a gauge of demand, was 2.73, in line with the average at the last 10 sales. Indirect bidders, a class of investors that includes foreign central banks and mutual funds, bought 35.8 percent, compared with a 45.2 percent average in the prior 10 auctions.