Canadian National Railway Company (TSX:CNR)(NYSE:CNI) has pulled back in the past two months, and investors should see the drop as an opportunity to buy the stock.

Here’s why.

1. Earnings strength

The railway industry is facing some economic headwinds, but CN continues to deliver solid results.

The company generated Q1 2016 net income of $792 million, up 13% compared with the same period last year. Revenue actually fell by 4%, but CN managed to boost profits through efficiency gains, strong results from its U.S.-based operations, and a diversified revenue stream.

CN’s operating ratio came in at 58.9% in the first quarter, down 6.8 points from Q1 2015. A lower number is more desirable because it indicates the company’s operating costs as a percentage of revenue.

On the currency side, CN generates significant revenue south of the border, and the company’s earnings get a nice boost when the greenback is stronger than the loonie. At the moment every dollar of U.S-based profits converts to CAD$1.28.

CN’s largest strength might be the sheer diversity of its business. The oil rout has taken a toll on CN’s energy-related business, but there is a flip side to the story that benefits other segments. For example, the resulting fall in the Canadian dollar is helping the forestry and automotive sectors. Forestry carloads rose 4% in the first quarter compared with Q1 2015, and automotive carloads jumped 21%.

2. Dividend growth

CN generates significant free cash flow and does a great job of returning the profits to shareholders. The company raised the dividend by 20% earlier this year, and investors have enjoyed average annual distribution gains of 17% over the past two decades.

The current payout offers a yield of about 2%.

3. Competitive advantage

Investors with a buy-and-hold strategy should look for companies that hold dominant positions in industries with high barriers to entry. CN is about as good as it gets when looking at these metrics.

The company is widely regarded as the best-run railway in North America and operates the only rail network that has access to three coasts.

The odds are pretty much zero that another company would build competing lines along the same routs, and CN is investing heavily in intermodal hubs across its network to help it compete more effectively with long-haul trucking companies.

4. Returns

Past performance is no guarantee of future gains, but there is value in looking at how a company has performed over time.

A $10,000 investment in CN just 15 years ago would be worth $108,000 today with the dividends reinvested.

Just released! One top stock for 2016 and beyond

Exports of liquefied natural gas could be one of the best growth opportunities out there for long-term investors. And, we think we've identified the Canadian company to invest in. It's a global company with operations across nearly 20 countries and 70 locations. We like it so much, we've named it as 1 Top Stock for 2016 and Beyond. To find out why, click here now to learn how to access your FREE copy today!

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 Andrew Walker 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.