The TSX can be a tough place to invest in, especially considering that most of the stocks listed are in the commodities sector or are heavily correlated to commodities–oil in particular. This can present challenges, but I have two stocks that any beginning or seasoned investor could buy now and hold for the next +30 years.

I am a firm follower of Warren Buffett’s principles and have studied his teachings as well as Peter Lynch’s. Both investors concern themselves with finding fantastic businesses with durable competitive advantages or stocks that have a “moat” to prevent competitor entry. Both investors also invest in companies with a very long-term horizon in mind.

If you want to get terrific returns like investment legends Warren Buffett and Peter Lynch, then you’ve simply got to have a long-term horizon in mind. If your horizon is less than three years, then don’t invest in the markets because your capital might not be there when you need it down the road. If you want truly terrific results, you’ve got to think five, 10, or even 30 years down the road. This is when the power of compounding really pays off.

As soon as you identify your forever stock, you’ve got to make sure it’s priced at a margin of safety, meaning the stock is significantly undervalued such that the chance of losing money is greatly reduced. To achieve this margin of safety, the stock must be priced at a discount to its intrinsic value, meaning the price you pay is lower than the value of what you’re getting.

Forever stock #1: Toronto-Dominion Bank

One forever stock that is a terrific buy right now is Toronto-Dominion Bank (TSX:TD)(NYSE:TD). It’s what I believe is the best of the Big Five Canadian banking stocks. The stock has a huge exposure to the U.S. and is a terrific hedge against a falling loonie relative to the greenback as well as an excellently managed business.

The risk-management strategy at Toronto-Dominion Bank is absolutely fantastic, and its revenue stream is one of the most diversified among its peers in the Canadian banking sector. If there’s a Canadian housing collapse or another rout in oil prices, you can bet that Toronto-Dominion Bank will be doing just fine; it ups its dividend while others show weakness.

Want safety? Forget bonds and buy Toronto-Dominion Bank. It has a much better dividend yield and is one of the safest picks on the TSX.

Forever stock #2 Canadian National Railway Company

Billionaire Bill Gates loves Canadian National Railway Company  (TSX:CNR)(NYSE:CNI), and for good reason. Railroads have the biggest moats around. It would cost a new entrant tens of billions of dollars to get where Canadian National is right now, and even if the new entrant had the money, they have the nearly impossible task of running a railroad through the country.

The stock transports everything from intermodal freight to commodities, grain to potash, automobiles to livestock. The rails will always be around, as they’re a much cheaper and faster way of getting goods across the continent.

Both stocks mentioned are fantastic businesses that are trading near their historical average valuations, but I believe earnings will pick up for these two fantastic businesses. Now is the time to pick both up and hang on to them forever.

Stock buy alert hits astounding 96% success rate!

The hand-picked investing team inside Stock Advisor Canada recently issued a buy alert for one special type of "bread-and-butter" stock where The Motley Fool U.S. has banked profits on 23 out of 24 recommendations. Frankly, with an astounding 96% success rate that has delivered average returns of 260%, chances are this new pick could deliver life-changing returns as well. Because the team at Stock Advisor Canada fully embraces the same time-tested investing philosophies that have led to countless Motley Fool winners globally. So simply click here to unlock the full details behind this new recommendation and join Stock Advisor Canada.

*96% accuracy includes restaurant stock recommendations from Motley Fool U.S. services Stock Advisor, Rule Breakers, Hidden Gems, Income Investor and Inside Value since each services inception. Returns as of 5/27/16.

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 Joey Frenette 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.