U.S. stocks inched higher Thursday as investors shrugged off hawkish comments from U.S. Federal Reserve and European Central Bank officials. 

The S&P 500 rose about 0.7% to 4006.81 at the closing bell, while the Dow industrials added 0.6% to 31774.52. The largely tech-focused Nasdaq Composite, meanwhile, rose around 0.6% to 11862.13. 

Stocks have largely retreated in recent sessions as investors contend with both inflation-driven interest rate hikes and stagnating international economic growth. Central banks both at home and abroad field similar challenges to pump the brakes on inflation without stifling recoveries across pandemic-battered economies.

Federal Reserve Chair Jerome Powell reaffirmed the Fed’s commitment to pursue aggressive actions to clamp down on inflation in a speech at a virtual conference hosted by the Cato Institute on Thursday. Powell promised the Fed would pursue interest rate hikes “for as long as it takes” to curb decades-high inflation, even at the risk of slowing economic growth. 

Although investors took heed of Powell’s comments, the stock market finished higher on Thursday as Powell’s interest rate rhetoric remained largely unchanged from central bank statements issued earlier this month. Investors remain fairly certain that a third consecutive .75% interest rate hike is on its way as the Fed prepares to reconvene on September 21.

“The market is presuming that the Fed is going to beat back the inflation,” said Ron Temple, U.S. Equity Head at Lazard Asset Management. “Then we can go back to lower rates.”

The European Central Bank, confronting a similarly bleak inflation picture, announced plans to raise a key interest rate from zero to 0.75 percentage points Thursday. The hike, the agency’s largest since 1999, comes amid an energy crisis driven by Russia’s war in Ukraine that has forced several European industries to shutter.

“It’s a tricky situation that they’re trying to manage with inflation largely driven by energy costs,” said Carl Ludwigson, managing director at Bel Air Investments. “Capital is global, so what the ECB does, relative to what the Fed does in terms of inflation, is very important for overall capital flows.”

Despite the increasingly cloudy economic picture, several sectors posted gains on Thursday. 
The healthcare sector continued to prove resilient to economic headwinds, gaining 1.8% at the market close, as the U.S. grows its stockpile of COVID and monkey pox vaccines. Also up were the financial and information technology sectors, which gained roughly 1.7% and 0.3% respectively. 

Regeneron Pharmaceuticals stock, which gained a stunning 18.8%, and Moderna Inc. stock, which rose 4.7%, were among the biggest winners at the closing bell.  Also up was financial firm Invesco LTD. whose shares rose roughly 4.8%. Meanwhile, tech firm ON Semiconductor Corp. rose 4.7%  as Apple’s announcement of its impending iPhone launch boosted customer demand for smartphones and the semiconductor chips that power them. 

On the flipside, the consumer staples and communication services sectors emerged as the sessions biggest losers. Food stocks were among the S&P 500’s bottom market movers, with McCormick & Co. stock down 6.7% and Kraft Heinz Co. stock down roughly 3.4%. Realty Income Corp. stock, meanwhile, also closed low, with its shares falling roughly 2.8%.

As central banks continue to clamp down on inflation, it is likely markets will continue to act at least somewhat bearish. And as Europe continues to pursue multilateral moves to thwart Russia by imposing sanctions on Russian goods and price caps on Russian oil, it is likely economic growth and industrial output in Europe will continue to slow, further kneecapping markets.