The 24-time grand slam champion has qualified for the ATP Finals for an 18th time, equalling Roger Federer’s all-time record.