If you're planning to buy a stock and its price goes up, there is a decision to be made: Will those shares continue to rise, or has the ship sailed?

The Chemours Company (NYSE:CC), SolarEdge Technologies (NASDAQ:SEDG), and Tesla (NASDAQ:TSLA) are three stocks that have seen massive share price increases. But if they can deliver the performance the market seems to be expecting, they could still be good values. Is that likely to happen?

A compass face with the arrow pointing to a sign reading excellence.

High-flying stocks can come from any industry, but it's important to consider whether the stock market may have overpriced the company's shares. Image source: Getty Images.

The top of the cycle

You might have never heard of a chemical called titanium dioxide, but it's everywhere. The substance is used as a food additive, but more importantly as the primary pigment in white paint. And The Chemours -- which was spun off by DuPont prior to its merger with Dow Chemical to form DowDuPont -- is one of the world's leading suppliers of the stuff.

After the spinoff, Chemours had a rough ride. DuPont had loaded the company up with $4 billion in debt, and as if that wasn't bad enough, it also saddled the new company with some potentially crippling legal liabilities. Meanwhile, the titanium dioxide market -- which, as a paint pigment, was dependent on the weak housing, construction, and automotive markets -- was slumping.

All that has changed, though: Chemours and DuPont were able to settle the most serious of the lawsuits out of court, the construction, housing, and automotive markets -- and, hence, the titanium dioxide market -- have improved, and the stock's price has risen 132.6% so far this year.

But Chemours is still a company with a lot of problems. After paying down some debt in 2016, the company's long-term debt is now back up to more than $4 billion. Net income was up in the first two quarters of 2017, but in Q3 was just 1% higher than the year-ago quarter. Not to mention, at some point the titanium dioxide market will soften again. Chemours will have to do better to justify its current valuation.

A potential pitfall

Unlike Chemours, SolarEdge Technologies has had a good reason for the recent meteoric rise of its stock price (193.1% so far this year). While most of the hype in the solar industry surrounds companies that manufacture actual solar panels -- industry insiders refer to them as "modules" -- SolarEdge isn't one of them.

Instead, it manufactures the electrical components of a solar-energy system, like the inverters -- which transform direct current from the panels to alternating current -- and optimizers -- which maximize the system's energy output. They're vital components, and as SolarEdge's recent performance has shown, incredibly lucrative.

The company's stock has nearly tripled in 2017, from under $13 per share in January to about $34 per share today. And considering it's been increasing its share of a fast-growing market, SolarEdge's share price could keep rising. But there's a big potential pitfall: tariffs. The quickly falling prices of solar-power systems have helped fuel SolarEdge's rise, but if the U.S. introduces tariffs on these systems -- which is looking more and more likely -- the company's stock rise could quickly turn into a fall.

The big one

When talking about companies with premium valuations, Tesla must be mentioned. Even after the company's recent disappointing quarterly earnings report, its stock price is still up more than 800% over the past five years, and 44.3% this year alone.

The company's lofty valuation -- its market cap is larger than General Motors' or Ford's -- isn't completely without merit. Tesla is selling more cars than ever, and its Gigafactory is on its way to being fully operational in 2020. Preorders for the company's new Model 3 are pouring in.

On the other hand, the company has yet to turn a profit, manufactures a tiny fraction of the number of cars produced by GM or Ford, and faces fundamental operational risks if one of any number of other things happens.

I'm cautiously optimistic that Tesla will prevail, and the company's recent price drop may make this as good a time as any to buy in. But it isn't a slam-dunk investment, and it's certainly not as good a value proposition as it was a year ago. Remember, even Tesla CEO Elon Musk has questioned the company's lofty valuation.

Investor takeaway

For these three companies, it seems unlikely Chemours will live up to its valuation, while SolarEdge and Tesla are better bets. But if one little thing goes wrong, either company's share price could drop. I wouldn't buy either of these companies unless I was prepared to stomach some risk.

John Bromels owns shares of DowDuPont Inc., Ford, and Tesla. The Motley Fool owns shares of and recommends Ford and Tesla. The Motley Fool has a disclosure policy.