Skip to content

Implementation

AI Trading

GPT-6.1 Sol for FX Trading: A Worked EUR/USD Guide

Work through real EUR/USD data with GPT-6.1 Sol and FXMacroData: audit the sample, write Python, compare policy and prices, and test costs.

Editorial standards and corrections

Share article X LinkedIn Email
Pip, the FXMacroData robot mascot, types on a glowing keyboard while lines of code float up into the air and turn into small charts, in a dark study.
Use Codex to organize macro evidence, build conditional scenarios, and check research assumptions.

Quick answer

Use GPT-6.1 Sol in Codex with FXMacroData to develop a currency thesis, inspect the observations behind it, and write a reproducible Python study. This guide works through EUR/USD: an unchanged US policy-rate advantage coincided with both a rising and a falling euro. A delayed momentum rule then beat a passive dollar-bullish position before costs, but lost that advantage under an assumed 2 bp turnover cost. The code, charts, and dated calculations show how a plausible trading idea changes when it is tested.

A trader sees US policy rates above euro-area rates and concludes that the dollar should strengthen. Another looks at a rising EUR/USD chart and sees an argument for buying the euro. Both have noticed something real. Neither has yet explained why their observation should predict the next move, over what horizon, or at a price they can actually trade.

That disagreement is a good job for GPT-6.1 Sol. In a Codex research session, the model can retrieve FXMacroData observations through MCP, read the relevant central-bank statements, turn a verbal idea into Python, and examine whether the calculation answers the original question. The advantage comes from keeping those jobs together: a change in the data definition should change the code, and a disappointing result should change the written thesis.

This is systematic discretion: the trader exercises judgment about the economic mechanism and the evidence that would overturn it, while the calculation makes definitions, timing, and comparisons repeatable. Sol helps connect the two by checking whether the notebook expresses the idea the trader meant to test.

The example below uses real EUR/USD reference observations and policy-rate records retrieved on 8 October 2026. Its historical study covers 1 October 2025 to 26 June 2026, an interval selected for consistent ECB reference coverage. It keeps the experiment small: one pair, one fixed price rule, passive directional comparisons, and explicit costs.

Start with a question that could change your mind

“Give me an EUR/USD trading signal” leaves almost everything that matters unspecified. The model must choose the horizon, indicators, weighting, entry convention, and meaning of a signal. It can quietly move between a macro argument about the next quarter and a price observation about the last few sessions. A fluent answer may conceal that shift.

A better opening question is narrower: what does the US policy-rate premium tell an EUR/USD trader, and how does a fixed, delayed price rule compare with passive currency exposure? This separates the economic hypothesis from the entry decision. The policy gap might describe the environment in which an idea is considered; it need not tell a trader when to put the idea on.

EUR/USD is the number of US dollars paid for one euro. A rise from 1.1750 to 1.1919 is euro appreciation, even when US rates are higher. State that convention explicitly. A sign error here can survive an entire notebook: “dollar strength” becomes a positive EUR/USD signal, and a perfectly implemented calculation tests the opposite of the proposed trade.

The model also needs to distinguish a level from a change in expectations. An already-known rate advantage may be reflected in prices. An unexpected change in the likely future policy path can matter without a change in today's policy rate. Conversely, a rate increase driven by an adverse inflation shock can arrive alongside a weaker growth outlook. A single hawkish label cannot resolve those competing effects. Federal Reserve research on the global tightening cycle examines policy expectations alongside broader risk appetite and finds that relative-rate surprises explain only part of exchange-rate variation. The Fed's study supplies the wider context; our small EUR/USD example tests a much narrower proposition.

Writing down the countercase gives that discussion practical force. If the thesis is that a US rate premium supports the dollar, a euro rally while the premium persists is evidence the timing argument is incomplete. If the explanation then shifts to expected future rate changes, identify the expectations measure that would support it. A current policy-rate series cannot become an expectations series just because the first explanation failed. Sol should help locate the missing evidence, not repair the narrative by changing what an existing number means.

