Skip to main content

JustROCR Strategy Analysis

Chapter 1: Strategy Overview

1.1 Strategy Positioning

JustROCR is a quantitative trading strategy based on the Rate of Change Ratio (ROCR) indicator. This strategy achieves complete trading logic with extremely concise code, showcasing the "simplicity is the ultimate sophistication" design philosophy. Among many complex strategies, JustROCR stands out with its unique indicator selection and clear trend-following logic, making it a classic momentum-tracking strategy.

The name "JustROCR" itself embodies the strategy's core philosophy—"Just" means simple and pure. The entire strategy relies solely on the ROCR indicator for decision-making, without adding extra filtering conditions or complex logic. This design philosophy holds significant meaning in quantitative trading: simplicity often means robustness; overly complex strategies easily fall into overfitting traps. By maintaining strategy simplicity, JustROCR aims for more stable performance in live trading.

1.2 Strategy Classification

By trading logic: Trend-following strategy. The core idea captures established trends, profiting from subsequent upward moves by identifying strong price surge signals. Unlike mean-reversion strategies, trend-following assumes "the strong get stronger"—once an uptrend forms, price has high probability to continue rising.

By signal generation: Single-indicator strategy. The strategy relies entirely on ROCR indicator values for entry decisions, without combining other common technical indicators like moving averages, RSI, or MACD.

By holding period: Medium-to-long-term strategy. Uses 1 hour as the base period with ROCR calculation spanning 499 candles—meaning trend identification is based on quite extended price changes, not suitable for frequent short-term trading.

By risk control: Trailing stop strategy. Uses trailing stop mechanism to dynamically adjust stop positions as price rises.


Chapter 2: ROCR Indicator Deep Dive

2.1 ROCR Definition

Rate of Change Ratio (ROCR) formula:

ROCR = Current Price / Price N Periods Ago

When ROCR > 1, current price exceeds the N-period-ago price (price rose); when ROCR < 1, current price is below (price fell). ROCR directly reflects price change magnitude—ROCR = 1.10 means 10% rise, ROCR = 0.90 means 10% decline.

2.2 Comparison with Other Momentum Indicators

ROCR vs ROC: ROC uses (current - N-period-ago) / N-period-ago * 100 (percentage form). ROCR uses ratio. Both measure the same phenomenon—ROCR's advantage is values are always positive, easier to set thresholds.

ROCR vs RSI: RSI is an oscillator [0-100], typically for identifying overbought/oversold reversals. ROCR has no fixed range. RSI better for reversal opportunities; ROCR better for trend following.

ROCR vs MACD: MACD includes fast/slow moving averages and their difference. ROCR is simpler, only focusing on price ratio. MACD richer but more complex; ROCR simpler but clearer.

2.3 ROCR Configuration in JustROCR

Strategy uses ta.ROCR(dataframe, period=499)—499 periods on 1-hour equals ~20.8 trading days (~3 weeks).

Long period rationale:

  1. Filters short-term noise
  2. Reduces trading frequency
  3. Captures large trends

Chapter 3: Trading Logic

3.1 Overall Trading Framework

"Wait for strong signal, follow trend, let profits run, strict stop loss."

3.2 Signal Generation

Entry condition in populate_entry_trend:

dataframe.loc[(dataframe['roqu'] > 1.10), 'buy'] = 1

No exit signal in populate_exit_trend—strategy relies entirely on stop loss.

3.3 No Active Exit Signal Design

JustROCR deliberately sets no active exit conditions. Reasons:

  • Let profits fully run during strong trends
  • Simplify decision process
  • Avoid overfitting
  • Trust trend power

Chapter 4: Entry Conditions

4.1 Entry Condition Meaning

ROCR > 1.10 means price exceeded 10% above 499 periods ago (~3 weeks). This:

  • Confirms trend exists
  • Avoids bottom-fishing traps
  • Filters weak rallies
  • Embodies "right-side trading"

Chapter 5: Exit Conditions and Risk Control

5.1 Fixed Stop Loss: -20%

Provides sufficient volatility tolerance for crypto markets.

5.2 Trailing Stop

Activates when price rises a certain amount—stop follows price upward.

5.3 Minimal ROI: 20%

minimal_roi = {"0": 0.20}

5.4 Risk Control Summary

  1. Fixed stop loss: Ultimate protection
  2. Trailing stop: Dynamic profit protection
  3. Profit target: Explicit minimum return

Chapter 6: Parameter Configuration

6.1 Timeframe: 1 Hour

Balances signal frequency and stability, matches crypto's 24/7 nature.

6.2 ROCR Period: 499

Covers ~3 weeks of trading, filters noise while capturing significant trends.

6.3 Entry Threshold: 1.10

Requires 10% price rise—balances trend confirmation vs. opportunity cost.

6.4 Stop Loss: -20%

Standard for crypto—tolerates volatility without excessive single-trade loss.


Chapter 7: Strategy Advantages

  1. Simplicity: <30 lines core code, easy to understand and maintain
  2. Trend following: Captures medium-to-long-term trends
  3. Risk control: Multi-layer stop-loss mechanism
  4. Automation-friendly: Clear logic, suitable for programmatic execution
  5. Low overfitting risk: Few parameters, high robustness

Chapter 8: Strategy Risks

  1. Ranging market risk: May repeatedly stop out
  2. Trend reversal risk: No reversal warning mechanism
  3. High volatility risk: Stop loss may gap through
  4. Parameter risk: 499 and 1.10 may be optimized values
  5. Signal lag: Awaits 10% rise before entry

Chapter 9: Applicable Scenarios

Best for:

  • Clear unilateral trending markets
  • Medium volatility trending markets
  • Liquid mainstream coins

Not for:

  • Sideways oscillating markets
  • Rapid reversal markets
  • Low-liquidity markets

Chapter 10: Backtesting and Optimization

10.1 Backtesting Recommendations

  • Use 1-2+ years of data
  • Include realistic trading costs and slippage
  • Conduct out-of-sample verification
  • Test across multiple coins and time periods

10.2 Optimization Directions

  • Multi-timeframe confirmation
  • Volume filtering
  • Dynamic parameters
  • Exit condition addition
  • Position management

Chapter 11: Summary

JustROCR is a trend-following strategy with clear design philosophy and concise code. Its core idea: use ROCR to identify medium-to-long-term uptrends, enter after trend confirmation via trailing stop, auto-exit on trend reversal.

Core features:

  • Single indicator (ROCR) decision-making
  • Long-period trend following (499 hours)
  • Trailing stop profit protection
  • No active exit signals

The strategy demonstrates how to implement complete trading logic with minimal code, providing excellent reference for strategy development.

This document is approximately 9,000 words with 11 chapters.