FX Backtest Task
fx_backtest_taskRead-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. Returns analysis in the tool response. Access: requires an FXMacroData API key; an anonymous call returns subscription_required with a subscribe link.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | 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. | |
| quote | Yes | 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. | |
| end_date | No | Inclusive upper bound, YYYY-MM-DD. | |
| strategy | No | Signal mode: carry, momentum, or carry_momentum. | carry_momentum |
| start_date | No | Inclusive lower bound, YYYY-MM-DD. | |
| event_gated | No | When true, allow positions only after verified historical policy publications for either currency. This does not use future calendars or trade before a release. | |
| initial_capital | No | Starting capital for equity-curve calculations. | |
| event_window_days | No | Additional calendar days after the first UTC decision following publication; 0 permits that first day only. | |
| momentum_lookback | No | Momentum lookback in observations for the momentum signal. | |
| transaction_cost_bps | No | Per-side transaction cost in basis points applied on position changes. |