What happened

Shares of Brazilian water utility Companhia de Saneamento Basico do Estado de Sao Paulo (NYSE:SBS) -- Sabesp for short -- gained 9.3% in November. The stock is up 22.5% for the one-year period through Dec. 7, and British banking giant HSBC recently upgraded it from "hold" to "buy." 

For some context, the S&P 500 returned 3.1% in November and 20.1% for the same one-year period.

Water treatment plant.

Image source: Getty Images.

So what 

We can attribute Sabesp stock's November jump to the company's third-quarter earnings, released on on Nov. 14, that were better than Wall Street was expecting. In the quarter, Sabesp's year-over-year revenue edged down 5.6% to 3.54 billion Brazilian real, though earnings per share soared 57% to 1.32 real. The following day, Sabesp stock notched a closing gain of 5.3%, and over the course of the next week it rocketed up more than 17%, before giving up some of its post-earnings gains at the end of the month.

Sabesp's earnings got a boost from a 10.5% decrease in operating expenses, along with a decrease of 332.4 million Brazilian real in exchange-rate variation on loans and financing relative to the year-ago quarter. The latter is due to the devaluation of the U.S. dollar and Japanese yen against the real in the quarter (-4.2% and -4.5%, respectively), versus an appreciation of 1.1% and 2.7%, respectively, in the third quarter of 2016. 

Sabesp's financial performance -- and, hence, its stock price -- swings up and down along with fluctuations in exchange rates. That's because a good chunk of Sabesp's total debt outstanding is denominated in U.S. dollars and Japanese yen. 

Now what

Along with watching quarterly earnings, investors in Sabesp must keep their eyes on exchange rates. Declines in the value of the Brazilian real relative to the U.S. dollar and Japanese yen negatively affect Sabesp's earnings -- and vice versa. 

Beth McKenna has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.