Luxury sports carmaker Ferrari beat analyst expectations on Friday as sales and profits accelerated in the second quarter despite the global auto market hitting the brakes.