Open the Codex session with the economic question, its unit convention, and a standard for answering it:

Research EUR/USD using FXMacroData.
Question: what does the US policy-rate premium tell an EUR/USD trader,
and how does a delayed price rule compare with passive exposure?
Use USD per EUR and define the rate gap as US minus euro area.
Retrieve the policy definitions and source-labelled FX history first.
Separate what the records demonstrate from possible explanations.
Show one observation that challenges the initial dollar-bullish thesis.
Before calculating a strategy, specify its timing and cost assumptions.

The question leaves room for the original dollar view, the price rule, or neither to survive the comparison. Ask Sol to preserve that uncertainty when it moves from the research brief into code.

Connect Sol to the research tools

Select GPT-6.1 Sol in a supported Codex or ChatGPT Work workspace. OpenAI documents the model for coding and professional tasks, and lists function calling and structured outputs through the Responses API. Those features help with retrieving inputs and maintaining a calculation; they do not establish a forecasting advantage. Availability depends on the client, account, and workspace. See the model documentation and OpenAI's model-selection guide.

In Codex CLI, the model can be selected explicitly:

codex --model gpt-6.1-sol

MCP is the first connection to make. It lets the agent discover and call FXMacroData research tools in the same session as the reasoning and code. In Codex's ~/.codex/config.toml, configure the native remote HTTP server:

[mcp_servers.fxmacrodata]
enabled = true
url = "https://mcp.fxmacrodata.com"
bearer_token_env_var = "FXMD_API_KEY"

The bearer-token setting reads a key from the environment; it does not put the credential in the configuration file. Make the key available to the Codex process, or use the client's OAuth flow where supported. Then ask Sol to confirm the EUR and USD tools available to the session. Subscribed coverage and authentication must be established before the research brief assumes it can retrieve a particular series. The FXMacroData MCP guide and Codex MCP documentation cover the connection details.

For the research conversation, MCP removes much of the plumbing. For the reproducible calculation later in this article, a small REST request makes the chosen source, date interval, and pagination visible in code. These serve different purposes: the agent explores through tools; the notebook preserves a specific input definition. Moving from one to the other should preserve the meaning of the observations.

Work the EUR/USD example before writing a strategy

Start with the policy comparison. Here the US value is the upper bound of the federal funds target range, while the euro-area value is the ECB deposit-facility rate. FXMacroData's US policy-rate page and euro-area policy-rate page describe those series. They are useful policy markers, but their difference is not a tradable overnight funding spread.

The 10 December 2025 FOMC decision lowered the target range to 3.50–3.75%. The ECB deposit rate was 2.00% through the following months, as shown in its official rate history. Thus the comparison used here was 3.75 − 2.00 = 1.75 percentage points, or 175 basis points, in favour of the US policy setting.

The same announced policy gap accompanied different EUR/USD directions
Reference dateEUR/USDUS target upperECB depositUS minus euro area
31 Dec 20251.17503.75%2.00%1.75 pp
30 Jan 20261.19193.75%2.00%1.75 pp
31 Mar 20261.14983.75%2.00%1.75 pp
29 May 20261.16443.75%2.00%1.75 pp

Between the December and January observations, the euro rose 1.44%. From January to March it fell 3.53%. The nominal gap was unchanged. That is the observation that should alter the first draft of the thesis: the gap describes a relative policy level, but it did not identify the direction of each swing in this interval.

One policy gap, several price directions

EUR/USD reference change

Announced policy-rate gap

Selected month-end ECB reference observations, October 2025–June 2026; the final point is 26 June. The policy gap stays at 1.75 pp from December to May while EUR/USD changes direction. Separate axes keep the price change and rate difference in their own units. Policy values provide retrospective context, not an event-time trading signal.

