What happened

Shares of Ameresco (AMRC -3.96%), an industry leader in energy-efficiency solutions for facilities throughout North America and Europe, extended the 7% rise they've experienced through the first seven months of the year and climbed 10% in August, according to S&P Market Intelligence. Crushing analyst's second-quarter earnings estimates of $0.06 per share, Ameresco reported earnings of $0.13 per share -- a welcome sight for a company that missed analysts' earnings estimates in the previous quarter.

So what 

Besides beating estimates, there were several bright spots in the Q2 report. For one, the company booked revenue of $166.7 million in the quarter -- a 2.5% increase over the same period last year.

More notable, however, was the company's improvements in controlling costs. Ameresco expanded its operating margin from 2.9% in Q2 2016 to 5.3% in this past quarter. Likewise, the net income margin grew to 3.6% from the 1.3% that it reported for the same period last year.

Arrows point upwards on a financial chart.

Image source: Getty Images.

In addition to the income statement, there were also improvements in the company's cash flow. Ameresco's cash used in operating activities, for example, was $19.6 million in Q2 -- a noticeable improvement over the $24.7 million that it used in Q2 2016. The improvement is even more pronounced when proceeds from federal energy savings performance contract (ESPC) projects is added. In doing this, Ameresco's adjusted operational cash flow was positive $19.6 million compared to an outflow of $2.3 million during the same period last year.

The company's quarterly performance aside, investors also took kindly to the company's outlook on the second half of 2017. Management reaffirmed guidance, expecting total revenue between $665 million and $700 million for fiscal 2017. Should the company achieve the midpoint of this range, it would represent a 4% compound annual growth rate since 2013.

Moreover, management is forecasting net income per share between $0.37 and $0.43. If the company achieves the midpoint of this range, it would represent a 54% increase over the $0.26 that it reported in fiscal 2016.

Now what

The growth on the top line was clearly a positive sign, but investors should note that it resulted from 39% growth in the U.S. federal segment -- growth that offset declines in revenue from the U.S. regions and Canada segments. Looking ahead, investors should continue to watch these segments to see if the company can reverse course and grow revenue from them, since government contracts may be waning in light of the Trump presidency.

In addition, investors should watch the company's backlog, which provides clarity into the company's near-term financials and allows it to plan accordingly. Although the company reported a record backlog in Q1, there was negligible growth in the recent quarter. And of course, investors should confirm that the company meets management's guidance at the end of fiscal 2017.

If Ameresco can accomplish these things, it would certainly raise a green flag, indicating that the company is managing to succeed under an administration that appears to be uninterested in energy efficiency and renewable-energy initiatives.