By Riva Gold and Saumya Vaishampayan 

Stocks marched higher Wednesday as rising oil prices lifted shares of energy companies.

Major U.S. indexes have advanced since last Thursday, with the Dow industrials rising 2.5% in that period. The move higher has come as oil prices approach $50 a barrel and investors appear more comfortable with the prospect of higher interest rates as early as this summer. For the month, however, the blue-chip index has only risen 0.5%.

"People are realizing that rates going up is not a negative for the longer-term economy -- it's a positive vote of confidence that things are going better than people hoped," said J.J. Kinahan, chief strategist at TD Ameritrade.

On Wednesday, the Dow Jones Industrial Average gained 153 points, or 0.9%, to 17859. The S&P 500 rose 0.7% and the Nasdaq Composite added 0.5%.

Energy stocks in the S&P 500 rose 1.2%, helping push the market higher. Shares of banks also rallied, reflecting higher expectations for an interest-rate increase as early as June. The KBW Nasdaq Bank index of large U.S. commercial lenders rose 1.6%.

The Stoxx Europe 600 climbed 1.3% to its highest level this month, also powered by oil and gas shares.

U.S. crude oil prices jumped 0.8% to $49.01 a barrel, near their highest level in more than seven months.

"We have a stabilizing oil price, and that is comforting to the very distressed sectors associated with energy," said Sandra Crowl, member of the investment committee at French asset manager Carmignac.

Also boosting shares, eurozone finance ministers and the International Monetary Fund reached a deal early Wednesday that clears the way for fresh loans for Greece and prevents the country from defaulting on big debt redemptions in July.

Greek government bond yields fell below 7% for the first time since November before retracing slightly. Yields in Spain, Portugal, Italy and Spain also fell. Yields fall as prices rise.

Analysts said the deal reduced the risk of a summer crisis, but fell short of a long-term solution for the country's debt problems.

"The partial agreement in Greece is positive," said Ms. Crowl, but "markets will remain volatile because of a lack of a visibility both in growth and in political events."

Despite the recent gains, many investors aren't betting on big stock-market returns this year in a sluggish global economy with uncertain monetary policy.

We're looking for "companies that have some kind of growth driver that is not as linked to what the Federal Reserve is doing, what oil prices are doing, or what global growth is doing," said Greg Woodard, portfolio strategist at Manning & Napier, which manages $38.1 billion. That includes companies like Google parent Alphabet Inc. and Facebook Inc., both of which Mr. Woodard owns stock in, he said.

In Asia, Japan's Nikkei Stock Average added 1.6% and Hong Kong's Hang Seng Index gained 2.7%, bolstered by the rise in oil prices and strong finish on Wall Street.

Shares in Shanghai ended slightly lower, however, after China guided the yuan to its weakest level against the dollar in over five years.

The dollar rose 0.1% against the yen to Yen110.17, while the British pound gained 0.6% against the dollar to $1.470.

Gold futures slipped 0.5% to $1,223.10 an ounce. The yield on the 10-year Treasury note fell to 1.849% from 1.859% on Tuesday.

Viktoria Dendrinou contributed to this article.

Write to Riva Gold at riva.gold@wsj.com and Saumya Vaishampayan at saumya.vaishampayan@wsj.com

 

(END) Dow Jones Newswires

May 25, 2016 12:06 ET (16:06 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.