Optimism about the U.S. economy sends stocks to a new record