Tooluck logoTooluck
SKILL.md

triangulated-fx-rates

Agent skill frombenchflow-ai/skillsbench

Reference for multi-hop / triangulated currency conversion on batch rate tapes. When a rate row carries an explicit "via" currency, the row's rate is only one leg of the conversion, and the via currency may ITSELF be quoted through another via — so the effective rate is the product of every leg, resolved by walking the chain until a direct quote is reached. Useful when an FX feed lists some pairs directly to the reporting currency and others as triangulated (or doubly-triangulated) quotes through vehicle currencies.

How to install triangulated-fx-rates

install triangulated-fx-rates
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench

# or add only this skill to Claude Code: copy the folder

tasks-extra/cobol-gl-batch-reconcile/environment/skills/triangulated-fx-rates/

# into

~/.claude/skills/triangulated-fx-rates/ (all projects)

.claude/skills/triangulated-fx-rates/ (one project)

tasks-extra/cobol-gl-batch-reconcile/environment/skills/triangulated-fx-rates/SKILL.md

Apache-2.0Full file
1# Triangulated FX rates
2
3Most rate feeds list a direct rate to the reporting currency (typically
4USD). Less liquid currencies are often quoted *through* a more liquid
5vehicle currency (commonly EUR or USD itself). On a batch rate tape this is
6encoded as a second "via" column on the same row:
7
8```
9CCY RATE VIA
10USD 1.0000
11EUR 1.0850
12GBP 1.2750
13CHF 0.9200 EUR <-- CHF -> EUR is the first hop
14ZAR 0.0650 EUR <-- ZAR -> EUR is the first hop
15BRL 0.3000 ZAR <-- BRL -> ZAR -> EUR -> USD : TWO via hops
16JPY 0.0064
17```
18
19A blank `VIA` column means the row is already a direct quote against the
20reporting currency. A non-blank `VIA` column means the row gives the rate
21from CCY to VIA — and you still need to convert from VIA to the reporting
22currency.
23
24## The via chain can be longer than one hop
25
26This is the part that is easy to get wrong. The via currency named on a row
27is **not guaranteed to be a direct quote** — it may have its own non-blank
28via column, which in turn may have another, and so on. A single via lookup
29is therefore only correct when the via happens to be direct. To get a
30correct effective rate you must **follow the chain**: keep multiplying in the
31next leg's primary rate, moving to that leg's via, until you reach a row
32whose via is blank (a true direct quote against the reporting currency).
33
34```
35effective_rate(CCY) = primary(CCY) × primary(via(CCY)) × primary(via(via(CCY))) × …
36…

Excerpt shown under the repository's Apache-2.0 license.

More skills in skillsbench

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates