Skip to main content
Glama

Backtest

option_backtest

Backtest an options structure on real price history using modelled premiums, and return win rate, return on capital at risk, drawdown, permutation and bootstrap results, plus a buy-and-hold benchmark.

Instructions

Run a structure across real price history with modelled premiums. Returns win rate, mean return on capital at risk, drawdown, a permutation test, a bootstrap interval and a buy-and-hold benchmark. Premiums are Black-Scholes values at trailing realised volatility, never fills; the honesty field states the limits and must be reported with any number. Before quoting any number from this result, state the degraded flag and its reason when the result carries one, and cite the artifact path it names.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>",
      "strategy": "<strategy>"
    },
    "name": "option_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNo
symbolYes
strategyYes
entry_everyNo
holding_daysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior5/5

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

The description goes well past the annotations by disclosing the pricing model's provenance (Black-Scholes at trailing realised volatility, never actual fills), the presence of an honesty/limits field, a degraded-result flag with a reason, and an artifact path. It also imposes a reporting contract on the agent's downstream output, which is behavior no annotation conveys. Annotations only give the generic non-read-only/non-idempotent/open-world profile.

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

Conciseness4/5

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

Three sentences, front-loaded with purpose then outputs then caveats, with no filler. The reporting-instruction sentence is long but carries operational meaning rather than restating the name. Slightly dense, but every clause earns its place.

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

Completeness3/5

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

The result side is well covered: metrics, model limitations, degraded flags, and artifact paths are all described, and no output schema exists so that burden falls on the text. The input side is the gap — with 0% schema coverage across five parameters, the definition is not complete enough for an agent to choose sensible values for entry_every or holding_days without trial and error.

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

Parameters2/5

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

Schema description coverage is 0% and there are five parameters, yet the description explains none of them. Words like "structure" and "real price history" only loosely gesture at strategy and period; symbol, entry_every, and holding_days are entirely undocumented anywhere. This leaves the agent guessing at cadence and horizon semantics for a required-parameter tool.

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

Purpose4/5

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

"Run a structure across real price history with modelled premiums" states a specific verb and resource, and the following sentence enumerates the exact metrics returned (win rate, mean return on capital at risk, drawdown, permutation test, bootstrap interval, buy-and-hold benchmark). An agent can tell this is a historical simulation rather than a live/forward test. It stops short of naming siblings like option_forward_test or option_simulate, so differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Usage is implied rather than prescribed: "Premiums are Black-Scholes values at trailing realised volatility, never fills" tells the agent this is the modelled-cost path, hinting that a fills-based tool exists elsewhere. The reporting obligations (state the degraded flag, cite the artifact path) are clear conditional instructions. However, there is no explicit "use this instead of X when Y" routing against option_forward_test or option_simulate.

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