What happened

Shares of homebuilder LGI Homes (LGIH 2.41%) rocketed 10.2% higher as of 12:15 p.m. EDT Tuesday.

So what

Investors were nervous heading into LGI's earnings news this morning -- the stock traded down by about 10% over the past two weeks -- but no longer. Now that LGI has reported earnings, the stock is retesting its recent highs of around $32 a share.

So what did LGI say to spark this sudden rally in its stock? Basically, the company "beat expectations" on both sales and profits. Wall Street analysts had told investors to expect $0.50 per share in profit on $161 million in revenues at LGI. Instead, the company reported $0.55 per share on $162.9 million in sales.

On the one hand, this was worse than LGI reported last year. On the other, though, investors had expected weaker results -- and were enthused to learn that the results weren't as weak as feared.

Stick figure pointing to rising stock chart

Here's why LGI Homes stock is up today -- and why it might not last. Image source: Getty Images.

Now what

That doesn't mean that things are going great for LGI, however. The $0.55-per-share profit was still two cents less than the company earned in last year's first quarter. LGI also closed 10% fewer home sales this year than last year. In fact, the only reason sales rose at all this past quarter was that the average sales price of LGI's homes climbed 11.2%.

That's a trend that can't continue if LGI wants to hit its earnings-per-share guidance for 2017 of $4.00 to $4.50. So while management is hopeful that the downturn in closings seen in Q1 will turn back up, and that "closings for 2017 [will] be weighted toward the second half of the year," that's not certain to happen.

Perverse as it may seem, right now might be a good time to take profits on LGI Homes stock -- just in case the hoped-for rebound does not materialize.