Back in January, Cree (NASDAQ:CREE) shares lost a quarter of their market value the day following the company's mediocre second-quarter report and a concurrent third-quarter earnings warning. Since then, the stock has fallen further, trading down in the low $20s -- this after reaching highs above $40 per share in December.

But Thursday after the bell, the LED maker rebounded with a relatively solid third-quarter report.

Cree said that revenues in the third quarter climbed 25% to $96.7 million, boosting net income up 37% to $20.7 million, or $0.27 per share compared with the year-earlier quarter. The latter figure came in at the high end of the guidance issued in January and beat the analyst estimate by a penny per share.

Gross margins, which had fallen from 56% in the first quarter to 50% in the second quarter -- and part of the concern causing the stock's selloff -- climbed back up to 53% in the third quarter, which compares favorably with its 49% gross margin over the same period last year. Notably, two percentage points of the improvement are attributable to adjustments to the company's sales return provision. In addition, margins were helped by a 6% sequential rise in LED average selling prices (ASPs) and a 5% decline in LED unit costs.

Driving the rise in LED ASPs was a continued shift in product mix to high-brightness LEDs, which made up 66% of LED sales, as compared with 52% during the second quarter. Meanwhile, mid-brightness LEDs saw their contribution fall to 31% during the third quarter from 42% in the second quarter.

In the earnings conference call (transcript provided by Thomson StreetEvents), CEO Chuck Swoboda noted an overall sequential decline in LED demand, in part because of seasonally weak demand in mobile phones. But despite a 4% sequential decline (from the second quarter) in LED unit sales, the higher ASPs helped Cree manage to grow LED sales to $80.6 million from $78.8 million in the second quarter.

Cree's stock, which had doubled last year on its way past $40, had clearly gotten ahead of itself. But at its current price of around $23 per share, the stock is trading at relatively attractive 20 times next year's earnings, a reasonable price for the LED business alone -- not factoring prospects in the company's fledgling power devices and microwave businesses, among other businesses based on Cree's expertise of silicon carbide (SiC) and gallium nitride (GaN).

The company took advantage of the stock's fall by buying back $35.3 million worth of stock during the quarter, or 1.45 million shares at an average of $24.32 per share.

Looking ahead, the company forecast fourth-quarter revenues of $98 to $102 million, 75% of which is booked or already under contract. Cree also expects to earn $0.25 to $0.28 per share, compared with the analyst estimate of $0.27 per share.

For more on Cree, check out:

Fool contributor Jeff Hwang owns shares of Cree. The Motley Fool has a disclosure policy.