Skip to main content
Glama

Would refitting have helped? (out of sample)

walk_forward
Read-onlyIdempotent

Whether re-optimising an allocation would have helped: fit on the years before each date, hold on prices not yet seen, repeat, and compare with the portfolio held and with equal weights. Typical questions: 'Would an optimiser have beaten my portfolio?'; 'Test max-Sharpe out of sample on these funds.'; 'Does rebalancing to an optimised mix help?'. Limits: Only for that question; it is not for choosing weights and returns no allocation to hold. It does not recommend, predict or calculate tax.

Input Schema

NameRequiredDescriptionDefault
baseNoCurrency code every figure is expressed in: USD, EUR, GBP, CAD… Default USD.
tickersYesThe candidate holdings, 2 to 30.
holdingsNoOptional: the portfolio actually held, {ticker: weight}, measured on the same span for comparison.
objectiveNoWhat each refit maximises or minimises: max_sharpe, min_variance, min_drawdown, min_cvar or max_quadratic_utility.max_sharpe
step_monthsNoMonths each fitted mix is held.
train_yearsNoYears of history each refit sees.

Output Schema

NameRequiredDescriptionDefault
dataNoWhere the prices came from and what was missing or repaired.
_fenceYesWhat these figures are and are not: descriptive, no forecast, no advice. Repeat its sense when presenting the result.
objectiveNoWhat each refit optimised.
fitted_windowNoFirst and last date of shared history.
out_of_sampleNostart, end, n_refits, train_years, step_months, mean_turnover, verdict (one sentence on the record), limitations, tracks (per track: label, cagr, vol, sharpe, max_drawdown, nav), refits (date, turnover); or `unavailable` with the reason.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / base / description
      Previous value: -"Currency every figure is expressed in (USD, EUR, GBP, CAD…). Default USD."New value: +"Currency code every figure is expressed in: USD, EUR, GBP, CAD… Default USD."
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world behavior. The description adds meaningful behavioral context beyond that: it returns no allocation to hold and does not recommend, predict, or calculate tax, which helps set expectations for a read-only analytical tool.

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?

The description is front-loaded with the core procedure and then lists typical questions and limits. It is somewhat dense and the typical-questions list is long, but every sentence contributes useful selection or scope information.

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

Completeness4/5

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

For a six-parameter analytical tool with an output schema and full annotation coverage, the description supplies enough context about purpose, usage, and limits. It does not need to explain return values because an output schema exists, though it could say more about what the out-of-sample comparison reports.

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?

Schema description coverage is 100%, so parameter meanings are already well documented. The description still adds conceptual value by explaining the walk-forward mechanic: fitting on years before each date maps to train_years, holding on unseen prices maps to step_months, and comparison with the held portfolio maps to holdings.

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 states a specific analytical procedure: fit on prior years, hold out-of-sample, repeat, and compare optimized refits against the held portfolio and equal weights. It also explicitly distinguishes the tool from allocation-selection by saying it is not for choosing weights and returns no allocation to hold.

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

Usage Guidelines4/5

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

It gives clear typical questions that indicate when to use the tool, such as testing whether an optimizer would have beaten a portfolio or whether rebalancing to an optimized mix helps. It also states a useful exclusion: only for that question, not for choosing weights or tax advice. It does not name specific sibling alternatives, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources