Brick-and-mortar retailers have struggled in recent years as online competition and, often, cannibalization from the stores' own e-commerce operations have eaten into margins and sales growth. One store that has bucked this trend is Ollie's Bargain Outlet Holdings Inc. (NASDAQ:OLLI). Since going public in July 2015, the quirky discount retailer has gained an astounding 165%, almost quintupling the S&P 500's 34% return over the same period.

The company's stock price rally has been largely fueled by fundamentals, as Ollie's continues to turn in solid quarters.

OLLI Chart

OLLI data by YCharts

In the company's third-quarter financial results, net sales rose to $238.1 million, an 18% increase year over year, and adjusted net earnings per share grew to $0.22, up 29%. The strong top- and bottom-line growth was driven by a mixture in same-store-sales growth of 2.1% and the opening of 33 new store locations over the trailing 12 months, good for a 14% store count increase.

So, what's the secret to Ollie's Bargain Outlet's success? On the company's website, the company bills itself as "one of America's largest retailers of closeout merchandise and excess inventory." In the company's conference calls, management consistently points to three key factors that keep customers coming back for more: a true treasure-hunting shopping experience, a first-class customer loyalty program the company dubs Ollie's Army, and a steady increase in store count every quarter.

Let's take a closer look at all three of these ingredients to determine if they can make for a successful investment recipe.

Sales tags hanging on threads.

Ollie's has found success by offering "good stuff cheap." Image source: Getty Images.

A unique shopping experience

Ollie's has perfected the treasure-hunting experience. Consumers rarely know what deals or products they'll find while browsing the store's aisles, and Ollie's and its vendors like it that way. According to management, many of the supply lines the company has established with brand-name products are contingent on not advertising or publicly promoting these products and what prices they're selling for. Even in the company's third-quarter conference call, CEO Mark Butler refused to divulge this information, even while letting on that the current closeout buying environment is the best he's ever seen in the industry:

[W]e are laser-focused on getting name brands at drastically reduced prices, and some of the greatest names in America are in our stores, of which I will tell you none of them. But it's certainly exciting the consumer. They're responding; we're offering them bargains; we're developing these relationships; we're strengthening these relationships. And the entire environment -- consistent with what I think I've said two or three quarters is, this is the best closeout buying environment that I've seen, and I've been doing this for 35 years, so -- and obviously that's in relation here to Ollie's. So, it's the strongest that I've ever seen, and our pipeline is full, our brands are big, bright, and beautiful, and they're bargains, so I feel really good about where we're at.

However, Ollie's manages to find great deals beyond its relationship with brand-name consumer product vendors. For instance, in late 2016 a giant ocean freight shipping carrier, Hanjin Shipping, declared bankruptcy. This development threw global commerce into chaos because so much merchandise was stranded on the bankrupt company's ships, sitting outside ports, as no one was paying to offload these goods. Ollie's saw this as an opportunity and issued a press release stating it had $100 million available to purchase the goods from merchants that couldn't afford to wait.

An army of loyal shoppers

Ollie's Army is the company's customer loyalty program. Customers can request a card at any Ollie's location and, upon filling out the requisite information, begin receiving discount offers in the mail. The company publicizes the program using its characteristic humor, saying, "The bigger the cheapskate you are, the more you'll save!" Once a year, just before Christmas, the company's locations host Ollie's Army Night, an evening of shopping reserved just for members of the program, with plenty of special discounts. It is consistently the company's busiest night of the year.

In the third quarter, Ollie's Army's ranks swelled to 8.1 million members, a 22% increase year over year. Members of the program spend more than non-members and comprise 65% of the company's total sales.

In a move Butler has been telegraphing for a while, the company will be adding ranks to Ollie's Army to further engage its members this coming year. The ranks will range from one to three stars and will be dependent upon how much the customers spend and frequent Ollie's stores. The higher the rank, the more discount offers members will receive. The move also comes as Ollie's has added internal capabilities that will allow it to gather and compile more data on its customers' habits.

A rising store count

Cartoon image of Ollie's mascot holding a closeout sign.

Ollie's is projecting store count growth in the mid-teens for 2018. Image source: Ollie's Bargain Outlet Holdings, Inc.

Ollie's finished the third quarter with 265 retail locations, up from the 232 locations the company was operating a year ago. In the conference call, CFO John Swygert forecast a mid-teens percentage growth in store count next year as well. With such a limited store count and a presence in only 20 states, Ollie's Bargain Outlets has a potentially long runway of growth before it comes close to slowing down the number of openings or begins to cannibalize its own sales.

Ollie's, Ollie's, oxen free

It's hard to find retailers that are immune to e-commerce pressures, possess a visible line of growth, and have a robust army of loyal shoppers at their command. Yet this is exactly what Ollie's Bargain Outlet shareholders have found. Ollie's is projecting full-year adjusted EPS of $1.23, giving the company a rich valuation with a P/E ratio of about 45. Yet the company paid a tax rate of 38% in the third quarter, meaning it will benefit immensely from the tax legislation Congress passed late last year. Given the boost from tax reform and the other catalysts the company has going for it, the best bargain at Ollie's just might be its shares.

Matthew Cochrane has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.