If you’re a Canadian investor, chances are you will be closing out the year with a decent amount of red in your portfolio. The reason is simple—close to 30% of the TSX is commodity stocks and a much higher percentage is indirectly exposed to how commodities perform.

With commodity prices on the whole being down 30% over the past year, the fact the TSX and many Canadian stocks are in the red for the year is not surprising. Over the year many Canadians have likely reduced their exposure to energy and mining companies due to the poor performance, and while this may seem wise, it also means these investors will miss any type of rebound.

Fortunately, there is a way to benefit from a rebound in commodities without having to worry about being exposed to any further downside they may have. This can be done by purchasing companies that indirectly exposed to commodities or that have commodity exposure as part of a diversified business.

Three companies that meet these criteria are Enbridge Inc. (TSX:ENB)(NYSE:ENB), Canadian National Railway Company (TSX:CNR)(NYSE:CNI), and Agrium Inc. (TSX:AGU)(NYSE:AGU).

Enbridge Inc. has indirect exposure to oil and gas

Pipelines are one of the best ways to gain exposure to oil and gas without the volatility and price risk of investing directly in a producer. This is because for the most part, pipelines are paid a toll per barrel shipped, and this toll is often based on the costs that the pipeline incurs to build and operate the pipeline.

The end result is that pipelines have very little exposure to the price of oil or gas but still benefit from increasing volumes. Currently, Enbridge only has 3% of its earnings directly exposed to commodity prices.

Enbridge expects about 800,000 to one million barrels per day of oil sands production to come online before 2020, even if prices stay where they are, and this means that Enbridge is set to grow its earnings by 11-13% annually over the next five years.

Canadian National Railway offers a similar benefit

For conservative investors, Canadian National Railway offers very low risk indirect exposure to commodities. Currently, CN gets about 20% of revenue from petroleum and chemicals, 12% from metals and minerals, 5% from coal, and 16% from grains and fertilizers for a total of about half its revenues that are somehow linked to commodities.

This commodity exposure, however, is extremely diversified among different types of products, and like Enbridge, CN has little direct exposure to commodity prices. CN only feels the effect of weak pricing indirectly through reductions in volume, which typically are not as volatile as prices.

While this exposure does represent a headwind, the other half of CN’s business comes from segments like intermodal, forest products, and automotive, which are largely linked to consumer spending. A large portion of CN’s intermodal, forest products, and automotive business is linked to the U.S. economy, where strong consumer spending is increasing demand for housing, cars, and consumer products.

Intermodal, automotive, and forest products have been seeing positive volume growth, and this helps to prop up CN’s shares, while still giving it exposure to upside from a recovery in commodity prices.

Agrium provides low-risk exposure to agricultural commodities

While nearly every commodity has performed poorly—and fertilizers like potash, nitrogen, and phosphate are no exception—the long-term demand outlook for these products is strong. Demand growth for crops will increase over time as the population grows, as calories consumed per person grow, and as more meat is consumed.

Fertilizers are a key component of increasing crop production, especially since arable land is limited. Agrium provides exposure to these fertilizers since it is a wholesale producer of potash, phosphate, and nitrogen, but it is much lower risk than other producers because about half of its business is its retail segment.

Agrium operates North America’s largest agricultural retail business, and the stability of this business helps Agrium offset weakness in fertilizer prices, while still being able to capture upside in prices when they come.

If you want to play energy or commodities more directly, we've identified two excellent opportunities

Check out our special FREE report "2 Canadian Energy Stocks on the Cusp of a Powerful Long-Term Trend". In this report, you'll find that Canada is rich in other energy sources that are poised to take off. Click here now to get the full story.

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 Adam Mancini owns Agrium Inc. shares. David Gardner owns shares of Canadian National Railway. The Motley Fool owns shares of Canadian National Railway. Canadian National Railway and Agrium Inc. are recommendations of Stock Advisor Canada.