## TL;DR

The agent looked up the exchange rate for the day the expense was filed rather than the day the card was charged, so every conversion used the wrong rate. Change the rate lookup to use the transaction (posting) date from the card feed. The card network converted on the transaction date; the agent must use the same date.

## Error

```text
agent's currency converter used the expense date rate instead of the transaction date
```

## Steps

1. Confirm the error: pick a converted expense and compare the agent's rate against the historical rate for the transaction date versus the expense date. Expected: the agent's rate matches the expense date, not the transaction date.
2. Change the converter to take the transaction date from the card feed record as the rate-date input. Expected: the lookup key is the charge date.
3. Handle edge cases: weekend and holiday transaction dates should fall back to the previous business day's rate, matching how networks settle. Expected: the fallback rule is documented in the code.
4. Re-run conversion over the affected expenses. Expected: converted amounts now match the card statement.
5. Add a regression check comparing converted totals to statement totals within tolerance. Expected: future wrong-date lookups fail the check loudly.

## When to use

- An agent converts foreign expenses with the wrong date's rate.
- Converted amounts disagree with card statements.
- The expense date and transaction date differ by days or weeks.

## When not to use

- No rate is available for the date (a data-availability problem).
- The amounts differ because of fees, not the rate.
- The expense is single-currency.

## Tool compatibility

Applies to custom audit agents with currency conversion (Python, agent frameworks; current 2026 releases).

### Variant phrasings

### fx conversion used the filing date

Key the rate lookup to the transaction date.

### converted total doesn't match the statement

The rate date is the usual suspect. Verify which date the agent used.

### weekend transaction converted at the wrong rate

Fall back to the previous business day, like the network does.

## Why it happens

Expense date (when the human filed) and transaction date (when money moved) routinely differ by days or weeks, and exchange rates move in between. The card network's conversion happened on the transaction date, so that date's rate is the economically correct one. Using the expense date is a convenient default that is quietly wrong, and the error compounds across every foreign expense the agent touches.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_XAHoq5V1wW5sqO9a0NV5og
