U.S. equities reached an all-time high and extended gains for a third week as investors brushed aside concerns over a possible tax on global corporations and the long-running debates about inflation risks.

The S&P 500 rose 0.4 percent in the five-day span to 4,247, the highest ever, driven by rallies in real estate and health-care companies. The week’s biggest stock winner was Biogen, which added 36 percent following approval of its controversial Alzheimer’s disease therapy. The Dow lost 0.8 percent on the week, while the Nasdaq gained 1.9 percent.

The benchmark’s tech sector ended the week up 1.4 percent even after the Group of Seven rich nations secured a deal that could help countries collect more taxes from corporate giants such as Amazon and Facebook.

“While optimism is still high toward the economy heading for a return to normal, what we’re seeing is a rotation taking place,” said Haris Khurshid, portfolio manager at Fate Capital Management.

Thursday’s consumer price index data showed the inflation rate jumped 5 percent from a year ago — the largest annual gain since August 2008. But this was largely driven by costs of used vehicles, household furnishings, airfares and apparel, so it appeared to support the Federal Reserve’s view that price pressures will be temporary. The 10-year Treasury yield fell to as low as 1.4 percent in the wake of the inflation report.

“Stocks got more comfortable with inflation this week despite the jump in the CPI,” said Jeff Buchbinder, an equity strategist at LPL Financial. “As long as the Fed doesn’t rock the boat next week, which we don’t expect, then we think more new highs are coming.”

Bitcoin and other cryptocurrencies fell after the government recovered part of the ransom that Colonial Pipeline paid in Bitcoin following a cyberattack. Crypto currency skeptics said that this was evidence that digital currencies aren’t beyond regulatory control.

Investors will be focused on Wednesday’s rate decision from the Federal Open Market Committee and the press conference from Federal Reserve Board Chair Jerome H. Powell. Both will be scrutinized for inflation outlooks and clues for when policymakers might begin tapering their bond-buying program.

The Treasury will sell 13-week and 26-week bills on June 14. They yielded 0.02 percent and 0.04 percent in when-issued trading, respectively. The government will also auction 20-year bonds the next day, in addition to 52-week bills. Treasury plans to sell five-year inflation-protected securities and eight-week and four-week bills on June 17.

— Bloomberg News