Financial Management Blogs by Members
Dive into a treasure trove of SAP financial management wisdom shared by a vibrant community of bloggers. Submit a blog post of your own to share knowledge.
cancel
Showing results for 
Search instead for 
Did you mean: 
SohiniRay
Explorer
706

When I started hanging out in the risk management space in the SAP world, one topic that always left me flabbergasted was Forex rates used in Mark to Market and Profit and Loss reporting. Neither did I have an idea about the different rates, nor did I understand the calculation on the Forward exchange rates. After successfully surviving in this commodity business for some time now, I have had the opportunity to delve into this topic numerous times finally reaching the Eureka moment and now I would like to pass this on to my peers or anybody who needs clarity.

To start with we are going to talk about 3 different types of FX rates:
Spot rates: The exchange rate for immediate transactions, often used for buying/selling commodities promptly. Maintained in tables like TCURR, they guide current valuation.

Swap rates: A differential added or subtracted to a spot rate to derive a forward rate, reflecting interest rate differences between two currencies. Stored in the AT15 table, these rates are defined by maintaining interest differentials for different time buckets.

Forwards FX rates: The agreed rate for a currency exchange on a future date, calculated as Spot Rate ± Swap Rate. To calculate Forward exchange rate and derive it in risk reporting we must execute tcode CMM_LOAD_GMDAFX.
Obviously, this doesn’t clarify anything, so we will start with examples.

Spot rates need to be maintained in tcode OB08. We will take the currency pair EUR/USD and the below rate type M (standard translation at average rate) for our calculation:

SohiniRay_0-1732537095704.png

Swap rates are maintained via tcode TMDFXFP:

SohiniRay_1-1732537095709.png

Now we will execute tcode CMM_LOAD_GMDAFX to check the Swap point interpolation and Forward FX rates calculation based on that. As we have mentioned previously, Forward Exchange rate = Spot rate ± Swap rate, it becomes imperative to understand the Swap rate interpolation first.

Below image shows us the result retrieved after execution of CMM_LOAD_GMDAFX, and after we see the numbers, we will explain the logic behind it:

SohiniRay_2-1732537095939.png

 

SohiniRay_3-1732537095934.png

Now the flow of the program flows as below:

  • Depending on the evaluation date and maturity key dates, it first checks the Spot rates which are available in the system. It picks up the latest spot rate using Function Module : READ_EXCHANGE_RATE, and for our calculation Spot rate = 1.07360.
    Based on whether it’s a direct or indirect notation, the spot rate might be maintained in negative and in that case an inversion function is performed by FM : FOREX_RATE_INVERT, which is not relevant for our current scenario.
  • Next we calculate the Swap rate interpolation, and before that it is necessary to check the Leading currency using FM : FTR_GET_LEADING_CURRENCY to determine the corresponding signage that would be used for the swap rate. We use FM : TB_EVALUATION_SWAPRATE_INTEROLATE to interpolate the swap rates. For our example we will take few lines and explain the calculation below:

For the 1st line :

  • Evaluation date = 20.11.2024
  • Maturity date = 20.11.2024
  • Leading currency = EUR
  • Following currency = USD

Given the Spot rate is always 2 days+ we have the Swap rate as 0.00 for the first line, which makes the Forward FX rate = Spot rate.
Going to the 2nd line where we evaluation date and maturity dates are different the calculation is as follows:

  • Evaluation date = 20.11.2024
  • Maturity date = 21.11.2024
  • Swap rate = 0.00188 for 30 days from 01.11.2024

The Swap rate interpolation formula from SAP would be :
swaprate = ( swap_lang - swap_kurz ) * ( save_lfz - save_lfz_kurz ) /( save_lfz_lang - save_lfz_kurz ) + swap_kurz.

save_lfz = Maturity date (21.11.2024) – Real Spot date (20.11.2024) = 1day

When we don’t have a swap rate maintained for the specific date (21.11.2024) then we consider:

Swap_kurz = 0.000 (As we don’t have direct swap rate maintained for 21.11.2024)

Swap_lang = 0.00188

Save_lfz_lang = 30 days

Safe_lfz_kurz = 0 (As we don’t have 1day maintained in the term days in AT15)

Replacing the values in the formula we get below:
Swap rate = ( 0.00188 – 0 ) * ( 1 – 0 )/ (30 – 0 ) + 0 = 0.00006

So Forward FX rate = 1.07360 (Spot rate) + 0.00006 (Interpolated Swap rate)

                                = 1.07366 (Same as our screenshot)

To get a hang of this calculation we will do another calculation where we have difference between spot date and maturity date more than 30days so that the swap duration of 61days is also taken into consideration. Very important point to remember, that the term for the Swap is not between evaluation date and maturity date, but the spot value date and maturity date.

  • Evaluation date = 20.11.2024
  • Maturity date = 21.12.2024
  • Swap rate = 0.00188 for 30 days and 0.00376 for 61days

The Swap rate interpolation formula from SAP would be :
swaprate = ( swap_lang - swap_kurz ) * ( save_lfz - save_lfz_kurz ) /( save_lfz_lang - save_lfz_kurz ) + swap_kurz.

save_lfz = Maturity date (21.12.2024) – Real Spot date (20.11.2024) = 31days

When we don’t have a swap rate maintained for the specific date (21.12.2024) then we consider:

Swap_kurz = 0.00188 (As the last swap rate before the new term days)

Swap_lang = 0.00376 (The latest swap rate based on the term days)

Save_lfz_lang = 61 days (Based on latest term days value)

Safe_lfz_kurz = 30 (As the last term days duration)

Replacing the values in the formula we get below:
Swap rate = ( 0.00376 – 0.00188 ) * ( 31 – 30 )/ (61 – 30 ) + 0.00188 = 0.00194

So Forward FX rate = 1.07360 (Spot rate) + 0.00194 (Interpolated Swap rate)

                                = 1.07554 (Same as our screenshot)

SohiniRay_4-1732537095941.png

We can keep on reconciling these results based on the calculations specified above for validating the formula for different cases.
Surely this is not an easy calculation and remembering it every time for reconciling risk reporting values can be frustrating, so hopefully this blog can be your one stop memory refresher rather than hours of debugging.

Happy Forex-ing!

3 Comments
sh4il3sh
Participant

this shall be helpful to many!

SohiniRay
Explorer
0 Kudos

Thank you @sh4il3sh ! 

0 Kudos

Great stuff, I remember sitting with you understanding this. 

Labels in this area