It takes the average stock about seven years to double in value while the S&P 500 typically gains about 10% each year. However, three stocks accomplished that feat in just the past six months: Bristow Group (NYSE:BRS), W&T Offshore (NYSE:WTI), and California Resources (OTC:CRC). But before you run out to buy them in hopes of riding their current momentum, it's important to know the reason why they've rocketed higher and if they still have enough fuel to keep going.

Taking flight

Shares of helicopter services company Bristow Group soared 104% in the last six months, but not before investors had to first endure a bumpy ride. In the three years before that rally, the stock had tumbled nearly 90%, including crashing more than 33% last May after the company reported disappointing quarterly results. Shares, though, have since bounced sharply off that bottom.

A helicopter taking off from an offshore oil rig.

Image source: Getty Images.

Several factors ignited the rally, including the release of expectation-beating quarterly results in November, which alone fueled a jaw-dropping rally of nearly 45% that day. While the company gave back some ground a month later after issuing new debt, it has recovered since then by riding the coattails of scorching-hot oil prices, which have risen by a third in the past six months. The reason for this rebound is the belief that higher oil prices should cause oil companies to increase their offshore drilling activities, which could fuel demand for the company's helicopter services as it ferries more oil workers to those rigs. That said, if crude takes a tumble, it could cause the turbulence to return to Bristow's stock.

Striking oil at just the right time

W&T Offshore's stock has been on a tear for the last six months, climbing more than 135% over that period and about 40% in the past month. That has helped it begin crawling back from its nearly 85% tumble during the oil market downturn.

The offshore oil producer's stunning run started in September after the company provided the market with an operational update following Hurricane Harvey. W&T Offshore noted that it only deferred about 43,000 barrels of oil equivalent production in the wake of the storm and that none of its production platforms sustained any damage. As a result, it quickly restarted operations and returned to pre-storm production levels. A subsequent update in late December added more fuel to the rally when the company noted that it struck oil in two of its three most recent exploration wells. One of those wells is already producing and the other should come on line in the next year. This flurry of production is happening just as oil prices are improving, which should provide the company with a gusher of cash flow in the coming year if crude prices hold up.

An oil platform in the Gulf of Mexico.

Image source: Getty Images.

Riding the oil wave higher

California Resources led this trio with a remarkable 157% gain in the last six months as the company began the long road to recovery after crashing 90% in the previous three years due to plunging oil prices. Those much lower prices had a dramatic impact on the California oil producer's operations. Because of its elevated debt levels, it wasn't producing enough cash to meet its financial obligations and invest into maintaining its production. In fact, output through the third quarter of last year was down 8% versus the same period in 2016 because the company was using much of its cash flow to pay down debt instead of investing in new oil wells.

However, with crude prices bouncing back, California Resources should begin generating enough cash to both meet its financial obligations and grow production again. That has already started easing market fears that this still-deeply indebted oil company will survive the market downturn without having to restructure through bankruptcy.

What oil gives it can quickly take away

One single factor fueled the triple-digit rebound in these stocks: oil. The rapid rebound in crude prices in the last six months has provided them all with more cash flow to improve their financial situations, which is causing investors to buy up their beaten-down shares. Consequently, these companies need oil to continue going higher to maintain their momentum. Meanwhile, if crude gives back some of its gains, these three will undoubtedly give back a substantial portion of theirs. That's why investors are better off avoiding this troubled group and instead consider investing in oil stocks that can thrive even if oil heads much lower.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.