The TSX has had a fantastic past few months; the overall market is up close to 25% since early January and up about 12% year-to-date–a big improvement from the 11% decline seen in 2015.  The big question for investors now is, how much upside does the TSX have remaining, and does it have a chance of hitting its all-time high, which was set in the summer of 2014 before the oil-price crash?

If the TSX is set to follow in the S&P 500’s footsteps and exceed its all-time highs (which would result in 8% more upside from current levels), now would be an excellent time to continue expanding your Canadian exposure, since the majority of stocks rally when the broader market is rallying.

A recent CIBC poll in February found that 41% of Canadians were interested in buying more foreign stocks (up from 31% a year earlier). Canadian investors who were scared off during 2015 and have yet to re-add Canadian exposure could still have time.

Here are the cases for and against why stocks could hit the all-time high.

Why the TSX may still have considerable upside

There are a few ways to value the market, and one is known as the “Buffett indicator” (because it was first suggested by Warren Buffett as an excellent way to value the overall market). The Buffett indicator is simply the overall market capitalization divided by GDP, and it gives an idea of how expensive the market is compared to the overall economy.

Currently, the Canadian market cap to GDP is 119%. This is only one percentage point higher than the average of 118% (with the all-time high being 190%), which shows that the TSX isn’t close to being overvalued according to this measure and still has plenty of upside remaining.

It is more expensive when looking at price-to-earnings ratios. According to National Bank, the TSX has a trailing price-to-earnings ratio of 19.67 currently. This is quite a bit above the 10-year average of 17.9, which makes the market seem expensive. When looking at Q1 2017’s earnings, however, the forward price-to-earnings ratio is a more reasonable 18.22, which implies that if the earnings outlook is correct, the market still has room to run before becoming truly overvalued according to this measure.

It is important to remember that comparing to long-term averages may not be useful, since interest rates are so low today (the 10-year Canadian bond yield is only around 1.08%); dividend stocks provide the only sensible way to earn yield, which will lead to much higher stock ownership than in the past.

With many TSX sectors (like the bank index), having average yields of over 4.1%, this massive premium compared to the 10-year government bond is likely to support valuations above historic levels.

The case for the market not moving higher

One of the biggest risks is oil prices. Earlier in the year the TSX and oil prices had the highest correlation in over 27 years, which means that the TSX basically followed oil prices. Now, with oil prices plunging nearly 20% since early June and oil entering a seasonally weak period (crude demand is lower during the fall due to the summer driving season ending), there is a risk to the TSX.

Fortunately, it seems as if the link between the TSX and oil has loosened up recently. Despite oil plunging since June, the TSX has actually been steadily climbing. This means the market is not as concerned about oil prices as before, which eliminates a big barrier to the TSX not moving higher.

With oil prices likely to recover again over the next several months (due to steadily falling supply), oil will be a tailwind again. This means it is likely a good time to buy Canadian stocks, and while most names should benefit from a rising index, Canadian banks such as Toronto-Dominion Bank (TSX:TD)(NYSE:TD) and Royal Bank of Canada–two of Canada’s largest names–should be good ways to play further strength in the Canadian market.

We have an even better way to profit from continued upside in the TSX

The savvy team of analysts and advisors inside Stock Advisor Canada recently issued a "buy" alert on this downgraded stock. After being left for dead by five or more big banks in a five-week span, our team scooped up shares as fast as we could--and are recommending that Stock Advisor Canada members jump on this rare opportunity immediately. So simply click here to unlock the full details behind this new recommendation and join thousands of others inside of Stock Advisor Canada.

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 has no position in any stocks mentioned.