Major stock indexes ended sharply higher Wednesday as investors' concerns about the conflict in the Middle East dissipated.