U.S. stocks ended sharply higher Wednesday, with the main indexes delivering on a rally that had begun in earnest on Tuesday but was relinquished by the close of that session in a violent selloff in the final hour of action. On Wednesday, the market managed to build up its gains into the close and hold on, finishing near session peaks, as investors focused on optimism around the pathway forward for the economy from the COVID-19. A rebound in energy shares as investors watched for a major production cut among major crude producers on Thursday also helped to bolster the buying mood on Wall Street. The Dow Jones Industrial Average /zigman2/quotes/210598065/realtime DJIA +1.39% closed up about 780 points, or 3.4%, at 23,434, the S&P 500 index /zigman2/quotes/210599714/realtime SPX +0.64% finished up 3.4% at 2,750, while the Nasdaq Composite Index /zigman2/quotes/210598365/realtime COMP +0.52% closed with a 2.6% gain at 8,091. Tuesday's reversal represented the biggest blown lead for the S&P 500 and the Dow since 2008, according to Dow Jones Market Data. The White House's plans for reopening the U.S. economy and an account of the Federal Reserve's emergency actions taken last month were also a focus for investors. Minutes for the central bank's March 15 policy meeting showed that staffers viewed no major economic recovery until next year as a worst-case scenario of the coronavirus outbreak, according to minutes released Wednesday. Fed staffers also fretted about a lack of future ammunition to combat economic distress after the central bank took unprecedented monetary-policy actions in March and slashed rates to a range of 0% and 0.25%. Stocks also appeared to get a lift after Democratic Sen. Bernie Sanders from Vermont exited the U.S. presidential race on Wednesday, opening up the path for Joe Biden to become the Democratic nominee.