Signals
Momentum
Measure price change over an explicit lookback window.
What it is
Momentum measures absolute price change over a lookback window, helping you answer a simple question quickly: is price higher or lower than it was N periods ago?
When to use it
- Ranking assets by recent strength.
- Building fast trend filters without extra smoothing.
- Comparing whether price acceleration is improving or fading.
The maths
Momentum(N) = close[t] - close[t-N] This is the price difference over N bars.
What it tells you
Positive and growing momentum confirms an uptrend. A momentum line crossing zero from below is a potential buy signal, and divergence between momentum and price can precede reversals.
REST example
python
import os
import requests
response = requests.get(
'https://api.financedata.com/v1/signals/Momentum/AAPL',
params={'start_date': '2025-01-01', 'end_date': '2025-04-30', 'period': 20},
headers={'X-API-Key': os.environ['FDA_KEY']},
timeout=30,
)
response.raise_for_status()
print(response.json())MCP example
Tool call body
{
"name": "get_momentum",
"arguments": {
"symbol": "AAPL",
"start_date": "2025-01-01",
"end_date": "2025-04-30",
"period": 20
}
}Agent prompt that triggers it
Run the 20-period momentum indicator for AAPL and summarize whether price acceleration is improving or cooling off.