Skip to main content

LinRegV Strategy: In-Depth Analysis

Strategy Number: #222 (the 222nd of 465 strategies)
Strategy Type: Linear Regression / Variant Analysis
Timeframe: 15 Minutes (15m)


I. Strategy Overview

LinRegV is a variant of the linear regression-based strategy. This strategy introduces vector analysis elements on top of standard linear regression, enhancing the dimension of trend judgment.

The name "LinReg" stands for Linear Regression, and "V" represents Vector or Variant. This improved method considers not only price direction but also introduces the concept of velocity (slope rate of change).

Core Characteristics

AttributeDescription
Entry Conditions2 sets of linear regression variant-based buy signals
Exit Conditions1 set of base exit signals + take-profit and stop-loss
Protections1 set of entry protection parameters
Timeframe15-minute primary timeframe
Dependenciesscipy, pandas, numpy

II. Strategy Configuration Analysis

2.1 Base Risk Parameters

# ROI Exit Table
minimal_roi = {
"0": 0.08,
"20": 0.05,
"45": 0.02,
"90": 0
}

# Stop Loss Settings
stoploss = -0.08

# Trailing Stop
trailing_stop = True
trailing_stop_positive = 0.025
trailing_stop_positive_offset = 0.03

Design Philosophy:

  • Fast Take-Profit: Suitable for short-cycle trading
  • Compact Stop Loss: -8% stop loss is tighter
  • Trailing Stop: Protects profits

2.2 Linear Regression Parameters

# Linear Regression Parameters
lr_window = 20 # Regression window (shorter than standard)
lr_threshold = 0.008 # Slope threshold
vector_threshold = 0.005 # Vector change threshold (new parameter)

III. Entry Conditions Details

3.1 Variant Analysis Conditions

Condition #1: Regression Line Slope Acceleration

# Logic
- Calculate linear regression over the most recent 20 candles
- Slope rate of change (acceleration) is positive
- Entry Timing: Trend is accelerating

Condition #2: Vector Breakout

# Logic
- Vector indicator breaks through threshold
- Price simultaneously breaks key level
- Entry Timing: Breakout confirmed

IV. Exit Logic Details

4.1 Take-Profit and Stop-Loss

Take-Profit Point    8%    Hold 0-20 minutes
Take-Profit Point 5% Hold 20-45 minutes
Take-Profit Point 2% Hold 45-90 minutes
Stop-Loss Point -8% Any time

V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorPurpose
Trend IndicatorLinear Regression SlopeTrend direction and strength
Velocity IndicatorSlope Rate of ChangeTrend acceleration/deceleration
Vector IndicatorVector BreakoutMomentum change

5.2 Velocity Analysis Principle

# Velocity Analysis
slope_current = linregress(data[-20:]).slope
slope_previous = linregress(data[-21:-1]).slope
acceleration = slope_current - slope_previous

VI. Risk Management Highlights

6.1 Velocity Filtering

Weak trends are filtered through slope rate of change, only entering when trends are accelerating.

6.2 Vector Confirmation

The vector indicator provides additional momentum confirmation signals.


VII. Strategy Strengths and Limitations

✅ Strengths

  1. Momentum Capture: Can catch trend acceleration phases
  2. Fast Response: Shorter window, more sensitive response
  3. Simple Parameters: Fewer parameters, easy to adjust

⚠️ Limitations

  1. Noise Sensitive: Short window may generate more false signals
  2. Over-Trading: Higher signal frequency
  3. Market Suitability: May underperform in ranging markets

VIII. Applicable Scenarios Recommendations

Market EnvironmentRecommended ConfigurationNotes
Trend AccelerationWindow 20, Threshold 0.008Capture acceleration phase
High VolatilityIncrease vector thresholdReduce false signals

IX. Applicable Market Environment Details

LinRegV is a fast-response variant of the LinReg series. Code volume is approximately 180 lines, focused on capturing trend acceleration phases.

Its Money-Making Philosophy: The acceleration of a trend is money

  • Velocity Analysis: Is the trend accelerating or decelerating?
  • Short Window: Fast response to price changes
  • Momentum Confirmation: Use vector indicator to verify

9.1 Performance in Different Market Environments

Market TypePerformance RatingAnalysis
📈 Slow Bull⭐⭐⭐⭐☆Clear trends but limited acceleration phases
🔄 Ranging⭐⭐☆☆☆Too much noise, too many false signals
📉 Crash⭐⭐⭐☆☆Captures downward acceleration
⚡ Fast Bull⭐⭐⭐⭐⭐Perfect for capturing acceleration

9.2 Key Configuration Recommendations

Configuration ItemRecommended ValueNotes
lr_window20Regression window size
lr_threshold0.008Slope threshold

X. Important Notes: The Cost of Complexity

10.1 Learning Curve

Understanding slope rate of change is required. Learning basic linear regression first is recommended.

10.2 Hardware Requirements

Number of Trading PairsMinimum RAMRecommended RAM
5-101GB2GB
20-302GB3GB

10.3 Backtesting vs Live Trading Differences

Short-window strategies may be over-optimized in backtesting and require longer periods for validation.

10.4 Manual Trading Recommendations

Observe price acceleration changes and trade with the trend when acceleration is detected.


XI. Summary

LinRegV is a fast-response linear regression variant strategy. Its core value lies in:

  1. Momentum Capture: Can catch trend acceleration phases
  2. Fast Response: Short-window design, sensitive reaction
  3. Concise and Efficient: Fewer parameters, easy to use
  4. Acceleration Analysis: Unique velocity analysis perspective

For quantitative traders, this strategy is suitable for investors who pursue fast response and like to capture trend acceleration phases. It is recommended for use in markets with clear trends.