The stock market can be exciting and exhilarating, especially when you get in early on the hot new growth story. But you know what else is fun? Making money from smart investments -- even if they're a little less exhilarating.

Ferrari (RACE 2.49%) isn't used to taking a back seat to rivals; the Italian automaker is known around the world for its high-end sports cars and luxury brand. Yet it doesn't enjoy the popularity of many other automotive stocks, and that's a shame. Over the past five years, Ferrari has more than tripled for smart investors, outpacing just about any peer you can name, other than Tesla (TSLA -1.11%).

Here's why Ferrari might just do it again over the next five years.

Leaving competition in the dust

Before you began reading this article, if someone had asked you to name the best-performing automotive stock over the past five years, what would you have said? Tesla would no doubt be a popular answer -- and correct. A Detroit fan might have mentioned Ford Motor Company or General Motors. A savvy investor could have chimed in with BMW, Volkswagen, or an up-and-coming electric-vehicle (EV) company such as Rivian.

But look at the graphic below and see just how Ferrari has trounced much of its competition over the past five years:

RACE Chart

RACE data by YCharts.

If you shrink the period examined to only the last three years, Ferrari has nearly tripled Tesla's gains, gaining nearly 70% compared to Tesla's 26%.

Clearly, Ferrari is an exceptional stock for savvy investors. But let's dig into why it's not your average automaker, and why it could continue accelerating over the next five years.

Luxury margins

Ferrari is completely different from mainstream automakers in terms of pricing power, brand image, margins, and volume -- and that's good news for investors.

The company sells thousands of vehicles annually, while many mainstream autos sell millions. The exclusivity that goes hand in hand with owning a Ferrari helps drive (and maintain) an incredibly high price tag.

For simplicity's sake, let's use total revenue, which includes smaller chunks of revenue generated from sponsorships and engines sold. In 2022, Ferrari generated roughly 385,000 euros (roughly $419,000 at today's exchange rates) per vehicle sold.

It's that high price tag, with controlled costs, that generates its luxury-like margins compared to mainstream autos:

RACE EBIT Margin (TTM) Chart

RACE EBIT Margin (TTM) data by YCharts

Unlike mainstream automakers -- which are heavily impacted by economic downturns -- Ferrari has an ultrarich target audience that's more resilient, and that fact shows in its financials.

Let's take 2020, early in the COVID-19 pandemic, as an example. Ferrari's shipments and revenue fell 10% and 8.1%, respectively, while EBIT (earnings before interest and taxes) declined 22% compared to 2019. Ford, meanwhile, posted 2020 declines in revenue and wholesales of roughly 18% and 22%, respectively; EBIT plunged nearly 56% compared to 2019 (adjusted for one-time costs). Due to wild differences in pricing power, margins, and target audience, Ferrari's business is much more stable than your typical automaker.

But enough about what Ferrari has done lately: Let's dig into why Ferrari could continue accelerating over the next five years.

Down the road

After much anticipation, during the first half of 2023, Ferrari finally shipped units of its first-ever sport utility vehicle: the Purosangue. While Ferrari continues to push back against claims that it's an SUV, it's certainly designed to appeal to that market. It's a huge move for the carmaker, and it opens the doors for incremental sales in a new segment -- if mainstream trends hold true in Ferrari's ultra-luxury realm, the Purosangue could produce even better margins than its cars.

Furthermore, as the broader auto industry speeds toward electric vehicles, Ferrari has already quietly made progress -- 43% of its shipments during the second quarter of 2023 were hybrids. In late June it unveiled two new hybrids, the SF90 XX Stradale and the SF90 XX Spider, which have already sold out. And Ferrari's "e-building," which will be a production facility focused on EV models and hybrid components, is on track to be completed by the middle of 2024.

Why is Ferrari overlooked?

Many investors ignore Ferrari's stock, perhaps assuming that it's plagued by high fixed costs and low margins, and is too heavily impacted by economic downturns. But savvy investors know this isn't the case, and Ferrari is truly in a league of its own as an automotive investment. That's why Ferrari's stock has heavily outperformed almost every automaker out there over the past five years, and is positioned to continue that trend.