Stocks rallied Friday as investors weighed the latest data on inflation from the consumer-price index (CPI). The Dow booked its biggest weekly percentage gain since July.