Signals
ROC — Rate of Change
Measure percentage price acceleration over a configurable lookback.
What it is
Rate of Change measures percentage price change versus a prior bar. Positive values signal acceleration higher; negative values signal deceleration or outright downside momentum.
When to use it
- Ranking symbols by medium-term momentum strength.
- Comparing price acceleration across sectors or factor baskets.
- Filtering out breakouts that lack meaningful follow-through.
The maths
ROC(N) = ((close[t] - close[t-N]) / close[t-N]) × 100 This is the percentage change over N bars.
What it tells you
Positive ROC signals upward price acceleration. Crossing zero from below can mark a bullish shift, and divergence from price is a classic momentum warning signal.
REST example
python
import os
import requests
response = requests.get(
'https://api.financedata.com/v1/signals/ROC/QQQ',
params={'start_date': '2025-01-01', 'end_date': '2025-04-30', 'period': 12},
headers={'X-API-Key': os.environ['FDA_KEY']},
timeout=30,
)
response.raise_for_status()
print(response.json())MCP example
Tool call body
{
"name": "run_signals",
"arguments": {
"symbols": ["QQQ"],
"signal_names": ["ROC"],
"start_date": "2025-01-01",
"end_date": "2025-04-30",
"signal_parameters": {
"ROC": { "period": 12 }
}
}
}ROC is especially useful in MCP batches when you want one clean percentage-momentum series that can be compared across several symbols.
Agent prompt that triggers it
Run 12-day ROC for QQQ and summarize whether momentum is accelerating, fading, or flipping negative into the latest bar.