A burst of investor optimism pushed U.S. stock indexes into record territory for the first time since late May, fueled by fresh reassurances that the Federal Reserve would continue to pour cheap money into financial markets.

Thursday's rally began during Asian trading hours before spreading to Europe and North America. Gains were sparked by Fed Chairman Ben Bernanke's comments late Wednesday that the Fed's easy-money policies are in...