Signals
Rolling Sharpe Ratio
Evaluate return quality over time on a rolling risk-adjusted basis.
What it is
Rolling Sharpe Ratio compares average excess return to return volatility over a moving window. It helps you judge whether recent performance has been efficient, not just positive.
When to use it
- Comparing the quality of returns across symbols or strategy sleeves.
- Checking whether a rally is still paying investors for the risk taken.
- Adding a risk-adjusted overlay before rotating capital into stronger trends.
The maths
log_return[t] = ln(close[t] / close[t-1]), RSHARPE(N) = (mean(log_return, N) / std(log_return, N)) × sqrt(252) This is risk-adjusted return over a rolling window.
What it tells you
Values above 1.0 indicate good risk-adjusted returns. A falling rolling Sharpe while price rises suggests returns are getting noisier, which makes it useful for monitoring whether a strategy is deteriorating.
REST example
import os
import requests
response = requests.get(
'https://api.financedata.com/v1/signals/RSHARPE/QQQ',
params={
'start_date': '2025-01-01',
'end_date': '2025-04-30',
'period': 60,
'risk_free': 0.0,
'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": ["QQQ"],
"signal_names": ["RSHARPE"],
"start_date": "2025-01-01",
"end_date": "2025-04-30",
"signal_parameters": {
"RSHARPE": { "period": 60, "risk_free": 0.0, "periods_per_year": 252 }
}
}
}Rolling Sharpe is best requested through run_signals when you want the agent to compare risk-adjusted quality across several symbols in the same pass.
Agent prompt that triggers it
Compute the 60-day rolling Sharpe Ratio for QQQ and tell me whether recent returns still look attractive on a risk-adjusted basis.