Linear Regression

Technical Systems Intermediate Canada XIU XIC ZSP SPY QQQ Individual Stocks Futures Forex

Identifies trend direction, strength, and deviation from trend

Learn this and Canada-market strategies in depth — one-time purchase, lifetime access.
Unlock full hub →

Quick Reference

Strategy Type Statistical Trend-Following and Mean Reversion System
Market Outlook Identifies trend direction, strength, and deviation from trend
Risk Profile Defined by channel bands; typically 2-4% per trade
Reward Profile Captures trend moves and mean reversion opportunities
Time Horizon Swing to position trading (days to months)
Best Conditions Trending markets with statistically significant price behavior
Indicator Basis Statistical best-fit line through price data with standard deviation bands

Canada Market Details

Primary Instruments XIU, XIC (index ETFs); Major banks (RY, TD, BMO); ZSP (S&P 500)
Trading Hours 9:30 AM - 4:00 PM ET
Settlement T+1 for stocks and ETFs
Tax Treatment Capital gains 50% inclusion rate
Tfsa Eligibility YES - Stock/ETF trading permitted
Rrsp Eligibility YES - Stock/ETF trading permitted
Commission Consideration Moderate frequency trading; commission impact manageable
Currency Note Consider CAD/USD exposure for US-listed instruments
Liquidity Note Works well with liquid Canadian securities

Frequently Asked Questions

What regression period should I use?

Start with 20 periods for daily charts. This balances responsiveness with smoothness. For longer-term trading, use 50-100 periods. For shorter-term, try 10-14 periods. Test different periods on your instruments.

What does '2 standard deviation' bands mean?

Standard deviation measures how spread out prices are from the regression line. 2 SD bands capture approximately 95% of price action in normal conditions. Price at the bands is statistically 'extended' from the trend.

Why is R² important?

R² tells you how reliable the regression trend is. High R² (>0.7) means price closely follows the line - signals are more reliable. Low R² (<0.5) means price is scattered - regression signals become unreliable.

Can I use linear regression in my TFSA?

Yes, regression-based trading is suitable for TFSA accounts. The strategy typically involves moderate frequency trading appropriate for registered accounts.

How is regression different from a moving average?

Regression is a statistically optimal best-fit line; MA is a simple average. Regression has built-in slope measurement and R² for quality. MA lags behind price; regression line goes through the data optimally.

How do I trade when R² is low?

When R² is below 0.5, avoid regression-based trend trades - the trend isn't reliable. Options: 1) Wait for R² to improve, 2) Switch to range strategies (buy support, sell resistance without trend bias), 3) Use other indicators.

Should I use regression line or lower band for entries?

In strong trends (high R²), pullbacks to regression line are good entries. In moderate trends, wait for lower band touches for better risk/reward. Lower band entries have better risk/reward but occur less frequently.

How do I handle slope changes?

When slope changes from positive to negative: 1) Exit longs immediately, 2) Don't fight the new direction, 3) Wait for new stable trend before re-entering. Slope change is a primary exit signal.

What if price breaks below the lower band?

A close below the lower band in an uptrend is a breakdown signal. Options: 1) Exit immediately (conservative), 2) Wait for close back inside band (may be false break), 3) Add stop below break level if holding.

How do I combine multiple regression periods?

Use longer period (50-100) for major trend direction. Use shorter period (20) for entry timing. Both should be bullish for highest confidence. Enter when short-term is oversold but long-term is bullish.

How do I build a regression scanner?

Scan for: price near lower band (within 5%), slope > 0, R² > 0.6, RSI < 40. Rank by R² (higher = better) and distance to band. Most platforms require custom scripting or formulas.

What's the optimal way to adjust for different R² levels?

Create an R²-adjusted position sizing: R² > 0.8 = full position, R² 0.6-0.8 = 75% position, R² 0.5-0.6 = 50% position, R² < 0.5 = no position. This automatically manages risk based on trend reliability.

How do I project the regression channel into the future?

Extend the current regression line slope forward, with parallel bands. Useful for identifying future S/R. Caution: accuracy decreases rapidly beyond a few bars. Re-calculate regularly as new data arrives.

When should I consider polynomial regression?

Use polynomial regression when: 1) Linear R² is consistently low but price shows clear curved pattern, 2) Long-term trend clearly non-linear (e.g., exponential growth). Caution: polynomials can overfit and extrapolate poorly.

What's the typical win rate for regression systems?

Well-designed regression systems (with R² filter, proper entries) typically achieve 50-60% win rates. Edge comes from risk/reward ratio at band entries (often 1:2 or better). Trend following approaches may have lower win rate but larger winners.

Related Strategies

Bollinger Bands
Keltner Channel
Moving Average Systems
RSI
MACD
Volume Analysis

Master Canada trading strategies on AlgoKing

Full guided lessons, quizzes, and a complete strategy library for the Canada market. One-time purchase. No subscription, ever.

Get Canada access →