Skip to main content
Glama
simoneb

ibkr-risk-mcp

by simoneb

calibrate_vol_coord

Fit the volatility-coordinated decay to your own Risk Navigator curve by supplying shock/PnL points; the fit is stored as the default for later stress tests.

Instructions

Fit vol_coord_decay to YOUR Risk Navigator, and keep the result.

vol_coord reproduces IB's volatility-coordinated model. Its asymmetry — a fall moves volatility ten times as hard as a rise — is IB's, documented. Its term damping VR(t) is not: IB says only that the function exists and is decreasing. The number this server ships was fitted to one screenshot of somebody else's Risk Navigator, from nine points read off a chart by eye. It has no claim on your book, every vol_coord result says so in warnings, and this tool is how you replace it.

What to do:

  1. In TWS open Risk Navigator's risk graph, on the Equity tab if you use the default scope.

  2. Read the Vol.Coord. curve — the one that responds to volatility, not the constant-volatility line — at four or more shocks spread across the range you care about.

  3. Pass them in as {shock: -0.20, pnl: -28000} pairs, shocks as fractions.

The fit comes back with the residual at every point and, more usefully, with what to distrust about it: the tenor range your positions actually constrain, and the most extreme volatility the fitted decay produces. A decay that reproduces the curve by pricing a wing at 150% has fitted the chart rather than the market, and it says so rather than leaving you to find out three layers down in a P&L.

Unless persist=false, the fit is written to disk and becomes the default vol_coord_decay for every later stress_curve on this machine — no restart, no carrying the number by hand — together with what it was fitted against, which is then reported in assumptions.volCoordDecaySource. Set IBKR_CALIBRATION_FILE to move the file. It is the only thing this server writes.

A fit taken against a portfolio that does not reconcile is returned but not stored. The reason is asymmetry of failure: a curve that is missing a position announces itself through reconciled, while a decay that absorbed the same gap would go on silently deforming every vol_coord run afterwards.

Nothing here trades or quotes. It reads positions and reprices locally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betasNo
scopeNoMatch the Risk Navigator tab the readings came from. Its Equity tab is 'equity', the default.equity
persistNoStore the fit as this machine's standing calibration, so every later stress_curve uses it without being told. Set false to see the fit without adopting it. A fit against a portfolio that does not reconcile is never stored, whatever this says.
targetsYesFour or more points read off Risk Navigator's Vol.Coord. curve, spread across the range you care about. Three is the minimum the fit will accept and it constrains almost nothing; points bunched near the money constrain nothing at all. Get them from the Equity tab if you run the default scope='equity', so the curve you are fitting to excludes FX and rates the same way this engine does.
vol_modeNoMatch the run you intend to use the decay in. sticky_strike is the default everywhere else and is what Risk Navigator's own curve does.sticky_strike
fetch_skewNo
risk_groupsNoSame override as elsewhere, e.g. {'TLT': 'rates'}. Use the same one you pass to stress_curve, or the fit is against a different book than the runs that will use it.
default_betaNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses the critical side effect: unless persist=false, the fit is written to disk and becomes the standing calibration, and it names this as 'the only thing this server writes.' It also explains the asymmetric failure behavior around unreconciled portfolios and notes that nothing trades or quotes. This goes well beyond the structured annotations and adds genuinely important operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but earns its length: it front-loads the core purpose, uses bold to mark the most important caveats, and organizes content into workflow, persistence, and failure-mode sections. There is no filler, and every paragraph contributes either to correct invocation or to preventing misuse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex calibration tool with eight parameters, the description covers the full invocation workflow, persistence semantics, failure conditions, and safety boundaries. It also references assumptions.volCoordDecaySource and the returned residuals, so with an output schema present, the agent has enough to call the tool correctly and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description substantially enriches the meaning of key parameters: targets must be four or more points spread across the range, shocks are fractions, persist=false means trial-only, and risk_groups should match stress_curve. However, three parameters (betas, fetch_skew, default_beta) have no schema description and are not explained in the description either, leaving a small but real gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Fit `vol_coord_decay` to YOUR Risk Navigator, and keep the result.' It clearly distinguishes this calibration tool from siblings like stress_curve by explaining that the fitted decay becomes the default for all later stress_curve calls. The purpose is unmistakable and not a tautology.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'What to do' section gives a numbered, actionable workflow, including where to read the curve in TWS, how many points to collect, and how to pass them. It also states when a fit is not stored (unreconciled portfolio) and how persist=false changes behavior. This is explicit, practical guidance an agent can follow directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/simoneb/ibkr-risk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server