Markets rally on US debt deal optimism