Free lesson · FX and commodities
Triangular conversion with executable sides
Open interactive lessonPractice calculationsExplore labs
Start with the idea
A currency loop must finish with more of the starting currency after all conversions to show a gross executable discrepancy.
Symbols, units & horizon
- A₀: starting units of currency A
- b_B/A: B received per A sold
- b_C/B: C received per B sold
- a_C/A: C paid per A bought on the final leg
- A_end: ending units of A
- rates are executable quotes for the chosen direction and size at a common snapshot
When and why to use this
Audit quote consistency and demonstrate why trade direction and units matter.
A currency loop must finish with more of the starting currency after all conversions to show a gross executable discrepancy.
Start with a declared currency and label every conversion as buying or selling the base unit. Multiplication works only when the units cancel in order; one reversed leg needs division and the opposite side of its quote.
A snapshot calculation cannot establish all legs are executable simultaneously at the required size. Include stale quotes, partial fills, fees, credit lines and settlement constraints before treating the loop as an opportunity.
Triangular conversion with executable sides
- Sell A for B at the B-per-A bid.
- Sell obtained B for C at the C-per-B bid.
- Buy A using C at the C-per-A ask, so divide by that ask.
Start with 100 A. Rates 2 B/A, 3 C/B and final ask 5.9 C/A give 100×2×3/5.9≈101.694915 A before other costs.
Apply it in a strategy
- Freeze inputs at the stated decision time and record their units.
- Audit quote consistency and demonstrate why trade direction and units matter.
- Recompute the example, then change the material assumption and explain the difference.
Research deliverable
Triangular conversion with executable sides: produce the worked calculation, a timestamped input record and a written decision addressing this limitation: Asynchronous quotes or failed legs can turn a calculated surplus into directional exposure and loss.
These are synthetic mechanics examples, not historical performance or paper replications. Module evidence and research boundaries record the 12 September 2026 review.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
# Python 3.10+; standard library and NumPy only.
# Synthetic teaching inputs; conventions and units are defined in the notation above.
def triangular_end(start,b_per_a_bid,c_per_b_bid,c_per_a_ask):
if min(start,b_per_a_bid,c_per_b_bid,c_per_a_ask)<=0: raise ValueError('Positive inputs required')
return start*b_per_a_bid*c_per_b_bid/c_per_a_ask
assert abs(triangular_end(100,2,3,5.9)-101.694915254237)<1e-9
print(triangular_end(100,2,3,5.9))Continue learning
FX & Commodities: Quotes, Carry, Curves & Hedges — all lessons- Invert both units and bid/ask sides
- Triangular conversion with executable sides
- Covered interest parity by matching currency cash flows
- Unhedged carry leaves exchange-rate risk
- Storage and convenience yield in a commodity forward
- Futures profit and margin cash demands
- Rolling futures without inventing a cash profit
- Minimum-variance cross hedging and basis risk
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations