U.S. stocks closed sharply higher Wednesday, with the Dow Jones Industrial Average soaring more than 200 points, snapping four straight days of losses. Wednesday's gains helped push the Dow positive again for the year after sharp losses Friday pulled the index negative for 2015.

The Dow Jones Industrial Average (INDEXDJX:.DJI) soared 236.36 points, or 1.33 percent, to close at 18,000.40. The Standard & Poor’s 500 index (INDEXNASDAQ:.IXIC) added 25.05 points, or 1.2 percent, to end at 2,105.20. The Nasdaq composite (INDEXSP:.INX) gained 62.82 points, or 1.25 percent, to finish at 5,076.69.

For the year, the Dow has gained 171 points, or nearly 1 percent, and the S&P 500 index has added 46 points, or 2 percent. The Nasdaq has jumped 341 points, or 7 percent.

All 30 stocks in the Dow closed higher Wednesday, led by Visa Inc. (NYSE:V), which gained 2.5 percent. Software giant Microsoft Corporation (NASDAQ:MSFT), construction and mining equipment company Caterpillar Inc. (NYSE:CAT), investment bank Goldman Sachs Group Inc. (NYSE:GS) and technology services company International Business Machines Corp. (NYSE:IBM) all rose 2 percent.

All 10 sectors in the S&P 500 traded higher, led by gains from the materials, technology and financial sectors.

The S&P 500 materials sector jumped 1 percent, as Freeport-McMoRan Inc. (NYSE:FCX) added 2.7 percent. Meanwhile, the S&P 500 financial sector gained 1.5 percent, driven by a sharp rally in Treasury yields. Prudential Financial Inc. (NYSE:PRU) and Ameriprise Financial Inc. (NYSE:AMP) rose 3 percent and 2.8 percent, respectively.

The iShares S&P Global Technology Sector exchange traded fund (NYSEARCA:IXN), which includes like tech giants Apple Inc., Microsoft Corporation and Facebook Inc., jumped 1.6 percent.

U.S. stocks rallied higher Wednesday, boosted by encouraging developments in Greece’s debt negotiations with creditors. Germany is considering offering Greek Prime Minister Alexis Tsipras aid in return for committing to one economic reform, Bloomberg reported, citing two people familiar with the matter. Greece’s current bailout program expires on June 30.

Meanwhile, government bond yields sold off across the world to hit 2015 highs in the U.S., Germany, the U.K. and Japan. The selloff in the bond market helped boost stocks in the financial sector Wednesday as rising inflation can diminish portfolio returns in the bond market over time.

The yield on 10-year German government bunds broke above 1 percent overnight for the first time since September 2014 after long-term global inflation expectations rose, luring investors back into the equity market.

The 10-year Treasury yield rose to a nine-month high this week, rising 2 percent Wednesday to 2.5 percent, after Friday’s strong U.S. labor report for May exceeded Wall Street expectations. The solid job gains over the last two years have pushed the unemployment rate steadily lower and close to the Federal Reserve’s target range of 5 percent to 5.2 percent.

Recent strong economic data suggest the U.S. central bank will begin to tighten its monetary policy this year.

“We expect the persistent strength of the labor market and an improving outlook for inflation to support a September rate hike by the Fed,” Roosevelt D. Bowman, senior fixed income analyst at U.S. Bank Wealth Management, said in a research note Wednesday. Interest rates have not been raised in nearly a decade and have remained at historic lows since the financial crisis in 2008. 

Market professionals are looking ahead to Thursday’s economic calendar, which includes the Commerce Department's retail sales figures for May and weekly jobless claims, or the number of Americans filing new claims for unemployment, both due out at 8:30 a.m. EDT.

Retail sales rebounded in March, snapping three straight months of declines due to harsh winter weather, but sales came in flat in April. Wall Street forecasts retail sales to increase 1.1 percent in May, up from 0.0 percent in April, according to analysts polled by Thomson Reuters.

Fewer Americans filed new claims for unemployment as initial claims fell 8,000 to a seasonally adjusted 276,000 for the week ending May 30, the U.S. Labor Department said last week. Economists forecast jobless claims to rise by 1,000 to 277,000 for the week ended June 6, according to analysts polled by Thomson Reuters.

Jessica Menton is a writer who covers business and the financial markets. News tips? Email me here. Follow me on Twitter @JessicaMenton.