Having a long time horizon in investing is crucial to getting a good return. Even with the stock market at record highs, there are companies whose stock will look like bargains in hindsight a few years from now. In 2008, companies like Booking Holdings (formerly Priceline.com) and Intuit may have fallen precipitously during the bear market that year, but they have each since come back to deliver more than 10 times what investors paid at the time, even if they bought at the peak just before the bear market hit. 

So if you have $10,000 in uncommitted funds and a long investing time horizon, here are three stocks to buy right now. This trifecta offers diversification by market capitalization, industry, age, and perceived risk. Microsoft (MSFT 1.82%), Markel (MKL -1.00%), and Rocket Companies (RKT 1.23%) are very different, but they all offer clear paths to growth over the next decade for investors patient enough to ignore the day-to-day noise of the market. Let's take a closer look.

Plants growing out of stacks of coins

Image source: Getty Images.

1. Microsoft

Microsoft is a household name, but even those who use the company's ubiquitous products at work every day may not appreciate how different the business is than the one CEO Satya Nadella took over in 2014. In the fiscal year ended June 30, the company reported revenue of $143 billion, 13.6% growth from 2019. The source of much of that audacious revenue total would have been unimaginable a decade ago.

The company has turned its Office suite of productivity products into a cloud-based subscription service that continues to grow in both the commercial and consumer segments. On top of that, the company's cloud services -- Microsoft Azure -- may trail Amazon's and Google's offerings in awareness, but not in performance. The service has grown steadily since its introduction in 2010 and is estimated to generate $61 billion annually while still growing at a 48% year-over-year clip. Add in acquisitions of LinkedIn and GitHub, platforms for professional networking and software development, respectively, along with the recent release of its next-generation Xbox gaming console, and it's clear to see how Microsoft will continue growing over the next decade.

2. Markel

To the untrained eye, Markel is a boring insurance company that dabbles in investing. To those who own shares in the company, it's the Berkshire Hathaway model applied on a smaller scale, complete with a charismatic investing leader and an annual meeting in Omaha, Nebraska. Tom Gaynor, the company's co-CEO and former chief investment officer, has hosted a brunch for shareholders in Omaha the same weekend as the iconic Berkshire meeting with Warren Buffett and Charlie Munger for years to share the company's approach with investors.

The concept is simple, but as with Berkshire, uses compounding over time as its most valuable ingredient. Markel writes insurance policies, often providing insurance to businesses traditional insurers are reluctant to take on, such as ranches, yachts, summer camps, and karate schools. Because the company has been doing it for years, it has the data to correctly price policies better than competitors. This experience shows up in the combined ratio -- the percentage of insurance premiums that the company pays out as claims. It has consistently beaten the industry average since 2013. Remember, combined ratios under 100% mean profit.

Management has opportunistically used these profits to invest in stocks and buy businesses, much like Warren Buffett. The strategy has proven successful. In the last decade, revenue, free cash flow, and book value have all grown substantially. Most importantly for investors, so has the stock price. For those with the time and patience to let a proven model keep compounding, Markel offers a great investment right now.

Markel's Metrics In 2010 Trailing 12 Months % Growth
Revenue $2.3 billion $8.9 billion 300%
Free cash flow $0.2 billion $1.7 billion 852%
Per-share book value $326 $820 152%
Share price $343 $983 187%

Data source: Morningstar.

3. Rocket Companies

Unlike Microsoft and Markel, Rocket Companies has only been publicly traded for a few months. The company has rapidly built a brand associated with streamlining the antiquated mortgage application process by moving it online. It's clear the demand for a simplified service exists. Even during a pandemic, it originated more than twice the loan volume in its latest quarter (ending in September) as it did in the same quarter in 2019. While the company's loan volume grew 122%, its adjusted revenue and net income grew 163% and 365%, respectively. Rocket is also building a strong brand. The company has been named to J.D. Power's top spot in mortgage origination for 11 consecutive years and for mortgage servicing for seven years in a row. With accolades like this, it's no surprise the company's market share of 9% in 2019 led the mortgage lending industry. 

With the housing market booming -- 2020 sales will outpace last year despite the pandemic -- the stock is curiously near its lows as a public company. With September existing-home sales up 20% over last year, according to the National Association of Realtors, don't expect the good times to end any time soon. It is often said that investors are always fearing the last crisis, and the housing boom and bust of the mid-2000s would weigh on the mind of anyone who went through it. But with Americans reportedly looking for more space in the suburbs, and a new generation of first-time homebuyers hitting the market, I believe Rocket Companies is a buy right now.