FAILURE MAP
← Case archive

FA-62330 / Currency rounding and FX conversion / Member archive

The base and quote deposit rates are swapped in the parity formula · case 05

A higher-yielding quote currency produces forward discount points instead of premium points.

Member previewVariant 5 · 3 implementations · 7 checks per implementation

Case contract

solve(pair, spot, base_pct, quote_pct, days): covered-interest-parity outright F = S*(1 + rq*days/Bq)/(1 + rb*days/Bb) with money-market bases GBP, AUD, CAD 365 and USD, EUR, JPY, CHF 360; rates are given in percent. The pip exponent is 2 for JPY-quoted pairs, else 4. Return [F rounded half-even to pip exponent + 1 decimals, forward points = (F - S)*10**pip_exp rounded half-even to 2 decimals] as strings, both computed from the exact F.

Why this case matters

Currency amounts must be rounded at the right stage and in the right unit, or ledgers, quotes and settlements drift by minor units.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression parity-orientation 1["17.96027", "4067.72"]["17.15594", "-3975.59"]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