The three major U.S. stock indexes ended higher on Wednesday, led by gains in technology and consumer discretionary stocks. The Dow Jones Industrial Average rose 0.7% to 36,290.36, the S&P 500 gained 0.9% to 4,682.41, and the Nasdaq Composite advanced 1.1% to 15,108.73. The gains came after a choppy trading session in which the indexes swung between positive and negative territory. However, investors were encouraged by strong earnings reports from several major companies, including Apple, Microsoft, and Tesla. Apple, the largest company in the world by market capitalization, reported record quarterly revenue and earnings. Microsoft also reported strong results, with its cloud computing business continuing to grow rapidly. Tesla, the electric car maker, reported a record number of vehicle deliveries in the quarter. The strong earnings reports helped to offset concerns about rising interest rates and the potential for a recession. Investors were also encouraged by the latest economic data, which showed that U.S. consumer spending rose in March. The gains in the major indexes were broad-based, with all 11 sectors of the S&P 500 closing higher. Technology stocks were the best performers, with the S&P 500 Information Technology sector gaining 1.4%. Consumer discretionary stocks also performed well, with the S&P 500 Consumer Discretionary sector rising 1.1%.