S&P 500 marks 7th straight gain on ceasefire optimism