Since going public in 2010, energy services company Ameresco, (AMRC 1.53%) has had a tough time. Revenue may be up 42% from the peak in 2012, but since then, sales and earnings are way down:

AMRC Revenue (TTM) Chart

AMRC Revenue (TTM) data by YCharts.

However, it's looking like -- at last -- the tide may be turning. Let's take a closer look at some of the key takeaways from the second quarter's earnings report, released on July 30.

Blame Canada? Hopefully not going forward
Ameresco reported a surprise loss in the first quarter, almost all of which it attributed to Canada, where the company took a $3.9 million loss on a single project. For context, its total loss in the first quarter was $4.2 million. With expected weakness in overall Canadian sales and foreign exchange headwinds factored in, essentially all of Q1's loss was tied to our neighbors to the north. 

While the company made no mention of that specific deal or the overall market in Canada in the second-quarter earnings report, it did report that "Net income was lower despite the higher operating income due to a higher tax rate as a result of a valuation allowance for losses expected in Canada during 2015."

The project is set to complete at some point later in 2015, but management reserved for the losses this project will incur in the first quarter. On the Q1 earnings call, management expected that Canada would return to breakeven or slight profitability in the second quarter.

U.S. segments performing well 
Ameresco's U.S federal business was up 17% in the quarter, after it nearly doubled in the first quarter, so there's some hope that the investment in infrastructure that has been sorely lacking for decades -- and that's been a pretty big part of the investment thesis for Ameresco -- is finally beginning to pick up. 

Similarly, U.S. segment revenue jumped 19% in Q2, following a 15% increase in the first quarter. A few quarters don't make a trend, but it's at least a decent move in the right direction after several tough years. 

Looking ahead: Reaffirmed guidance for full-year sales and earnings 
After several quarters of relatively strong backlog growth and improving sales in key U.S. markets, management reaffirmed the company's guidance for the full year. That includes revenue of $610 million to $640 million, and earnings per share between $0.16 and $0.24. Considering that it is still in the red for earnings per share so far this year and has produced less than $300 million in sales, there's a lot of work to do. 

However, the relative strength in the backlog, which grew again in the quarter, is another mini trend that indicates the company could very well reach its full-year goals. Hopefully, the general improvements become the long-term infrastructure investment trends that investors have been waiting for since the company went public six years ago.