Recipe, one Python file
VRP ranker
Volatility risk premium across a list, with earnings-free realized vol so the ranking is honest. Calls the volatility risk premium endpoint for each symbol and ranks them by the gap between 30-day implied vol and the realized vol of the last 30 sessions. The ex-earnings realized figure is printed beside it, because one earnings gap in the window can make a cheap name look expensive.
What it prints
The output,
as captured.
Run against the live API on 2026-09-08 with a real token. Vol sellers picking where implied is furthest above realized.
IV 30d RV 30d VRP VRP ex-earn earnings in window assessment
TSLA 39.8 45.6 -5.9 -5.9 False NEGATIVE_PREMIUM
AAPL 24.0 30.2 -6.1 1.7 True NEGATIVE_PREMIUM
NVDA 33.0 45.1 -12.0 -5.2 True NEGATIVE_PREMIUM
AMD 48.8 69.1 -20.3 -17.7 True NEGATIVE_PREMIUM
AMZN 29.1 51.2 -22.1 -0.7 True NEGATIVE_PREMIUM
MSFT 23.5 48.5 -25.0 -3.1 True NEGATIVE_PREMIUM
VRP is implied minus realized in annualised vol points; positive means options are paying more than the stock has moved.
The script
One file,
requests and nothing else.
Set APEXVOL_API_TOKEN from Account, then API Access, and run it. The token is the only configuration.
import os
import sys
import requests
# One token, any paid or trial plan: Account, then API Access.
TOKEN = os.environ.get("APEXVOL_API_TOKEN") or sys.exit("set APEXVOL_API_TOKEN")
BASE = os.environ.get("APEXVOL_API_URL", "https://apexvol.com") + "/api/mcp/data"
S = requests.Session()
S.headers["Authorization"] = f"Bearer {TOKEN}"
def get(path, **params):
r = S.get(BASE + path, params=params, timeout=90)
body = r.json()
if not body.get("success"):
sys.exit(f"{path}: HTTP {r.status_code}: {body.get('error')}")
return body["data"]
SYMBOLS = ["AAPL", "MSFT", "NVDA", "AMD", "TSLA", "AMZN"]
rows = []
for sym in SYMBOLS:
d = get(f"/vrp/{sym}")
rows.append((sym, d))
rows.sort(key=lambda kv: -(kv[1].get("volatility_risk_premium") or 0))
print(f"{'':7}{'IV 30d':>8}{'RV 30d':>8}{'VRP':>7}{'VRP ex-earn':>13} earnings in window assessment")
for sym, d in rows:
vrp_ex = d.get("volatility_risk_premium_ex_earnings")
ex_txt = f"{vrp_ex:>13.1f}" if isinstance(vrp_ex, (int, float)) else f"{'same':>13}"
print(f"{sym:7}{d['implied_volatility']:>8.1f}{d['realized_volatility']:>8.1f}"
f"{d['volatility_risk_premium']:>7.1f}{ex_txt} {str(d.get('earnings_in_window')):>18} {d['assessment']}")
print()
print("VRP is implied minus realized in annualised vol points; positive means options are paying more than the stock has moved.")
How it works
- 1. One call per symbol
- GET /vrp/{ticker} returns implied 30-day vol, realized vol and their difference in vol points.
- 2. Prefer the ex-earnings figure
- volatility_risk_premium_ex_earnings drops the reaction sessions from the realized window.
- 3. Rank
- Highest premium first; negative premium means realized has been running above implied.
Schedule it
- cron
45 13 * * 1-5 APEXVOL_API_TOKEN=avmcp_... python3 vrp_ranker.py
09:45 New York, weekdays. Times in the crontab are UTC.- Claude Code
/loop 2h python3 vrp_ranker.py
Runs it on an interval inside a session, and the assistant reads the output each time.
The same job, no code
Ask an assistant
with the MCP server.
Connect the ApexVol MCP server and this recipe is one prompt. It ships in the client's prompt picker as recipe-vrp-ranker.
Rank AAPL, MSFT, NVDA, AMD, TSLA and AMZN by volatility risk premium, and tell me which ones only look expensive because of an earnings gap.
The assistant calls get_volatility_risk_premium and answers from the same JSON the script prints.Set it up in:
Under the hood
1 endpoint,
one token.
Each card opens the endpoint's page: parameters and bounds, every field, a real response and a console that runs it on your ticker.
Access
- Plan
- Premium and above. Every endpoint follows the tier of its web feature; the chips on the cards say which.
- Cost
- Measured in upstream data requests against the monthly allowance, not calls; a batch call counts one rate-limit unit and one data request per symbol.
GET /api/mcp/data/me/usageshows the meter. - Reference
- The rate-limits guide, the conventions and the error model. The whole API as one Markdown file: /llms-full.txt.
Included with
every paid plan.
From $55 a month. Create a token under Account, then API Access, and this script runs as it is.
Real market data, not a sandbox. See it live on AAPL.