The stock market is near its highest level ever, but that doesn't mean there aren't attractive long-term investment opportunities. Here are two stocks in particular that could be excellent bargains right now and have lots of potential to produce market-beating returns for years to come.

Up more than 200% in one year, but still looks cheap

At the beginning of 2023, Dream Finders Homes (DFH 2.69%) expected that it would close on 6,000 homes for the year, which would be a year-over-year decline in a weak real estate market. But the company (and most experts) didn't realize how excellent conditions would be for homebuilders. With existing home inventories at near-record lows and high mortgage rates, homebuilders have some big competitive advantages – such as the ability to create more inventory and the ability to offer financing incentives.

The guidance was later raised to 6,500 home closings, then to 6,750 as we headed into the fourth quarter. Well, in Dream Finders' latest earnings report, we learned that the company closed on 7,314 homes in 2023 -- far beyond its own expectations.

Not only were home closings higher, but revenue and earnings both looked much stronger than expected. The company's average home selling price increased by 7% year over year, and Dream Finders entered 2024 with its highest liquidity level ever. Including the recent acquisition of regional builder Crescent Homes, Dream Finders expects to reach 8,250 closings in 2024.

Despite its stock price more than tripling over the past year, Dream Finders still looks remarkably cheap, especially considering its growth, as shares trade for just 13.5 times forward earnings.

An ultra-cheap REIT with room to grow

EPR Properties (EPR -0.32%) isn't exactly a household name, but many of this real estate investment trust's tenants are companies you are likely familiar with.

Specifically, EPR is an "experiential" REIT that owns movie theaters, eat-and-play properties, ski resorts, waterparks, and more. If you've ever played at a TopGolf, there's a decent chance EPR owned the real estate you were standing in. Leading ski resort operator Vail Resorts (NYSE: MTN) is another EPR tenant.

Despite strong fourth-quarter results, an 8.2% yield that is well-covered by earnings, and a strong track record of responsible growth, EPR Properties trades for a rock-bottom valuation of about 9 times forward earnings (funds from operations) guidance. There are two big reasons.

One is the movie theater exposure, which accounts for more than 40% of EPR's rent, especially with AMC Entertainment (NYSE: AMC) as the company's top tenant. While box office revenue grew sharply in 2023, there are serious (valid) concerns about the industry going forward. However, with a portfolio of top-tier theaters, EPR should be in good shape even if we see industry consolidation.

Another reason is the high-interest-rate environment, which is generally a negative catalyst for yield-focused investments like REITs. In EPR's particular case, the company has pumped the brakes on growth due to the historically high cost of capital. On the other hand, as rates start to normalize, the stock could be a huge beneficiary, especially if the movie theater industry has a strong 2024.

To be sure, both of these stocks can be rather volatile over shorter periods, so keep this in mind before you invest. But if you're looking to put money to work right now and have a long-term investing time frame, these two stocks could be excellent choices for your portfolio.