Apama 10.3.1 | Apama Capital Markets Foundation Documentation | Capital Markets Foundation | Market Data Management | Synthetic datasources | Foreign Exchange cross rate service | Cross rate calculations
 
Cross rate calculations
A synthetic cross rate can be calculated from any two FX currency pairs that share a common currency. Consider a trader who wishes to exchange GBP for RMB through the intermediate currency of USD. The currency pairs that will make up the legs of the cross will be GBP/USD, and USD/RMB. As the two currencies are given in different terms, the exchange rate will be determined by multiplying in the cross. For example:

GBP/USD0.62039 - 0.62041
USD/RMB0.15170 - 0.15175
The quote for the bid price for the exchange GBP/RMB is calculated by multiplying the bid price from leg 1, by the bid price from leg 2:
0.62039 x 0.15170 = 0.09411
The quote for the ask price is likewise calculated by multiplying the ask price from leg 1 with the ask price from leg 2:
0.62041 x 0.15175 = 0.09415
Which results in a calculated cross rate for GBP/RMB of:
GBP/RMB0.09411 - 0.09415
There are 4 different ways in which a cross rate can be calculated from two legs. For example, using USD as a common currency, the following combinations can be used to calculate the EUR/JPY cross rate:
1. EUR/USD + USD/JPY = EUR/JPY

output.bidPrice := leg1.bidPrice * leg2.bidPrice
output.askPrice := leg1.askPrice * leg2.askPrice
output.bidQty := (min((leg1.bidPrice * leg1.bidQty),
(1* leg2.bidQty)) / leg1.bidPrice).floor()
output.bidQty := (min((leg1.askPrice * leg1.askQty),
(1* leg2.askQty)) / leg1.askPrice).floor()
2. EUR/USD + JPY/USD = EUR/JPY

output.bidPrice := leg1.bidPrice * (1/leg2.bidPrice)
output.askPrice := leg1.askPrice * (1/leg2.askPrice)
output.bidQty := (min((leg1.bidPrice * leg1.bidQty),
(leg2.askPrice * leg2.bidQty)) / leg1.bidPrice).floor()
output.bidQty := (min((leg1.askPrice * leg1.askQty),
(leg2.bidPrice * leg2.askQty)) / leg1.askPrice).floor()
3. USD/EUR + USD/JPY = EUR/JPY

output.bidPrice := (1/leg1.askPrice) * leg2.bidPrice
output.askPrice := (1/leg1.bidPrice) * leg2.askPrice
output.bidQty := (min(leg1.askQty, leg2.askQty)) / (1/leg1.askPrice).floor()
output.bidQty := (min(leg1.bidQty, leg2.bidQty)) / (1/leg1.bidPrice).floor()
4. USD/EUR + JPY/USD = EUR/JPY

output.bidPrice := (1/leg1.askPrice) * (1/leg2.bidPrice)
output.askPrice := (1/leg1.bidPrice) * (1/leg2.askPrice)
output.bidQty := (min(leg1.askPrice,
(leg2.askPrice * leg2.askQty))) / (1/leg1.askPrice).floor()
output.bidQty := (min(leg1.bidPrice,
(leg2.bidPrice * leg2.bidQty))) / (1/leg1.bidPrice).floor()

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.