Signals
Historical Volatility
Monitor realized volatility with optional annualization.
What it is
Historical Volatility measures the rolling standard deviation of returns. It can be left in raw-period terms or annualized for easier comparison across strategies and assets.
When to use it
- Position sizing trades based on recent realized volatility instead of guesswork.
- Comparing how much risk different symbols are actually carrying right now.
- Finding volatility compression before directional breakout setups.
The maths
log_return[t] = ln(close[t] / close[t-1]), HVOL(N) = std(log_return, N) × sqrt(252) This is the annualized rolling standard deviation of log returns.
What it tells you
Rising HVOL means the market is becoming more volatile. Traders use it to size positions, gauge volatility regimes, and spot potential regime changes when volatility spikes after a calm period.
REST example
import os
import requests
response = requests.get(
'https://api.financedata.com/v1/signals/HVOL/AAPL',
params={
'start_date': '2025-01-01',
'end_date': '2025-04-30',
'period': 20,
'annualize': True,
'periods_per_year': 252,
},
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": ["AAPL"],
"signal_names": ["HVOL"],
"start_date": "2025-01-01",
"end_date": "2025-04-30",
"signal_parameters": {
"HVOL": { "period": 20, "annualize": true, "periods_per_year": 252 }
}
}
}HVOL is useful in MCP workflows where the agent needs a realized-volatility series before choosing between breakout, trend, or mean-reversion strategies.
Agent prompt that triggers it
Run annualized 20-day historical volatility for AAPL and summarize whether realized risk is expanding, compressing, or steady.