Skip to main content
Glama

FX Backtest Task

fx_backtest_task
Read-only

Run a spot-only FX backtest using historical policy-rate-differential and/or lagged momentum signals. Download complete histories, verify vintages and price coverage, and charge opening, rebalancing and closing costs. The carry signal does not include funding income or broker rollover. Supports MCP Tasks for async execution when clients send task-augmented requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesBase currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD.
quoteYesQuote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD.
end_dateNoInclusive upper bound, YYYY-MM-DD.
strategyNoSignal mode: carry, momentum, or carry_momentum.carry_momentum
start_dateNoInclusive lower bound, YYYY-MM-DD.
event_gatedNoWhen true, allow positions only after verified historical policy publications for either currency. This does not use future calendars or trade before a release.
initial_capitalNoStarting capital for equity-curve calculations.
event_window_daysNoAdditional calendar days after the first UTC decision following publication; 0 permits that first day only.
momentum_lookbackNoMomentum lookback in observations for the momentum signal.
transaction_cost_bpsNoPer-side transaction cost in basis points applied on position changes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD."
    • changedInput schema / properties / event_gated / description
      Previous value: -"When true, only allow positions during release-event windows derived from announcement_datetime on base and quote calendars."New value: +"When true, allow positions only after verified historical policy publications for either currency. This does not use future calendars or trade before a release."
    • changedInput schema / properties / event_window_days / description
      Previous value: -"Event gate window in days around each release date (0 means release-date only)."New value: +"Additional calendar days after the first UTC decision following publication; 0 permits that first day only."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD."
  2. Changed10 schema fields changed
    • removedInput schema / properties / base / title
      Removed value: -"Base"
    • removedInput schema / properties / end_date / title
      Removed value: -"End Date"
    • removedInput schema / properties / event_gated / title
      Removed value: -"Event Gated"
    • removedInput schema / properties / event_window_days / title
      Removed value: -"Event Window Days"
    • removedInput schema / properties / initial_capital / title
      Removed value: -"Initial Capital"
    • removedInput schema / properties / momentum_lookback / title
      Removed value: -"Momentum Lookback"
    • removedInput schema / properties / quote / title
      Removed value: -"Quote"
    • removedInput schema / properties / start_date / title
      Removed value: -"Start Date"
    • removedInput schema / properties / strategy / title
      Removed value: -"Strategy"
    • removedInput schema / properties / transaction_cost_bps / title
      Removed value: -"Transaction Cost Bps"
  3. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."
  4. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."
  5. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NZD, PEN, SEK, THB, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NZD, PEN, SEK, THB, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD."
  6. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, THB, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NZD, PEN, SEK, THB, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, THB, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NGN, NZD, PEN, SEK, THB, USD."
  7. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, THB, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, THB, USD."
  8. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AED, AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, MXN, NZD, PEN, PLN, SEK, THB, TWD, USD."New value: +"Base currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AED, AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, MXN, NZD, PEN, PLN, SEK, THB, TWD, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, NZD, PEN, SEK, USD."
  9. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: AED, AUD, BRL, CAD, CHF, DKK, EUR, GBP, IDR, ILS, JPY, MXN, NZD, PEN, PLN, SEK, THB, TWD, USD."New value: +"Base currency, 3-letter ISO code. Supported: AED, AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, MXN, NZD, PEN, PLN, SEK, THB, TWD, USD."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: AED, AUD, BRL, CAD, CHF, DKK, EUR, GBP, IDR, ILS, JPY, MXN, NZD, PEN, PLN, SEK, THB, TWD, USD."New value: +"Quote currency, 3-letter ISO code. Supported: AED, AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, IDR, ILS, JPY, MXN, NZD, PEN, PLN, SEK, THB, TWD, USD."
  10. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations (readOnlyHint=true, destructiveHint=false) already establish safety, and the description adds significant behavioral context: it downloads complete histories, verifies vintages and price coverage, charges various costs, and explicitly notes that the carry signal excludes funding income or broker rollover. It also explains the async execution support. This exceeds the baseline set by annotations.

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 two sentences, front-loaded with the core purpose and key behaviors, then adds the critical caveat about carry signal costs and async support. Every sentence earns its place, though the caveat could be considered slightly dense for readability.

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?

Given 10 parameters with 100% schema coverage and no output schema, the description appropriately focuses on behavior and constraints not in the schema. It covers data downloading, verification, cost charging, carry signal limitations, and async execution. The annotations convey safety, so nothing essential for correct invocation is missing.

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

Parameters3/5

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

Schema coverage is 100%, so the schema documents all 10 parameters with descriptions and examples. The description adds context for a few parameters (e.g., carry signal semantics, event gating details), but does not systematically expand parameter meaning beyond what schema already provides. Baseline of 3 is appropriate given high schema coverage.

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?

The description clearly states a specific verb ('Run') and resource ('spot-only FX backtest'), and distinguishes it from related tools like 'fx_trade_setup_task' by emphasizing the backtest focus on historical signals and costs. However, it doesn't explicitly name sibling tools for comparison, leaving some differentiation to inference.

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?

The description specifies when to use the tool (when running a backtest on policy-rate differentials or momentum) and how to customize it via strategy and event gating, but doesn't explicitly state when to use alternatives like 'fx_trade_setup_task'. It also mentions support for MCP Tasks, which is an alternative invocation context.

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.