A turbulent day on Wall Street ended in the record books Thursday as the Dow Jones industrial average climbed above 27,000 for the first time and the S&P 500 index hit another all-time high.
The milestones came on a day when the S&P 500 briefly moved above 3,000 for the second straight day before an early rally lost some of its momentum.
The market lost some ground after an auction of long-term US government bonds failed to drum up strong demand. That pulled bond prices lower, sending yields sharply higher.
Banks and technology stocks led the broad gains, offsetting losses in real estate and communications services companies.
The latest gains extended a winning streak for stocks into its third day. Stocks have been trending higher for much of the week as investors have grown more confident the Federal Reserve may cut interest rates for the first time in a decade as soon as the end of this month.
‘‘Sure, 27,000 is just a number and in the whole scope of things isn’t meaningful,’’ said Ryan Detrick, senior market strategist for LPL Financial. ‘‘What it is though is a reminder for all investors that this bull market has ignored all the scary headlines for years and the dual benefit of fiscal and monetary policy could mean it has a lot longer to go than most expect.’’
The S&P 500 rose 6.84 points, or 0.2 percent, to 2,999.91. The index set three straight record highs last week.
The Dow gained 227.88 points, or 0.8 percent, to 27,088.08. The Nasdaq Composite gave up an early gain, sliding 6.49 points, or 0.1 percent, to 8,196.04. The Russell 2000 index of smaller company stocks dropped 7.13 points, or 0.5 percent, to 1,557.92.
Major stock indexes in Europe fell.
Stocks rose from the get-go Thursday as investors looked ahead to Fed chairman Jerome Powell testifying before a congressional committee for the second straight day.
Powell stressed the Fed is prepared to cut interest rates to support the economy, raising hopes the first reduction in its key policy rate in a decade could happen this month.
He noted that ‘‘uncertainties around trade tensions and concerns about the strength of the global economy continue to weigh on the US economic outlook.’’
New government data released Thursday showed consumer prices rose in June from a year earlier. The bump in inflation wasn’t expected to give the Fed reason to reconsider whether it should lower rates, if necessary. Inflation has remained muted through much of the economy’s 10-year expansion, which Powell has said cited as a justification for potentially lowering rates.
The early rally weakened by early afternoon after bond yields spiked following weak demand at an auction for 30-year Treasurys. That pulled bond prices lower, driving the yield on the benchmark 10-year Treasury note to 2.14 percent from 2.06 percent late Wednesday, a big move.
‘‘The markets were higher at the beginning of the day based on Powell’s testimony and him confirming what the futures markets have been telling us for a whole month: That we were going to get a rate cut,’’ said Randy Frederick, vice president of trading & derivatives at Charles Schwab. ‘‘But then we had this Treasury auction, which apparently didn’t go so hot.’’
The surge in bond yields marked a reversal from recent weeks, when many investors funneled money into bonds and other less-risky assets amid growing anxiety over the US trade conflicts and signs of a slowing global economy.
The move had a swift effect on real estate stocks, utilities, and other high-dividend stocks that lose their appeal when bond yields rise. Real estate investment trusts took the heaviest losses. Iron Mountain slid 7.5 percent.
Banks benefited from the surge in bond yields. When bond yields climb, they push up the interest rates that lenders charge for mortgages and other loans, making them more profitable. Bank of America rose 1.2 percent and Goldman Sachs gained 2.6 percent.
Pharmaceutical makers dropped after the White House scrapped a plan to overhaul a system of rebates those companies pay to insurers and distributors. Merck & Co. dropped 4.5 percent.
The move gave drugstore chains and health insurers a boost, however. Cigna surged 9.2 percent, CVS Health gained 4.7 percent, UnitedHealth climbed 5.5 percent, and Anthem rose 5.5 percent.
Traders also weighed a mix of corporate earnings reports. Delta Air Lines and aviation maintenance company Air notched gains after their latest quarterly results topped Wall Street’s forecasts. Bed Bath & Beyond and Fastenal slumped on disappointing results.
Corporate earnings will keep investors busy starting next week, when S&P 500 companies begin reporting results for the April-June quarter.
Companies have been lowering expectations for how much profit they made in the quarter. Wall Street now projects that overall S&P 500 company earnings for the quarter fell 2.6 percent from a year earlier, according to FactSet. As recently as the end of March, earnings were forecast to be down only 0.5 percent.
This could be the first time in three years that S&P 500 companies report a back-to-back decline in overall earnings.
‘‘The bars for earnings have been set sufficiently low to keep expectations in check,’’ said Jamie Cox, managing partner for Harris Financial Group. ‘‘We will hear lots about the impact of tariffs, but not much else.’’
Benchmark crude oil fell 23 cents to settle at $60.20 a barrel. Brent crude oil, the international standard, dropped 49 cents to close at $66.52 a barrel.