Screen Shot

Image credit: Alex Hanson, via Flickr.

I firmly believe that you should never make an investment decision based solely on politics. We give far too much weight to presidents when it comes to our economy. And even if elected officials were the only real catalysts to economic growth (they aren't), predicting the future actions of these officials would be pure folly.

So why would I ever buy a stock directly after -- in fact, because of -- an election? Because other investors decided to hit the panic button and sell shares of a high-quality company. That company is mortgage-platform provider Ellie Mae (NYSE:ELLI).

I'll get into what makes Ellie such a good company in a minute. But first, let's take a look at what happened to mortgage rates and Ellie Mae's stock directly following the Nov. 8 election:

US 30 Year Mortgage Rate Chart

US 30 Year Mortgage Rate data by YCharts

Many believe that a Trump presidency will mean an end to low interest rates, which caused the average for a 30-year mortgage to shoot up from 3.5% to almost 4% overnight. At the same time, Ellie Mae lost 25% of its market cap in just seven trading days.

Investors are worried that higher interest rates will slow down both the homebuying and refinancing markets. Ellie Mae relies on these two types of transactions to drive its business. Indeed, if this did happen, it would affect Ellie Mae...for a while.

Read on to see why I think such worries are shortsighted, and why I think long-term Fools can get a good deal at today's prices.

The nuts and bolts

Following the Great Recession, the already regulated mortgage industry came under even more scrutiny. In the face of such controls, mortgage lenders were looking for ways to simplify the processing of mortgages while still abiding by all applicable laws.

That's where Ellie Mae comes in. The software-as-a-service (SaaS) outfit focuses on providing a seamless platform to meet all the needs of small and medium-sized mortgage lenders (think local banks, credit unions, etc.). The 159,500 mortgage professionals who actively use Ellie's Encompass platform can get credit reports, check for product eligibility, obtain automated underwriting, procure appraisals, and much more -- all on the same platform.

The company went public in 2011, and the stock has returned over 1,100% since. Looking at some key metrics, it's not hard to see why Ellie's stock has done so well:

Data source: SEC filings

I presented average revenue per Encompass user (ARPU) first for a reason. Because of rising mortgage rates in 2013, business slowed considerably for Ellie, as reflected in the ARPU dipping 10%. This isn't all that different from what's happening right now.

But if you click the "Active Encompass Users" tab, you'll see that the company still captured more and more of the highly fragmented mortgage software industry -- with active users jumping 24% to 92,000. Even in the face of a slowdown in the industry, Ellie Mae still has lots of market share to capture. And even in 2013, when business was slower, the company was still able to grow revenue by 25%.

The real secret sauce

But while these metrics are encouraging, they alone aren't enough to convince me to put my family's hard-earned cash behind the company's stock. For that, I look to the company's sustainable competitive advantages -- often referred to as a "moat" in investing circles. The simplest way to explain moats is that they are the special "something" that distinguishes a company from its competitors.

In Ellie Mae, we've got two strong forces at play. The first is the network effect. As more mortgage lenders use Encompass, companies that provide other services (insurance, appraisals, titles, etc.) are incentivized to use Encompass; it brings them more business. And as title, insurance, and appraisal officers use Encompass, mortgage lenders are incentivized to use the network. It's a virtuous cycle.

The second moat comes from high switching costs. If a mortgage company has trained all of its employees on Encompass -- and is keeping all of its data on the network -- then it would be loath to switch providers. Not only would that be costly, but -- perhaps more importantly -- it would be an enormous headache, leading to employee retraining on a new platform, and downtime to conduct the training.

As long as Ellie Mae doesn't charge ridiculous rates, and the service is still working, most customers would rather stick with Encompass than shop around for something better.

The big takeaway

It's entirely possible that the mortgage industry will slow with the onset of Trump's presidency. I really don't care either way: I intend to hold these shares for far longer than anyone will be in office. Mortgage lending will ebb and flow -- that's how this works.

But given the moats that Ellie Mae has, I have faith that it will still be providing critical services to the industry when I eventually sell my shares...decades from now.

Brian Stoffel owns shares of Ellie Mae. The Motley Fool owns shares of and recommends Ellie Mae. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.