What happened

Shares of Vertex Energy (VTNR -1.80%) rose in dramatic fashion on Tuesday, gaining as much as 34% in early trading. Although the stock quickly gave back some of that gain, by 10:46 a.m. EDT, it was still up by 22% or so. The reason for the advance was a combination of recent news and an analyst's reevaluation of the company's future based on that news.

So what

On May 26, Vertex -- one of the largest processors of used motor oil in the United States -- agreed to buy a refinery in Mobile, Alabama, from Royal Dutch Shell. The following day, the stock rallied on that news, as it represents a material growth opportunity for Vertex. Two days later, an H.C. Wainright analyst upgraded the stock, and the shares rallied again

Four people in protective gear in an energy processing facility.

Image source: Getty Images.

On Tuesday, yet another analyst came out with an upgrade, pushing the shares even higher. Given that the stock has advanced by a massive 400% or so since the refinery purchase was announced, the current rally is clearly related to excitement surrounding this news. And the business opportunity for Vertex could be material, given that this morning, Stifel increased its price target on the stock from $2 to $17. It has a buy rating on the name.

The big story is that converting this refinery to produce renewable fuels will likely be cheaper than building a new refinery from the ground up. And that will position Vertex to prosper as the world shifts toward cleaner energy alternatives. It's worth noting that the upgrade at the end of last week from H.C. Wainright was even larger, taking the target price from $4 to $25, with a buy rating.   

Now what

Clearly, investors' emotions are running high with regard to Vertex, though it should be noted that the energy sector has broadly benefited Tuesday from rising oil prices. Still, after such a large run-up in the share price over the last few days, long-term investors should probably tread with caution here. In fact, the swift pullback that followed Tuesday's early spike suggests that animal spirits may have priced in a bit too much good news, given that the benefit of the acquisition will take time to play out. Indeed, even after Vertex closes on the facility purchase (hopefully, later this year), it will still have to invest time and money in it before the facility will be able to produce the cleaner energy options that have investors so excited.