It's a gamble, and you will be subtracting guaranteed interest compounded monthly from any potential market gains (or losses).
Let's create a few scenarios, all of which are "buy and hold" for 6 years. We'll take very small amount from our LOC to simplify the math, let's say $10k. The cost of doing so is easy to calculate:
$10,000 after 6 years at 2.95%* compounded monthly = $11,933.72, for a cost of borrowing equal to $1,933.72. Note, this assumes it will be paid off in full at the end of the 6-year period.
So how much can we make from the stock market? An impossible question to answer, but let's create a few hypotheticals. For the sake of simplicity, I'm not including any transaction costs (which should be fairly low, since this is a fixed-term buy-and-hold situation).
Scenario 1: 2020 is the bottom of the crash, and the market only goes up from here (modeled after the recovery following 2008):
Year 1: +23.45%
Year 2: +12.78%
Year 3: 0.00%
Year 4: +13.41%
Year 5: +29.60%
Year 6: +11.39
Total value at end of year 6: $23,307.90, for a gain of $13,307.90
$13,307.90 - cost of borrowing = net return of $11,374.18
Scenario 2: 2021 is actually the bottom, recovery identical to 2008:
Year 1: -38.49%
Year 2: +23.45%
Year 3: +12.78%
Year 4: 0.00%
Year 5: +13.41%
Year 6: +29.60%
Total value at end of year 6: $12,587.08, for a gain of $2,587.08
$2,587.08 - cost of borrowing = net return of $653.36
Scenario 3: 2020 is more like 1973:
Year 1: -17.37%
Year 2: -29.72%
Year 3: +31.55%
Year 4: +19.15%
Year 5: -11.50%
Year 6: +1.06%
Total value at end of year 6: $8,140.98, for a loss of $1,859.02
$1,859.02 + cost of borrowing = net LOSS of $3,792.74
Scenario 4: 2020 is actually more like 1930 (just after the crash of 1929):
Year 1: -28.48% 0.7152
Year 2: -47.07% 0.5293
Year 3: -15.15% 0.8485
Year 4: +46.59% (woohoo! the largest gain ever recorded before or since!)
Year 5: -5.94% 0.9406
Year 6: +41.37% (holy cow! woohoo!)
Total value at end of year 6: $6,261.05, for a loss of $3,738.95
$3,738.95 + cost of borrowing = net LOSS of $5,672.67 (would've been even worse if we started in 1929)
So, basically, there's no way to predict the outcome. Borrowing money to invest is a dangerous game to play (more properly called "speculating" than "investing"). If you were using your own money (i.e., didn't have to repay it at some point), and your strategy was to buy and hold for 30+ years, then yeah, the next few years will probably be great for investing (just like every other year). I would rather take advantage of current low interest rates by paying off as much of the LOC as I can, because this is a true investment in future wealth.
All numbers modeled on historical S&P 500 rates https://www.macrotrends.net/2324/sp-500-historical-chart-data which do NOT in any way predict future rates. There is absolutely no way to predict the market, do not believe anyone who tells you they can. I am not an financial professional.
*cost of borrowing is based on current canadian bank prime rates, which despite significant movement of the overnight rates by the Bank of Canada, has yet to move. Based on this, I think we can safely assume that 2.95% is as low as the banks are willing to go at this point. A lot of LOCs have rates that are prime -0.25%, but I just left it at the full prime rate because there is equal possibility of the rates rising alongside any market increases. In fact, it is worth considering that the cost of borrowing may increase significantly before these scenarios complete, especially in the cases with more dramatic market gains.