This does not show that interest rates are irrelevant. It shows that “US rates are higher” is an incomplete timing rule. To explain the January rise or the later fall, Sol would need evidence about changing expectations, growth, inflation, positioning, or risk demand. Our two series cannot tell it which of those mechanisms dominated. The model should say that directly rather than invent a causal account from a chart.

There is a second distinction to preserve. A spot-price gain, an interest-rate differential, and a funded currency return are different quantities. A trader selling EUR/USD may face rollover charges or credits that depend on the instrument and broker. Subtracting two central-bank markers does not calculate those cash flows. The price-only experiment below therefore leaves financing out of both the candidate and its benchmark; a funded trading study would need the actual instrument's terms.

At this stage, a useful research note is more specific than “bullish dollar”: the policy comparison favoured the US, but the unchanged gap did not distinguish opposite EUR/USD swings. Test how an explicitly delayed price rule changes the reference-return path, while retaining policy rates as context. This changes the question without claiming that momentum is necessary or that it will work.

Make Sol inspect the sample, not just the chart

The first practical discovery in this example came before any return calculation. The broad EUR/USD extract contained 349 reference rows between 1 October 2025 and 8 October 2026: 192 from the ECB, 68 from Federal Reserve H.10, and 89 from the Croatian National Bank. The date column was unique, but the rows did not all represent the same publisher or reference convention. Some of the broader extract's dates fell on weekends.

A routine that sorts those rows and calculates “20-day momentum” can run without raising an error. Yet 20 observations in a sequence containing weekend rows need not cover the same interval as 20 ECB publication days. A change of reference clock can also mix a market move with a change in how the observation was sampled. This is precisely the sort of defect Sol should find by reading the metadata and inspecting the Python together.

The sample selection was based on coverage, before inspecting returns
SelectionRowsReason
Broad EUR/USD reference extract349Includes three publishers and differing reference conventions.
Keep ECB observations192One named source and one reference identity.
Keep 1 Oct 2025–26 Jun 2026187Continuous selected interval; excludes five later isolated ECB observations.
After the 20-observation lookback and two-row lag165 returnsThe candidate and benchmark use the same eligible return window.

The retained sample has no duplicate dates or weekend rows. Its longest calendar gap is five days, around holiday closures. We do not insert weekend prices, bridge the later long source gaps, or fill absent observations with another publisher. The study ends in June because of that coverage choice, even though more recent EUR/USD observations were available in the broad extract.

The distinction matters when checking the result later. Choosing an interval because it has a continuous source is a disclosed data constraint. Choosing it because the strategy made money is result selection. Save the selection rule before examining performance, and keep the excluded observations available for review. Otherwise the model can make a disappointing study look cleaner simply by changing its sample.

Once the history is retrieved, ask Sol to inspect its identity and coverage before writing the return calculation:

Inspect this EUR/USD reference sample before analysing returns.
Count observations by source and reference convention.
Check duplicate dates, weekend rows and calendar gaps.
Explain whether 20 rows represent a comparable lookback throughout.
Use one named source for the worked study, preserve missing dates,
and record the selection before inspecting any performance.
Do not interpret a reference clock as an executed trade or receipt log.

Write the calculation so another trader can reproduce it

Ask Sol to implement the defined experiment, rather than to search for the best-looking strategy. The Python below uses pandas for the arithmetic and the standard library for retrieval. It requests the source-preserving FX reference endpoint, fixes the ECB source, and pages through the selected interval. An authenticated account needs access to the requested history; credentials belong in FXMD_API_KEY, not in a URL.

First define a small request function. HTTP or entitlement failures should stop the notebook rather than leave it analysing a partial response. The request timeout keeps an unavailable connection from silently hanging the calculation.

import json, os
from pathlib import Path
from urllib.parse import urlencode
from urllib.request import Request, urlopen

BASE = "https://api.fxmacrodata.com/v1"
SOURCE = "ecb_eurofxref_daily"

