It's natural for investors to be skittish about buying into a stock after a huge run up. After all, we're supposed to buy low right? However, investing in a company after its stock price has made major gains isn't always wrong; if it's a quality company with a strong business, you'll likely be rewarded over the long-term. For example, Control4 (CTRL) and Boeing Co. (BA -2.87%) had incredible run ups of 191% and 89%, respectively, in 2017, but they also have bright futures.

CTRL Chart

CTRL data by YCharts

A top smart home stock

It's difficult to believe a decade ago, many people were amazed by universal remotes that could control not only the TV, but the stereo and DVD player. Fast-forward to today, and the number of connected gadgets and devices in our homes is exploding, with everything from doors you can unlock with your phone to smart toilets. One company benefiting from this part of the Internet of Things trend is Control4, which sells premium systems to connect all your smart home dots.

Control4 doesn't dabble in small solutions. Rather, through its network of professional installers, it sells systems that can cost anywhere from $1,000 to $50,000 and connect between 25 to 125 products. Business is good: Its third-quarter pro forma revenue (adjusted for acquisition of Triad) was up 12% year over year, with non-GAAP net income up 49%. Both of those factors contributed to Control4's 2017 stock price gain of 191%.

That rise was incredible, but two factors suggest there's plenty of room for Control4 to run: market penetration and a beautiful balance sheet. Management estimates that among its core target market of U.S. households with annual incomes exceeding $150,000, it has only achieved a penetration of 2% so far, and the international opportunity is even larger. Further, unlike many young companies, Control4 also boasts a strong balance sheet with nearly $72 million of cash at the end of the third quarter, and zero debt. That means management can scoop up acquisitions that will benefit the company's growth or portfolio of products.

Sure, Control4 is priced for strong growth, and maybe investors can be patient, hope for a dip, and if one arrives, buy in at a better price. But one thing is clear: Its business isn't slowing down.

Still flying high

Boeing, a giant manufacturer of commercial airplanes and defense products, has made many investors happy over the past few years: Its stock has been on a massive rally, including a 89% jump in 2017 alone. The good news for investors is that Boeing has both a short-term catalyst and a long-term catalyst, plus a measure of safety thanks to its massive order backlog.

Image from inside a commercial airplane of a sunset and plane wing

Image source: Getty Images.

Boeing will be a major beneficiary of the recent corporate tax cuts, which should boost its already-strong cash flow even higher. In fact, analysts at JPMorgan noted that Boeing was expected to generate roughly $12 billion in cash during 2017; that's expected to jump to $13.1 billion in 2018 and $13.9 billion in 2019.

That short-term boost will be enjoyable for Boeing investors, but its long-term market outlook is just as rosy. Boeing's global forecast anticipates 41,030 commercial aircraft deliveries between 2017 and 2036 -- a $6.1 trillion pie that the company is positioned to carve out a significant slice of. Even if you're feeling cautious about how lucrative the short-term tax benefit or long-term market growth might be, you can sleep soundly at night thanks to the orders Boeing has already booked. Its commercial aircraft backlog was valued at roughly $412 billion as of the third quarter, and its defense backlog is valued at $56 billion -- roughly 5 years' worth of orders.