Stocks climbed Wednesday as investors clung to hope for an international deal to stem a global glut in crude oil with production cutbacks. That sent the price of oil sharply higher, as well as the stocks of major energy companies like Chevron. Tech stocks also rose, led by Microsoft and Facebook.
The gains capped a three-day rally, the longest so far in 2016, that has wiped out about half of the market's losses since the beginning of the year. The Standard & Poor's 500 index hit its lowest point of the year last Thursday and has risen about 5% since then.
Priceline, Fossil, and Garmin rose after reporting robust earnings.
The Dow Jones industrial average rose 257.42 points, or 1.6%, to 16,453.83. The S&P 500 climbed 31.24 points, or 1.7%, to 1,926.82. The Nasdaq composite index jumped 98.11 points, or 2.2%, to 4,534.06.
The price of oil recovered as investors again hoped for an international deal that would cap or cut production. Several OPEC nations are in talks about freezing production at January's levels, but that deal requires all of OPEC's members to agree, and Iran said Wednesday that it won't stop increasing its exports. Still, investors appeared to be encouraged that the countries are talking.
The price of U.S. crude jumped $1.62, or 5.6%, to $30.66 a barrel in New York. Brent crude, a benchmark for international oils, rose $2.32, or 7.2%, to $34.50 a barrel in London. U.S. crude soared Friday on anticipation of a deal, but even with the recent gains, it's still down 17% this year.
Energy stocks climbed along with the price of oil. Chevron rose 4.1%, and Hess picked up 6.4%. Tech stocks made big gains, led by Microsoft, which added 2.6%, and Facebook, which rose 3.5%.
Oil and natural gas company Devon Energy missed out on those gains after saying it would eliminate 20% of its staff in the first quarter and slash its spending and its quarterly dividend in response to the diminished price of oil. The stock lost 4.4%. It's down 69% over the last year.
For almost six months, stocks have surged and dropped repeatedly as investors worry about issues like the health of China's economy, the Federal Reserve's plans on interest rates, and plunging oil prices. Sameer Samana, global quantitative strategist for Wells Fargo Investment Institute, said the ride isn't over yet.
"None of those issues have gone away," Samana said. "You'll continue to see that kind of pattern."
Samana said U.S. companies, and large stocks in particular, are doing pretty well and that investors will eventually start paying more attention to their performance. But he said it's possible that volatility in financial markets will start to affect the broader economy, cutting into consumer spending and prompting businesses to cut jobs.
While corporate earnings have been shaky, companies that surpassed analysts' expectations were rewarded on Wednesday. Online travel company Priceline climbed 11.2% after its profit and revenue beat estimates. Expedia rose 5%, and TripAdvisor added 3.2%. Expedia and TripAdvisor posted strong results last week.
Personal navigation device maker Garmin rose 16.5% after its fourth-quarter profit topped Wall Street estimates.
Watch and accessories maker Fossil posted strong results, and its annual profit guidance also pleased investors. The stock added 28.6%. Fossil was one of the worst-performing stocks in the S&P 500 last year. It lost almost two-thirds of its value as fitness trackers became more popular and the Apple Watch was launched.
Pipeline company Kinder Morgan jumped 10% on the rise in oil prices and from the news that Warren Buffett's Berkshire Hathaway has taken a 1.2% stake in the company.
U.S. factories cranked out more cars, furniture and food in January. The Federal Reserve said factory output rose 0.5%, the biggest increase since July. Output had fallen in four of the previous five months, and the data suggests U.S. manufacturing may be recovering after struggling last year. Although the strong dollar and weak overseas growth have cut into exports and corporate profits, Americans are spending at a solid pace.
In other energy trading, wholesale gasoline rose 3.3 cents to $1 a gallon. Heating oil rose 6.1 cents, or 5.9%, to $1.088 a gallon. Natural gas added 3.9 cents, or 2%, to reach $1.942 per 1,000 cubic feet.
The price of gold rose $3.20 to $1,211.40 an ounce, and silver inched up 4.3 cents to $15.377 an ounce. Copper climbed 2.5 cents to $2.076 a pound.
European stocks also rallied. Germany's DAX rose 2.7%, and France's CAC 40 gained 3%. Britain's FTSE 100 picked up 2.9%. Asian stocks slumped, however. Japan's Nikkei 225 fell 1.4% as investors shrugged off data showing strong machinery orders in January. Hong Kong's Hang Seng dropped 1%, but the Shanghai Composite rose 1.1%.