def fetch(query):
    url = BASE + "/fx/reference-rates/EUR/USD?" + urlencode(query)
    request = Request(url, headers={
        "X-API-Key": os.environ["FXMD_API_KEY"],
        "Accept": "application/json",
    })
    with urlopen(request, timeout=30) as response:
        return json.load(response)

Next retrieve the exact interval. The list limit is 100 rows per request, so this sample needs more than one page. Pin the dataset version once it is returned: a changing dataset during pagination would undermine the claim that the notebook analysed one input.

query = dict(start_date="2025-10-01", end_date="2026-06-26",
             source=SOURCE, timestamp_type="fixing", native_only="true",
             order="date_asc", limit=100)
rows, pages, offset, version = [], [], 0, None
while True:
    page = fetch({**query, "offset": offset})
    current = page.get("dataset_version")
    if not current or (version and current != version):
        raise ValueError("Dataset changed: restart the download")
    version = query["dataset_version"] = current
    batch, paging = page["data"], page["pagination"]
    pages.append(page)
    rows.extend(batch)
    if not paging["has_more"]:
        break
    next_offset = paging["next_offset"]
    if not batch or next_offset != offset + len(batch):
        raise ValueError("Pagination failed to advance")
    offset = next_offset
if len(rows) != paging["total_count"]:
    raise ValueError("Incomplete reference history")
Path("eurusd-evidence.json").write_text(json.dumps(pages), "utf-8")

These are reader-facing REST requests. The research conversation can continue through MCP, but a preserved input and an explicit endpoint make the calculation easier to audit. The newer /v1/fx/reference-rates/EUR/USD surface returns rate and source metadata; do not silently substitute the older /v1/forex/EUR/USD response, whose value field and provenance contract differ. See the FX reference-rate guide for why the chosen observation convention matters.

Before calculating a signal, reject data that no longer satisfy the sample definition. A numeric zero is not a valid FX price, and dropping duplicates would hide a conflict rather than resolve it. The following check also prevents a long hole in the history from being treated as an ordinary next reference observation.

import pandas as pd
import numpy as np

if not rows or not all(isinstance(r.get("source"), dict)
        and r["source"].get("id") == SOURCE
        and r.get("native_or_derived") == "native"
        and r.get("timestamp_type") == "fixing" for r in rows):
    raise ValueError("Missing or mixed reference identity")
if any(type(r.get("rate")) not in (int, float) for r in rows):
    raise ValueError("Missing or invalid rate type")
frame = pd.DataFrame({"date": [r["reference_date"] for r in rows],
                      "rate": [r["rate"] for r in rows]})
frame["date"] = pd.to_datetime(frame["date"], utc=True)
frame = frame.sort_values("date")
if frame["date"].duplicated().any() or len(frame) < 23:
    raise ValueError("Duplicate dates or insufficient warm-up")
if not np.isfinite(frame["rate"]).all() or (frame["rate"] <= 0).any():
    raise ValueError("Invalid reference rate")
if (frame["date"].dt.dayofweek >= 5).any():
    raise ValueError("Unexpected weekend reference row")
if frame["date"].diff().dt.days.max() > 7:
    raise ValueError("Review the gap before treating rows as comparable")

The frozen example contains 187 prices: 1.1724 on 1 October 2025 and 1.1401 on 26 June 2026. That full-period price change is −2.76%. It is not the benchmark return in the strategy table below, because the strategy needs a warm-up period. Comparing a candidate that starts late with a benchmark that starts early would confound the trading rule with the evaluation window.

Now define the candidate. Calculate the change over 20 reference observations, roughly one ECB publication month. This is a simple baseline, not a horizon inferred from the economic story or optimised on the result. A positive change produces a long EUR/USD position; a negative change produces a short position. Shift that signal by two observation rows before applying it to the next measured return. This puts the signal at least one reference observation before the start price of the return it earns. The horizon and lag were fixed before inspecting the result.

import numpy as np

