As of October 2015, Canadian stocks have dipped thanks to weak commodities such as oil, gold and other metals. The S&P/TSX Composite Index, one of the main Canadian stock indexes, is off nearly -5.3% on the year, but the pullback has created a buying opportunity for value investors and long-term investors. While oil production makes up only around 3% of Canada’s gross domestic product (GDP), the country has certainly felt the impact from oil’s bear market. Canada is the world's fifth-largest producer of oil, and oil makes up around 14% of the country's exports. The fall in oil price may have hurt Canada’s oil industry, but it has also stung the shipping and transportation industries, which are contracted to transfer petroleum for export and refining. Oil remains within the tight $40 to $50 range as it has since August 2015; however, with a large amount of supply still in the oil markets, it would be wise to turn to other areas of the Canadian economy. The following are three top Canadian stocks for long-term, buy-and-hold investors.

CGI Group, Inc.

CGI Group, Inc. (NYSE: GIB) is the fifth-largest information technology and business services company in the world, with operations in North America, Europe, the Middle East, Asia and Africa. CGI Group has been investing and allocating more company resources into developing cybersecurity services for its clients. In fact, CGI Group announced it has opened a new cybersecurity center in Finland. The new Cybersecurity Center allows CGI Group to see a full and complete view of any vulnerabilities and attacks, and it is designed for all sectors and industries around the world.

In addition to monitoring, the new cyber-threat services also provide preventative and corrective services to help ward off cyber-attacks or to help correct issues that make organizations more vulnerable to cyber hackers. This service allows organizations to focus only on business aspects, while CGI Group is tasked with full-time monitoring of its customers’ cybersecurity. Overall, the push into cybersecurity is a very smart move that could yield future earnings growth for CGI Group, as the industry continues to be in high demand.

From a fundamental analysis standpoint, CGI Group is off -3.3% year to date but is up almost 7% in the past year. CGI Group has a market cap of $10.35 billion, a price to earnings (P/E) of 16.26, and price-to-forward earnings of 13.91. While the stock does not trade at a discount to sales, book value or cash, CGI Group’s price-to-free cash flow is impressive at 12.64. Earnings are expected to climb 87.4% in 2015, 10.55% in 2016 and 8.14% over the next five years.

Canadian Solar, Inc.

Canadian Solar, Inc. (NASDAQ: CSIQ) is a manufacturer, developer, designer and distributor of solar panels, cells and other solar products. Canadian Solar serves both residential and commercial customers who are looking for solar kits to power their homes or businesses. Solar energy continues to receive more and more backing as clean energy continues to be a priority. Canadian Solar’s low-cost business model and its ability to continue expanding its customer base make it one of the industry’s leaders. Just last month, in September 2015, analysts at Stifel Financial Corp. initiated coverage of Canadian Solar at “buy” with a $25 price target. Additionally, analysts at investment management company OppenheimerFunds also initiated coverage at “outperform” with a $43 price target. Overall, sentiment around Canadian Solar has been strong despite being off almost -10.5% year to date.

From a valuation perspective, Canadian Solar has some very enticing fundamentals. P/E is at 5; price-to-forward earnings comes in at 7.56; P/E growth is at a steep discount of 0.39; price to sales (P/S) is also undervalued at 0.36; and price to cash is impressive at 2.99. The company is churning out cash, as can be determined with a price-to-free cash flow of 2.99, and earnings are expected to rise 552% in 2015, 18.1% in 2016 and 12.5% over the next five years.

Royal Bank of Canada

The Royal Bank of Canada (NYSE: RY) is a large money center bank that operates five business segments: personal and commercial banking; wealth management; insurance; investor and treasury services; and capital markets. The bank was founded in 1864 and serves a wide range of customers from retail consumers to governments and central banks. The Royal Bank of Canada is down -13.25% year to date, largely thought to be tied to oil’s decline. However, as mentioned earlier, the Canadian economy is not overly reliant on the price of crude oil like some other nations. In fact, when you consider over 75% of Canada’s exports go to the United States, you must consider that a stronger U.S. economy is more impactful and meaningful to the Canadian economy than depressed oil prices. With this in mind, the market’s discounting of Royal Bank of Canada is overblown.

Investors who choose to take advantage of Royal Bank of Canada’s discount will be surprised to see the undervalued state of this global bank. The bank has a P/E of 11.56; price-to-forward earnings of 10.74; price to book of 1.95; an undervalued price to cash of 0.34; and a very impressive price-to-free cash flow of 5.14. It has limited debt, offers a 4.27% dividend yield and posts a 43% profit margin. Earnings are forecasted to climb 9.4% in 2015, 4.46% in 2016 and 8.55% over the next five years.

Overall, the market seems to be overstating Canada’s oil exposure and driving prices lower. While Canada’s GDP is reliant on oil to the tune of 3%, measuring the country's exports and the health of the U.S. economy is more meaningful and accurate when you consider how much Canada exports south of its border. Being that the market has not grasped this reality, the pullback in Canadian stocks to this point may represent a good buying opportunity for long-term, buy-and-hold investors. Investors in Canadian equities should investigate undervalued stocks of CGI Group, Inc.; Canadian Solar, Inc.; and Royal Bank of Canada for long-term returns.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.