Choppy trading in stocks and bonds also reflected anxiety among investors about the war’s effects on inflation and growth.