Stocks rise, oil dips as fragile Iran ceasefire deal nears an end