Metals & FX

Next daily step today 16:30 ET·prices and news checked 9 min ago·News shield shadow·Risk not started·Trend and carry (v1)

How it works

A paper account (pretend money, real prices) for gold, silver and seven currency pairs against the dollar. Plain code makes every trading decision. Claude reads the news for the shield and writes reports; it can make the account more careful, never bolder.

Every 15 minutes

  1. PricesYahoo Finance daily bars for the nine instruments, the ETFs that confirm big moves, and the dollar index. Interest rates from FRED once a day.
  2. News shieldHeadlines from Google News searches, MarketWatch, the Fed and the ECB; a keyword filter; then claude-opus-5-5 (effort high) rates them into a fixed schema. Code turns ratings into flags or cuts.
  3. Intraday checksThe kill switch and the drawdown stop on live prices.

Once a day, 16:30 New York time

  1. Check the dataFresh, plausible prices or no trade.
  2. Signals and sizesFrom the frozen release v1 (sha256 37cfda125165…). A changed file stops trading.
  3. Risk gateLimits below.
  4. OrdersFilled at the current price plus half the spread, commission and slippage. Each order key is unique, so nothing trades twice.
  5. Reconcile and reportFinancing booked; the same rules re-run as a backtest over the live period; Claude proposes its own weights (shadow account, never traded) and writes the report.

The strategy

s_t = \frac{1}{3}\sum_{h \in \{63,126,252\}} \operatorname{sign}\!\left(\ln \frac{P_t}{P_{t-h}}\right),\qquad w_t = s_t\,\frac{\sigma^*}{\hat\sigma_t}\hat\sigma_t^2 = \lambda\,\hat\sigma_{t-1}^2 + (1-\lambda)\,r_t^2,\qquad \lambda = 1 - \tfrac{2}{61}\sigma_p = \sqrt{w^\top \Sigma\, w\,\cdot 261} \le 10\%

Risk gate

Positions, costs and carry

Positions are held like spot contracts for difference in USD: price changes settle into cash at each step; each day a long position earns the rate of what it holds and pays the rate of what it is funded in (metals: their lease rate, gold 0.25%, silver 0.5%), minus 0.5% a year. Cash earns the USD rate.

\text{carry}_{\,\text{long } B/Q} = N \cdot (i_B - i_Q - m)\cdot \tfrac{\Delta t}{365}

Metals use the COMEX front-month future (GC=F, SI=F) as a stand-in for spot; its roll jumps are about the size of a day's noise. Spreads: XAU 1.5 bp, XAG 4 bp, EURUSD 0.6 bp, USDJPY 0.8 bp, GBPUSD 1 bp, AUDUSD 1 bp, USDCHF 1.2 bp, USDCAD 1.2 bp, NZDUSD 1.6 bp; commission 0.3 bp, slippage 0.5 bp.

What Claude does and does not do

What Claude costs

K \approx N_{calls}\left(\frac{T_{in}}{10^6}\,p_{in} + \frac{T_{out}}{10^6}\,p_{out}\right)
UseCalls a dayTokens inTokens outA day
News shield1.03,6421,643$0.05
Total$0.05

Averages so far, at $4 / $20 per million tokens. Budget: $5.00 a day, after which calls stop until tomorrow.

Go / no-go before any real money

Fixed in advance. Meeting them is a reason to look closer, not a decision; that stays with a person.