Calculation of foreign exchange gains
The "Performance distribution" shows the currency or foreign exchange gain for each position: unrealized foreign exchange gain in the "P&L" column, realized foreign exchange gain in the "P&L realized" column.
Calculation
The foreign exchange gain is divided into realized foreign exchange gain and unrealized foreign exchange gain.
The realized foreign exchange gain changes when a position is closed (in whole or in part). The realized foreign exchange gain is always calculated against the cost of the partial position just closed. Therefore, the purchase price calculation type may also need to be taken into account (if the currently open position has more than one opening, because FIFO and commercial purchase price can then deliver different results). The foreign exchange gain is calculated as:
Purchase price in position currency * (exchange rate closing - exchange rate opening)
Exchange rate closing
is the exchange rate between the position currency and the evaluation currency at the time of closing. First, an attempt is made to retrieve it from the transaction. If this is not successful (e.g. because the evaluation currency does not appear in the transaction), the exchange rate from the exchange rate system is used.
Exchange rate opening
is calculated as the ratio of "purchase rate in evaluation currency" and "purchase rate in position currency", whereby only the partial position that has just been closed is considered. the "purchase price" is usually a mixed purchase price, so several tranches may be affected in the case of FIFO.
The unrealized foreign exchange gain is the foreign exchange gain that would be realized if the position were closed out now.
Accounts are calculated in the same way, whereby the purchase price is the same amount as the amount flowing out of the account (in the account currency).