price = frame.set_index("date")["rate"]
momentum = price / price.shift(20) - 1
position = np.sign(momentum).shift(2)
study = pd.DataFrame({
    "position": position,
    "reference_return": price.pct_change(fill_method=None),
}).dropna()
previous = study["position"].shift(1).fillna(0)
study["turnover"] = (study["position"] - previous).abs()
study["gross"] = study["position"] * study["reference_return"]

That shift(2) deserves more attention than the name of the strategy. If a position uses today's closing reference value and also earns the return ending at that value, it has used part of the answer to choose the trade. The code can look concise and mathematically correct while testing an impossible sequence. A delayed signal fixes that particular sequencing error; it does not prove historical data delivery or convert a reference observation into a fill.

A real first-return calculation from the worked sample
StepObservation or calculationMeaning
Signal inputs29 Oct: 1.1636; 1 Oct: 1.17241.1636 ÷ 1.1724 − 1 = −0.7506%, so the delayed signal is short.
Measured return30 Oct: 1.1550 → 31 Oct: 1.1554EUR/USD rises 0.03463%; the short position loses that price return.
Opening cost at 2 bpTurnover = 1Net first return is approximately −0.05463%.
Following observation3 Nov: short position retainedNo position-change cost; the reference decline produces a positive price contribution.

This small example makes the sequence reviewable. The position for the return ending on 31 October comes from the signal dated 29 October, not from the 31 October price. The short loses on the first measured return despite negative momentum. That is normal: a signal can be correctly calculated and still be wrong about the next observation.

For costs, define one basis point as 0.0001 of notional per unit of turnover. Opening from flat to long costs one unit; reversing from long to short costs two. Deduct costs when the position changes, then compound the resulting interval returns. Compare the candidate with both long and short EUR/USD on the same 165 eligible returns, charging each passive position an opening cost. The short comparison represents the opening dollar-bullish direction; the long comparison shows the opposite exposure.

The short path compounds the negative of each interval's price return. Its final gain therefore need not be the exact opposite of the compounded long return. Calculate both paths from the daily observations; reversing the sign of a headline percentage would skip that arithmetic.

The short benchmark maintains exposure equal to minus one unit of current portfolio value. It is not the profit and loss of selling a fixed quantity of euros and leaving that quantity unchanged. The calculation charges for opening and changing direction; it does not charge for the resizing needed to maintain that exposure. That omission matters when interpreting a small difference between the two paths.

def evaluate(cost_bps):
    cost = cost_bps / 10_000
    net = study["gross"] - cost * study["turnover"]
    benchmark = study["reference_return"].copy()
    short = -study["reference_return"].copy()
    benchmark.iloc[0] -= cost
    short.iloc[0] -= cost
    wealth = (1 + net).cumprod()
    benchmark_wealth = (1 + benchmark).cumprod()
    short_wealth = (1 + short).cumprod()
    peak = wealth.cummax().clip(lower=1.0)
    short_peak = short_wealth.cummax().clip(lower=1.0)
    return {
        "return_pct": 100 * (wealth.iloc[-1] - 1),
        "max_drawdown_pct": 100 * (wealth / peak - 1).min(),
        "benchmark_pct": 100 * (benchmark_wealth.iloc[-1] - 1),
        "short_benchmark_pct": 100 * (short_wealth.iloc[-1] - 1),
        "short_max_drawdown_pct": 100 * (short_wealth / short_peak - 1).min(),
        "turnover": study["turnover"].sum(),
        "observations": len(study),
    }

for bps in (0, 1, 2, 5):
    print(bps, evaluate(bps))

This is a constant-exposure reference-price diagnostic. It omits funding, broker rollover, bid/ask prices, slippage, and execution latency. No final liquidation cost is charged to either series. The 1, 2, and 5 bp deductions are explicit sensitivity assumptions, not measurements of a broker's fees. Keeping these choices visible is what lets the reader decide which later execution study would be needed.

Read the result without promoting it into an edge

