feedstock — Local-First Input-Cost Risk for a Metals Plant

feedstock — Local-First Input-Cost Risk for a Metals Plant An architecture diagram generated by Archify. Instrument Registry · names vs source reply · Runs inside the plant Instrument Registry names vs source reply Quality Monitor · gaps · staleness · Runs inside the plant Quality Monitor gaps · staleness Leakage Guard · runs in CI · Runs inside the plant Leakage Guard runs in CI Price Source · the one outbound call · Architecture component Price Source the one outbound call Ingestion · 10-year backfill · Runs inside the plant Ingestion 10-year backfill Unit Conversion · explicit, fails loudly · Runs inside the plant Unit Conversion explicit, fails loudly TimescaleDB · 30,302 daily bars · Runs inside the plant TimescaleDB 30,302 daily bars Feature Derivation · bands + outcomes · Runs inside the plant Feature Derivation bands + outcomes Cost Basket · your mix, your cost · Runs inside the plant Cost Basket your mix, your cost Buy Signal · walk-forward backtest · Runs inside the plant Buy Signal walk-forward backtest Dashboard · no front-end deps · Runs inside the plant Dashboard no front-end deps FastAPI · serves it locally · Runs inside the plant FastAPI serves it locally daily bars verified names raw prices normalised 10y history gaps + staleness guarded in CI bands prices per unit unit cost edge vs baseline served locally Runs inside the plant Legend Frontend Backend Database Security External

Units fail loudly

  • • An implicit kg-to-lb conversion gives a cost 2.2x wrong and raises no error
  • • The troy ounce (31.1 g) is kept separate from the common one (28.35 g)
  • • Confusing those two puts a 10% error into gold and silver

One ticker was not what it said

  • • The registry verifies display names against the source's own response
  • • A ticker trusted as zinc turned out to be a 10-year Treasury note future
  • • Nothing in the output would have told me — hence a check, not a convention

What it does not claim

  • • Not a trading bot: it does not promise to beat the market
  • • The only claim is each model's out-of-sample error against a naive baseline
  • • Measured over 10 years, intuition does not hold — on several instruments it is inverted