Dow hits all-time highs as materials, energy stocks rise