(CNBC) — Stocks rose sharply on Wednesday, poised to notch a four-day winning streak as banks and tech carried major indexes higher. They rose despite a jump in bond yields.

The Dow Jones industrial average closed more than 250 points higher after falling as much as 150 points. Goldman Sachs contributed the most to the gains, rising 2.8 percent. The 30-stock index also erased all of its 2018 losses.

The S&P 500 gained 1.4 percent, with financials and tech each rising more than 1.5 percent. Bank of America, J.P. Morgan Chase, Citigroup and Morgan Stanley all traded higher. The index also turned positive for 2018.

Note: Read our discussion guidelines before commenting.