The broad market may struggle in the coming months to hold onto the remarkable gains it put up over the course of the past year. Not every single stock out there will be subject to summertime weakness, though. If you can find a name far enough off the beaten path that comes with the right backstory, you might be surprised at how well that pick can defy the headwinds, and defy the odds.

Consider, for example, these three small-cap stocks. None of them are household names -- but that's the point. These little gems' successes can become a big deal when the market's bigger names aren't living up to expectations. 

Clock face with second, minute, and hour hands spelling out "time to buy."

Image source: Getty Images.

1. Remember the Alamo ... Group

While President Joe Biden's infrastructure spending plan touches on a lot of things that haven't traditionally been considered infrastructure -- like child care and technological R&D -- it's still first and foremost a plan to repair and upgrade the nation's roads, bridges, waterways, and the like. It earmarks more than $600 billion for railways, airports, and roads, while at the same time supporting the rapidly expanding use of electric vehicles and curbing carbon dioxide emissions. More than $100 billion is to be allocated to repairing the nation's existing schools and building new ones, while another $100 million will be aimed at overhauling the country's water transportation networks. All of this work will require a lot of heavy equipment.

Enter Alamo Group (ALG -2.88%). While some may know it as a manufacturer of heavy-duty lawnmowers (the kind you see mowing the berms along the sides of highways), that's not all this company produces. It also makes backhoes, excavators, and aerial tree trimmers. All of these are going to be in higher demand if Congress passes an infrastructure bill. But even if the bill's passage is delayed or its ambitious scope is dialed back by legislators, some sort of significant infrastructure plan seems inevitable.

Shares of Alamo Group are up by more than 100% from the low they fell to in March 2020, and up by more than 30% from where they began 2020. That doesn't mean there's no room for more gains, though. The stock's price-to-earnings (P/E) ratio of 33 is palatable, particularly given this year's expected earnings growth of 42% and next year's projected profit growth of nearly 13%.

2. Perficient is boring but unstoppable

In simplest terms, Perficient (PRFT -3.61%) helps companies realize their digital dreams. It's primarily a consulting firm, but its deep expertise allows it to lead its clients through projects like product development, marketing optimization, and the installation of new technology platforms.

And it's good at what it does. Sporting goods retailer MonkeySports saw double-digit percentage growth in its e-commerce business after Perficient helped it migrate to a newer, more powerful online sales platform. Sally Beauty Holdings just hired the company to help overhaul its online order fulfillment platform. Perficient is also proving a particularly popular digital consultant among healthcare organizations.

This company is never going to be an ultra-high-growth machine. What it lacks in "wow!" factor, however, it more than makes up for in resilience. Last year's top line was up 8% despite the turbulence caused by the pandemic, and the company's calling for around 15% sales growth this year, in line with analysts' expectations. These same analysts are modeling sales growth of 9% for 2022, with earnings improvements for each of those years expected to slightly outpace revenue growth.

3. NeoGenomics is a great aggregator

Finally, add NeoGenomics (NEO -1.23%) to your list of small-cap stocks to buy now.

Last year was a challenging one for the oncology diagnostics company, but not exactly due to a lack of demand for its products. Testing was temporarily down because people were wary of visiting their doctors, more afraid of contracting COVID-19 in a healthcare setting than they were of not knowing what might be causing their non-coronavirus-related symptoms.

That's already changing though, and rapidly. Revenue for 2020's fourth quarter was up 18% year over year, and  NeoGenomics followed that with a 9% sales improvement in Q1. Analysts are calling for 12% revenue growth this year, and forecasting an acceleration to nearly 17% in 2022. Profits should more than double between last year's bottom line and next year's if analysts' consensus earnings per share estimation of $0.36 for 2022 is on target.

Largely being overlooked by investors is this company's history of growth through acquisitions and the potential for more such deals down the road.

NeoGenomics already offers hundreds of medical diagnostic tests. Adding more only makes the organization even more of a one-stop-shop for its customers. To this end, in March, it announced a new testing partnership with Elevation Oncology to identify certain solid tumors. Later that month, it announced plans to acquire Trapelo Health, moving the company deeper into an area known as precision oncology. And just a few days ago, it unveiled its intent to buy Inivata, which specializes in liquid biopsies.

These are all relatively insignificant deals in terms of NeoGenomics' scope. But the currently fragmented diagnostics space would be much more efficient and profitable if more of it were aggregated under one roof. NeoGenomics is simply providing that roof.