Railways are considered a barometre of the economy. If railroads see improved volumes, that’s a sign that more people are consuming, thus more goods need to be shipped. And when volumes drop, it’s a sign that things are slowing down. Railroads are also incredibly defensive investments; their wide moats prevent competitors from hopping on board. That’s why Warren Buffett not only invested in railroad stock, but outright purchased one.

Canadian National Railway Company  (TSX:CNR)(NYSE:CNI) is one of North America’s largest railroads with exposure to the Atlantic and Pacific oceans, plus the Gulf of Mexico. All told, its network has over 32,000 kilometres, which ensures that it can be a necessary cog in the Canadian and American economies.

But investors are now wondering whether they should invest in the railroad or if it might have reached its peak and is on its way back down. While I believe in owning companies for the long term and think railroads are always great assets, sometimes there are better times than others to be a buyer. And with it pushing higher highs, it might be a good time to be fearful.

One reason for that is because things are starting to slow down. In Canadian National’s third-quarter earnings, it had net income of $972 million, or $1.25 per share, which was down from $1 billion in the same quarter in 2015. Its revenue was $3 billion, which was down 6%. This was caused by a 4% decline in carloads. All told, things were on the slightly downward trend.

If the executives at Canadian National are to be believed, this isn’t likely to stop. Due to commodities experiencing significant volatility, there is no certainty about how much will be shipped from quarter to quarter. As the CMO, Jean-Jacques Ruest said, “volume is weak, will get weaker, and pricing is not the greatest.”

Now, here’s where things aren’t completely disastrous for Canadian National…

It is actually beating analyst expectations. I said that it had $3 billion in revenue, but what’s great is, that’s $600 million more than what analysts expected. And the $1.25 EPS clobbered the expected $0.91. Part of that has to do with its ability to keep costs under control.

Unlike other railroads, which are not the best at dealing with costs, Canadian National excels at keeping costs down. According to the third-quarter earnings, operating expenses were down by 7% to $1.6 billion. And thanks to a 53.3% operating ratio, a record for the company, it was able to keep its drop in income to a minimum. The operating ratio is the operating expenses as a percentage of revenue. So it costs about $0.533 per dollar in revenue.

And finally, its cash flow has remained relatively constant despite the drop in volume and pricing. So long as cash flow doesn’t start dipping significantly, the company will be able to continue paying the $0.375 per share. While 1.67% doesn’t sound like much, it’s far better than it used to be.

Here’s my stance on Canadian National Railway: I think it’s a great company, and over the long term, I believe the company will be much higher. However, there are opportunity losses, and there might be better places to invest your money.

How 1 Man Turned $10K Into Over $8 Million

Discover how one man turned a modest $10,600 investment into an $8,016,867 fortune.

Learn more about this man and how you can start down the path toward financial independence.

Simply click here to learn more

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Jacob Donnelly has no position in any stocks mentioned. David Gardner owns shares of Canadian National Railway. The Motley Fool owns shares of Canadian National Railway. Canadian National Railway is a recommendation of Stock Advisor Canada.