The eligible window runs from 31 October 2025 to 26 June 2026; its first return starts at the 30 October reference value of 1.1550. The candidate makes 12 reversals after opening, giving total turnover of 25 units. Over that window, the momentum rule produces +1.56% before costs. Holding short EUR/USD produces +1.08%, while holding long produces −1.29%. Taking no price exposure would contribute 0%; that flat baseline includes no cash interest.

Compare the rule with both currency directions

All three paths start at the 30 October reference observation and use the same 165 returns. At an assumed 1 bp turnover cost, momentum ends at +1.30%, short EUR/USD at +1.07%, and long EUR/USD at −1.30%. These are reference-price calculations with hypothetical costs. Hover to inspect the dated path.

The short benchmark makes the comparison more demanding. The gross advantage of momentum over the original dollar-bullish direction is only 0.48 percentage points. Its gross maximum drawdown is also deeper: −4.58%, against −4.09% for the passive short. Beating long EUR/USD in a period when the euro fell is a much easier hurdle than showing that 12 reversals improved on a simple short position.

Costs then change the conclusion. At 1 bp per turnover unit, momentum retains +1.30% and the passive short retains +1.07%. At 2 bp, momentum is marginally behind the short benchmark: +1.05% against +1.06%. At 5 bp, it earns only +0.29%, while the short retains +1.03%. The rule's extra trading has consumed its gross advantage over the direction suggested at the beginning.

At 2 bp, the short's lead is only 0.0094 percentage points, or about 0.94 basis points of cumulative return. That is too small to treat as a practical ranking when financing, resizing and execution remain unmodelled. The useful finding is that the gross advantage is fragile under the stated cost convention; the exact crossover is not an estimate of what a trader would earn at a broker.

Fixed rule, fixed window, changing cost assumptions
One-way cost assumptionMomentum returnMomentum maximum drawdownShort EUR/USDLong EUR/USD
0 bp+1.56%−4.58%+1.08%−1.29%
1 bp+1.30%−4.72%+1.07%−1.30%
2 bp+1.05%−4.85%+1.06%−1.31%
5 bp+0.29%−5.25%+1.03%−1.34%

The gross advantage disappears under a 2 bp cost assumption

Momentum pays for 25 turnover units; the passive short pays for one opening unit. The same dates and price conventions apply to both. At 5 bp, momentum also has a −5.25% maximum drawdown, against −4.09% for the short. Only the illustrative cost deduction changes across the paired bars.

Sol should make three distinctions in its written interpretation. An arithmetic result is something the code computes. An economic explanation is a hypothesis about why the prices moved. A forecast is a claim about a future distribution. The notebook produces the first. Additional evidence is required for the second, and a separate evaluation design is required for the third.

The positive short return does not prove the policy gap caused the euro's decline. Policy rates were not used in either calculation. The short is a directional benchmark, and the study cannot identify whether rate expectations, energy, risk appetite, or another force created the price path. It can show that this particular timing rule did not improve on that direction under the higher cost assumptions.

There is no untouched holdout in this example. The sample has already been inspected to build the explanation, so a second run on the same dates cannot be relabelled out of sample. Nor would testing ten lookbacks and selecting the best convert it into a more convincing result. A separate evaluation would need comparable coverage, the same fixed rule, and the instrument's actual funding and execution terms.

Separate the announcement, the effective date, and the research clock

Adding policy rates as a trading filter creates a harder timing problem than the price-only diagnostic. On 11 June 2026, the ECB announced a deposit-rate increase to 2.25%, effective 17 June. Its release also raised the 2026 headline-inflation projection to 3.0% and put projected growth at 0.8%, describing an adverse energy shock. These are official projections, not a market-consensus surprise. The ECB decision is a useful example of why “higher rates” can coexist with a weaker growth argument.

11 June: decision

The new rate is announced. A market-expectations study needs confirmed public availability before its tested price.

17 June: effective date

The deposit rate becomes effective. This is a different date from the decision and matters for a funding calculation.

