Trader Jarret Johnson follows stock prices at the New York Stock Exchange on Friday. Stocks powered through a tulmultous week to finish with gains. (Mark Lennihan/AP)

U.S. stocks recovered ground Friday following a tumultuous week that ended with a bounceback in oil prices and hopes for further global economic stimulus.

All three major indexes ended the week higher than they began, marking the first week of gains so far this year. The tech-heavy Nasdaq composite climbed 2.66 percent Friday, while the Standard & Poor’s 500-stock index rose 2.03 percent and the Dow Jones industrial average was up 210.83 points, or 1.33 percent.

Oil prices, meanwhile, climbed back above $32 per barrel after a bruising rout that had pushed them to the lowest levels since the start of the Iraq War. The price of benchmark crude rose 8.43 percent, helping to lift the overall stock market.

“For several months now, it’s all been about oil prices,” said Torsten Slok, chief international economist at Deutsche Bank. “That’s driving everything.”

Indeed, energy companies dominated the gains, with shares of pipeline company Williams Cos. up more than 23 percent. Natural gas company ONEOK and pipeline operator Kinder Morgan both posted gains of nearly 11 percent.

Markets in Asia and Europe also staged a comeback. Japan’s Nikkei led the way overnight with a 5.9 percent jump, while European shares registered their largest two-day rise since 2011. The rally built momentum on indications from European Central Bank President Mario Draghi that further support for the economy might be in store at the ECB’s March meeting. There was also speculation that China and Japan may be pushed into further stimulus as signs of global economic weakness mount.

Some wonder whether the momentum will hold.

“It’s a classic oversold bounce after Draghi’s comments yesterday and the noise on Japanese stimulus overnight. The question is where do we go from here,” Veronika Pechlaner told Bloomberg News. She helps oversee $10 billion at Ashburton Investments, part of FirstRand Group. “It’s become harder and harder for stimulus to really support the economic fundamentals, so it doesn’t mean a medium- and long-term change, but at least we have a bit more stable trading environment for a couple of days.”

The stronger tone caps a holiday-shortened but volatile week on Wall Street as investors awaited gross domestic product data out of China and were taken aback by sharp cuts in the International Monetary Fund’s international growth forecasts. Combined with the rapid decline in energy markets that has sparked concerns about corporate bankruptcies in the sector, it all culminated in an especially rocky trading session Wednesday.

Despite oil’s price bump, it may be rough sledding ahead for energy companies. Moody’s Investors Service is reviewing ratings of energy firms hit hard by low prices. Standard & Poor’s also forecast lower crude prices and has downgraded firms in the sector, according to Bloomberg News.

Schlumberger, the world’s largest oil field service provider, announced it would cut 10,000 jobs as the oil rout left it with a $1 billion quarterly loss.

Globally, stocks have lost $7.8 trillion in value so far this year, according to Bloomberg calculations, making it one of the worst yearly starts in history.

But analysts said they were hopeful that the tough start to the year was not an omen of things to come.

“It does look like the worst might be behind us,” said Scott Brown, chief economist at Raymond James. “A lot of the fears have softened, even though I don’t think they’ve gone away entirely.”

Investors’ focus will again turn to the domestic economy next week as the United States releases fourth GDP figures expected to show a meager annual rise of 0.7 percent, according to forecasts from the Atlanta Federal Reserve.

Wall Street also will be looking to the Federal Reserve’s policy meeting Wednesday for clues on where the domestic economy may be headed. The Fed raised interest rates last month for the first time in nearly a decade, but the recent round of weak overseas economic figures and rickety global markets have fueled speculation it may not adjust rates again until at least this summer.