ta-oliver / infertrade

Open source trading and investment strategy library designed for accessibility and compatibility
Apache License 2.0
34 stars 20 forks source link

RATE OF CHANGE (ROC) - DOCUMENTATION (DESCRIPTIONS OF EXISTING RULES/INDICATORS) #196

Closed Cal231995 closed 3 years ago

Cal231995 commented 3 years ago

What is Rate of Change (ROC) The Rate of Change indicator, which is also known as simply momentum, is a momentum indicator. It measures the percentage change in price between the current price and the price a certain number of periods ago. Traders used this indicator to identify bullish and bearish momentum. The ROC indicator is plotted against zero, with the indicator moving upwards into positive territory if price changes are to the upside, and moving into negative territory if price changes are to the downside. It can also be used to spot divergences, overbought and oversold signals.

FORMULA : roc formula Allocation Strategy The strategy is to identify asset's price cycles.

Bullish Reversal: when ROC is above zero Bearish Reversal: when ROC is below zero ROC process The theory suggests that asset price will have a trend shift when the DPO cross above zero levels and vice versa. So:

if ROC > 0 then allocation = max_allocation(long position)

if ROC < 0 then allocation = -max_allocation(short position) else: allocation = 0

fhashim commented 3 years ago

@Cal231995 please revise the description for this rule to avoid copyright issue. thanks.

Cal231995 commented 3 years ago

What is Rate of Change (ROC) The Rate of Change indicator, is a technical indicator which is mostly used by traders to Identify the momentum of an asset. It measures the percentage change in price between the current price and the price a certain number of periods ago. The ROC indicator is plotted against zero, with the indicator moving upwards into positive territory if price changes are to the upside, and moving into negative territory if price changes are to the downside. An asset is considered bullish when the roc is above zero and considered bearish when the roc is below zero. It can also be used to identify divergences.

You can used this one @fhashim .Thanks