Later historical review

A retrieved snapshot can describe the decision without proving when a subscriber first received that value.

Three clocks answer different questions. Joining a rate to prices by its effective date tests something different from trading the announcement.

In the historical packet used here, that June policy observation has an unverified publication-time status. It can appear in the retrospective context table, supported by the official decision, but the calculation should not silently promote its stored time into verified event-time eligibility. Likewise, reference-price clock fields describe a convention; they are not a receipt log or proof of an observed release instant.

The following small guard illustrates the boundary. It is a validation sketch for a normalized research record, not a claim about the full raw API schema. A record needs confirmed publication evidence and a timezone-aware timestamp before it can enter a strict public-availability reconstruction:

def eligible_publication(record, cutoff_utc):
    if record["publication_time_status"] != "confirmed":
        return False
    stamp = pd.Timestamp(record["verified_published_at"])
    if stamp.tzinfo is None:
        raise ValueError("Publication timestamp needs a timezone")
    return stamp.tz_convert("UTC") <= pd.Timestamp(cutoff_utc)

june_record = {"publication_time_status": "unverified"}
assert not eligible_publication(june_record, "2026-06-11T12:00:00Z")

A proper historical macro test needs more than this guard: it must select the vintage available under the chosen cutoff and distinguish public publication from captured availability. A later revision of an earlier economic period cannot be inserted into a past decision simply because its period date is old. The point-in-time guide explains the distinction; through MCP, known_at_time_task can help reconstruct and inspect the eligible evidence where coverage permits.

This is why the worked momentum rule does not quietly add “and the US rate must exceed the ECB rate.” Such a condition would introduce a macro-data eligibility question the price-only example has not resolved. Sol's contribution is to notice that the additional line of code changes the research burden, rather than treating it as a harmless enhancement.

Use Sol to review the conclusion and prepare the next release

The final conversation should focus on the result actually obtained. Give Sol the calculated metrics and ask it to audit the reasoning before it writes a desk note. In this example there are several concrete errors it can catch: treating 349 mixed-source rows as equivalent days; comparing a warm-up-delayed candidate with a full-period benchmark; using the same price to create a position and earn its return; and calling a policy-rate difference realised carry income.

For the final review, attach the selected observations, the Python, and the calculated result. Ask Sol to trace the conclusion back through those inputs:

Review this EUR/USD notebook against its stated research question.
Trace one position from its input observations to the return it earns.
Check that candidate and benchmark share the eligible window.
Reconcile every headline return and drawdown to the Python output.
Explain what the unchanged policy gap does and does not demonstrate.
Identify claims that would require first-vintage data or broker prices.
Write a short desk note: finding, countercase, costs, and next test.
Do not call this sample out of sample or infer causality from co-movement.

For a repeatable reporting application, the same separation can be maintained with the Responses API. Python supplies the numbers; GPT-6.1 Sol supplies an interpretation constrained to those numbers. The following uses the report dictionary produced from the notebook, rather than inviting the model to recalculate performance from memory. Set OPENAI_API_KEY for the SDK before running it.

from openai import OpenAI

report = {"lookback_rows": 20, "signal_lag_rows": 2,
          "start": str(study.index[0].date()),
          "end": str(study.index[-1].date()),
          "cost_cases": {str(bp): evaluate(bp) for bp in (0, 1, 2, 5)}}
response = OpenAI().responses.create(
    model="gpt-6.1-sol", reasoning={"effort": "medium"}, store=False,
    instructions=("Review the supplied reference-price diagnostic. "
        "Use only its numbers. Distinguish arithmetic from explanation. "
        "State missing execution and out-of-sample evidence. "
        "Do not infer causality or recommend an order."),
    input=json.dumps(report),
)
print(response.output_text)

Check that the response preserves the 165-return window and explains why the short comparison changes the interpretation. If it calls momentum superior while ignoring the cost-dependent reversal of that comparison, send it back to the supplied numbers.

