Global stocks close near record highs ahead of New Year, dollar and oil dip