S&P 500 erases Iran war losses on peace talk hopes