For the next discretionary review, return to the conflict visible in the June ECB decision: inflation pressure supported tighter policy, while the adverse energy shock weakened the growth outlook. Use the official release calendar to identify a scheduled release, then ask Sol whether its details strengthen the inflation argument, the growth countercase, or neither. An actual-versus-previous change is not a consensus surprise; the comparison needs a compatible expectation recorded before the release. The June ECB projections are official forecasts and cannot supply that market expectation.

Keep the original US-premium thesis, the unchanged-gap counterexample, and the fixed-rule metrics in the research journal. Later releases should add evidence to that record rather than rewrite the initial question. The unresolved test is precise: can the published price rule improve on passive directional exposure in a separate comparable period after funding and execution costs? The current sample has not demonstrated that.

Sources and reproduction

The worked figures use FXMacroData records retrieved on 8 October 2026. The sample contains 187 ECB EUR/USD reference observations from 1 October 2025 to 26 June 2026; the fixed diagnostic uses 165 eligible returns. Costs are illustrative one-way notional deductions, and both paths omit terminal liquidation and financing. All return figures are unannualised. The charts contain the fixed observations used for this article, so later data updates can be distinguished from the displayed calculation.

FXMacroData API data

Data endpoints used in this article

No FXMacroData API data endpoint is attributed to this article. Its evidence base is identified in the article and source links.

Explore the FXMacroData API reference

Frequently asked

Questions about this topic

What does GPT-6.1 Sol contribute to this FX research example?

It helps connect a macro question to retrieved observations and Python, inspect source changes and signal timing, and challenge the written conclusion. The calculations determine the numeric results; the model should explain them without inventing a causal or forecasting claim.

Is the momentum result an executable trading strategy?

No. It is a fixed historical reference-price diagnostic, with assumed turnover costs. It omits broker prices, spread, slippage, financing and final liquidation, and has no untouched out-of-sample period.

Why does the example stop in June 2026?

The study selects a continuous ECB reference interval from 1 October 2025 to 26 June 2026. A broader extract contained other publishers and five later isolated ECB observations. The source and coverage constraint was chosen before inspecting returns.

Can a policy-rate gap be treated as carry income?

The Fed target upper bound minus the ECB deposit-facility rate is a policy comparison. It does not calculate an instrument's actual funding, forward points or broker rollover, which require separate terms and data.

Keep reading

Blogroll

AI Answer-Ready

Key Facts

Page
GPT-6.1 Sol for FX Trading: A Worked EUR/USD Guide
Section
Articles
Canonical URL
https://fxmacrodata.com/articles/how-to-use-openai-codex-with-fxmacrodata-for-fx-trading
Source
FXMacroData editorial and official publisher references
Last Updated
2026-10-08 06:12 UTC

Provenance And Trust

Cite the canonical URL and source field above. Where available, this page maps to official publisher releases and timestamped updates.

Quick Q&A

What does GPT-6.1 Sol contribute to this FX research example? It helps connect a macro question to retrieved observations and Python, inspect source changes and signal timing, and challenge the written conclusion. The calculations determine the numeric results; the model should explain them without inventing a causal or forecasting claim.

Is the momentum result an executable trading strategy? No. It is a fixed historical reference-price diagnostic, with assumed turnover costs. It omits broker prices, spread, slippage, financing and final liquidation, and has no untouched out-of-sample period.

Why does the example stop in June 2026? The study selects a continuous ECB reference interval from 1 October 2025 to 26 June 2026. A broader extract contained other publishers and five later isolated ECB observations. The source and coverage constraint was chosen before inspecting returns.

Can a policy-rate gap be treated as carry income? The Fed target upper bound minus the ECB deposit-facility rate is a policy comparison. It does not calculate an instrument's actual funding, forward points or broker rollover, which require separate terms and data.

Prompt Packs

Use these in ChatGPT, Claude, Gemini, Mistral, Perplexity, or Grok for consistent source-aware outputs.