US shares were battered earlier in the week by consumer price index data showing widespread inflation pressures