Skip to main content
Glama

FX Backtest

fx_backtest_task
Read-only

Run a spot-only FX backtest using historical policy-rate-differential and/or lagged momentum signals. Downloads complete histories, verifies vintages and price coverage, and charges opening, rebalancing and closing costs. The carry signal does not include funding income or broker rollover. Access: API key required, else returns subscription_required with a subscribe link.

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": {
      "base": "<base>",
      "quote": "<quote>"
    },
    "name": "fx_backtest_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesBase currency, 3-letter ISO code. Supported: lowercase 3-letter catalogue currency, e.g. usd or eur.
quoteYesQuote currency, 3-letter ISO code. Supported: lowercase 3-letter catalogue currency, e.g. usd or eur.
end_dateNoInclusive upper bound, YYYY-MM-DD.
strategyNoSignal mode.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. Changed3 schema fields changed
    • changedInput schema / properties / strategy / description
      Previous value: -"Signal mode: carry, momentum, or carry_momentum."New value: +"Signal mode."
    • addedInput schema / properties / strategy / enum
      Added value: +[
      +  "carry",
      +  "momentum",
      +  "carry_momentum",
      +  null
      +]
    • removedInput schema / properties / strategy / examples
      Removed value: -[
      -  "carry_momentum",
      -  "carry",
      -  "momentum"
      -]
  2. Changed23 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Base currency, 3-letter ISO code. Supported: any lowercase 3-letter ISO code in the FXMacroData catalogue, for example usd, eur, gbp, jpy."New value: +"Base currency, 3-letter ISO code. Supported: lowercase 3-letter catalogue currency, e.g. usd or eur."
    • removedInput schema / properties / end_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / end_date / default
      Removed value: -null
    • changedInput schema / properties / end_date / examples
      Previous value: -[
      -  "2020-01-01",
      -  "2024-06-30"
      -]New value: +[
      +  "2024-06-30"
      +]
    • addedInput schema / properties / end_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / event_gated / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / event_gated / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedInput schema / properties / event_window_days / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / event_window_days / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / initial_capital / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / initial_capital / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedInput schema / properties / momentum_lookback / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / momentum_lookback / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency, 3-letter ISO code. Supported: any lowercase 3-letter ISO code in the FXMacroData catalogue, for example usd, eur, gbp, jpy."New value: +"Quote currency, 3-letter ISO code. Supported: lowercase 3-letter catalogue currency, e.g. usd or eur."
    • removedInput schema / properties / start_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / start_date / default
      Removed value: -null
    • changedInput schema / properties / start_date / examples
      Previous value: -[
      -  "2020-01-01",
      -  "2024-06-30"
      -]New value: +[
      +  "2024-06-30"
      +]
    • addedInput schema / properties / start_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / strategy / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / strategy / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / transaction_cost_bps / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / transaction_cost_bps / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedInput schema / title
      Removed value: -"fx_backtest_taskArguments"
  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, HUF, ILS, JPY, KRW, MYR, NGN, NOK, NZD, PEN, SEK, THB, TWD, USD."New value: +"Base currency, 3-letter ISO code. Supported: any lowercase 3-letter ISO code in the FXMacroData catalogue, for example usd, eur, gbp, jpy."
    • changedInput schema / properties / quote / description
      Previous 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."New value: +"Quote currency, 3-letter ISO code. Supported: any lowercase 3-letter ISO code in the FXMacroData catalogue, for example usd, eur, gbp, jpy."
  4. 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."
  5. 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"
  6. 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."
  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, 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."
  8. 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."
  9. 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."
  10. 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."
  11. 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."
  12. 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."
  13. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.