March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I've got a really curly one here. Hoping someone can help.
I'm attempting to recreate historical daily forward (financial) rate based on a moving date.
As an example,
On the 26th February 2018, we enter into an option to sell EUR10 million. The option has a term of 330 days. I would like to calculate what the weighted average forward points are on that day, knowing that we only have a table that provide forward points at certain intervals (table below. In this case 1, 7, 14, 30 and so on. For a term of 330 days it lies between 273 and 365 days so should take the weighted average of these 2 terms. This would be caculated as ((0.0368+.04982)/(273+365)) * 330 = 0.044803.
This rate would then be used as a comparison to using an option product to evaluate options vs forwards as a mechanism for hedging.
So key aspects are -
1. Date of contract - calculation needs to be over historical contracts so dynamic
2. Term of contract
3. Calculating fwds points between 2 values
4. Multiplying Weighted average fwd points by term to get total fwd points.
5. New column showing Total fwd points applied to individual contract based on term
Any help greatly appreciated.
26/02/2018 | D | EUR | NZD | 1 | 0.00012 |
26/02/2018 | D | EUR | NZD | 7 | 0.00092 |
26/02/2018 | D | EUR | NZD | 14 | 0.00183 |
26/02/2018 | D | EUR | NZD | 30 | 0.00379 |
26/02/2018 | D | EUR | NZD | 60 | 0.00835 |
26/02/2018 | D | EUR | NZD | 91 | 0.01234 |
26/02/2018 | D | EUR | NZD | 182 | 0.02447 |
26/02/2018 | D | EUR | NZD | 273 | 0.03680 |
26/02/2018 | D | EUR | NZD | 365 | 0.04982 |
26/02/2018 | D | EUR | NZD | 547 | 0.07550 |
26/02/2018 | D | EUR | NZD | 730 | 0.10238 |
26/02/2018 | D | EUR | NZD | 1095 | 0.15377 |
26/02/2018 | D | EUR | NZD | 1460 | 0.21016 |
26/02/2018 | D | EUR | NZD | 1825 | 0.26680 |
Solved! Go to Solution.
Hi,
You may refer to my solution in this file.
Hope this helps.
Hi,
So do you want the result in another column? While i understand your computation, i do not know the result you are expecting.
Hi - yes thanks as a row by row calculation against the individual contract
Hi,
So answer are you expecting for the first 5 rows of the sample that you have shared. Please share the method of calculation.
The method of calculation is to lookup this table that has the forward points, term days etc, perform the calculation and show these values in another table which holds the financial contracts details.
Note the table that holds the forward points data has a full history going back a number of year. The key connections between the 2 tables are date, and the 2 x currencies columns e.g. EUR and NZD
Hi,
Share that other Table as well then.
Payment Currency, Payment Currency 2 and Contract Date are keys columns here
Payment Currency | Payment amount in payment currency | Payment Currency | Payment amount in payment currency | Payment Date | Payment amount in payment currency | Direction | Option Cat | Exercise Type | Product Category | Text | Product Type | Transaction Category | Term Start | Contract Date |
JPY | 250000000 | NZD | 4115226.34 | 9/08/2011 | 0.00 | - | Standard | Europ. | 760 | Currency option (OTC) | 76A | 100 | 9/08/2011 | 16/04/2014 |
JPY | 250000000 | NZD | 4719652.63 | 9/08/2011 | 0.00 | + | Standard | Europ. | 760 | Currency option (OTC) | 76A | 200 | 9/08/2011 | 16/04/2014 |
JPY | 250000000 | NZD | 4108463.43 | 9/05/2011 | 0.00 | - | Standard | Europ. | 760 | Currency option (OTC) | 76A | 100 | 8/05/2011 | 15/05/2014 |
JPY | 250000000 | NZD | 4725897.92 | 9/05/2011 | 0.00 | + | Standard | Europ. | 760 | Currency option (OTC) | 76A | 200 | 8/05/2011 | 15/05/2014 |
Hi,
How does one calculate contract term. Is it Contract Date - Term Start?
No sorry - Expiration Date is another column out to side - i thought i had captured that in last post but must've missed it.
Expiration Date - Contract Date will get your Term
Hi,
Please share the complete/correct dataset. Ensure that the dates on both tables can be related. Which date column on the second table can be related to Date column on Table1? PLease draft a clear question with 2 tables and show the expected answer for the first 2-3 rows.
Apologies hopefully this will provide more clarity.
Below are 2 x tables. The first table holds the option financial data. The Contract Date on this table can be related to the Effective From column in the second table. The term days can be calculated from Expiration Date less Contract Date in first table.
Then, applying term days to second table to lookup a calculated weighted average points per day (average calculated by finding where term days sits between, then averaging out fwds with values above and below), which is then multiplied out by Term days again to give total forward points for the term for that contract.
This value is shown in a separate calculated column in the first table. For ease I have added a column in the first table called Fwd Points (Calculated Column) to demonstrate what the values should be for each contract on each day.
The first 2 x contracts are JPY/NZD and have a term of 187 days. The next 2 x contracts are EUR/NZD and have a term of 330 days.
Let me know if you need more information.
Transaction | Processing Indicator | Text | Business Partner | Name of Transaction Type | Name | Strike | Payment Currency | Payment amount in payment currency | Payment Currency | Payment amount in payment currency | Payment Date | Payment amount in payment currency | Direction | Option Cat | Exercise Type | Product Category | Text | Product Type | Transaction Category | Term Start | Contract Date | Expiration date | End of term | Fwd Points (Calculated Column) | External Reference | Assignment | Transaction Type | Internal Reference | Finance Project | Exercise Type | Portfolio | Active activity | Payment Currency | Text | Option category | Reference | Active Status | Activity Category | Name of activity category | Settlement |
1000606 | OTC FX opt | Purchase | JPY-Put | 79.000000000 | JPY | 1175000000 | NZD | 14873417.72 | 21/12/2017 | 94605.00 | - | Standard | Europ. | 760 | Currency option (OTC) | 76A | 100 | 21/12/2017 | 21/12/2017 | 26/06/2018 | 26/06/2018 | 0.0000009011 | 100 | 1 | JPY | 2 | NZD | 1 | 0 | 30 | Contract Settlement | Phys. | ||||||||
1000607 | OTC FX opt | Sale | JPY-Call | 76.000000000 | JPY | 1175000000 | NZD | 15460526.32 | 21/12/2017 | 0.00 | + | Standard | Europ. | 760 | Currency option (OTC) | 76A | 200 | 21/12/2017 | 21/12/2017 | 26/06/2018 | 26/06/2018 | 0.0000009011 | 200 | 1 | JPY | 2 | NZD | 1 | 0 | 30 | Contract Settlement | Phys. | ||||||||
1000635 | OTC FX opt | Purchase | EUR-Put | 0.580000000 | EUR | 6500000.00 | NZD | 11206896.55 | 28/02/2018 | 176210.00 | - | Standard | Europ. | 760 | Currency option (OTC) | 76A | 100 | 26/02/2018 | 26/02/2018 | 22/01/2019 | 22/01/2019 | 0.044803 | Collar Option 2018 | 100 | 1 | EUR | 2 | NZD | 1 | 0 | 30 | Contract Settlement | Phys. | |||||||
1000636 | OTC FX opt | Sale | EUR-Call | 0.550000000 | EUR | 6500000.00 | NZD | 11818181.82 | 28/02/2018 | 0.00 | + | Standard | Europ. | 760 | Currency option (OTC) | 76A | 200 | 26/02/2018 | 26/02/2018 | 22/01/2019 | 22/01/2019 | 0.044803 | Collar Option 2018 | 200 | 1 | EUR | 2 | NZD | 1 | 0 | 30 | Contract Settlement | Phys. |
Effective from | Exchange Rate Type | From currency | Currency into which system translates | Term in days | Forex swap rate |
21/12/2017 | D | EUR | NZD | 1 | 0.00022 |
21/12/2017 | D | EUR | NZD | 7 | 0.00315 |
21/12/2017 | D | EUR | NZD | 14 | 0.00410 |
21/12/2017 | D | EUR | NZD | 30 | 0.00637 |
21/12/2017 | D | EUR | NZD | 60 | 0.00986 |
21/12/2017 | D | EUR | NZD | 91 | 0.01326 |
21/12/2017 | D | EUR | NZD | 182 | 0.02501 |
21/12/2017 | D | EUR | NZD | 273 | 0.03705 |
21/12/2017 | D | EUR | NZD | 365 | 0.04942 |
21/12/2017 | D | EUR | NZD | 547 | 0.07626 |
21/12/2017 | D | EUR | NZD | 730 | 0.10334 |
21/12/2017 | D | EUR | NZD | 1095 | 0.15984 |
21/12/2017 | D | EUR | NZD | 1460 | 0.21663 |
21/12/2017 | D | EUR | NZD | 1825 | 0.28144 |
21/12/2017 | D | JPY | NZD | 1 | 0.00001 |
21/12/2017 | D | JPY | NZD | 7 | 0.00002 |
21/12/2017 | D | JPY | NZD | 14 | 0.00003 |
21/12/2017 | D | JPY | NZD | 30 | 0.00004 |
21/12/2017 | D | JPY | NZD | 60 | 0.00006 |
21/12/2017 | D | JPY | NZD | 91 | 0.00009 |
21/12/2017 | D | JPY | NZD | 182 | 0.00016 |
21/12/2017 | D | JPY | NZD | 273 | 0.00025 |
21/12/2017 | D | JPY | NZD | 365 | 0.00033 |
21/12/2017 | D | JPY | NZD | 547 | 0.00053 |
21/12/2017 | D | JPY | NZD | 730 | 0.00074 |
21/12/2017 | D | JPY | NZD | 1095 | 0.00121 |
21/12/2017 | D | JPY | NZD | 1460 | 0.00174 |
21/12/2017 | D | JPY | NZD | 1825 | 0.00235 |
26/02/2018 | D | EUR | NZD | 1 | 0.00012 |
26/02/2018 | D | EUR | NZD | 7 | 0.00092 |
26/02/2018 | D | EUR | NZD | 14 | 0.00183 |
26/02/2018 | D | EUR | NZD | 30 | 0.00379 |
26/02/2018 | D | EUR | NZD | 60 | 0.00835 |
26/02/2018 | D | EUR | NZD | 91 | 0.01234 |
26/02/2018 | D | EUR | NZD | 182 | 0.02447 |
26/02/2018 | D | EUR | NZD | 273 | 0.03680 |
26/02/2018 | D | EUR | NZD | 365 | 0.04982 |
26/02/2018 | D | EUR | NZD | 547 | 0.07550 |
26/02/2018 | D | EUR | NZD | 730 | 0.10238 |
26/02/2018 | D | EUR | NZD | 1095 | 0.15377 |
26/02/2018 | D | EUR | NZD | 1460 | 0.21016 |
26/02/2018 | D | EUR | NZD | 1825 | 0.26680 |
26/02/2018 | D | JPY | NZD | 1 | 0.00001 |
26/02/2018 | D | JPY | NZD | 7 | 0.00001 |
26/02/2018 | D | JPY | NZD | 14 | 0.00001 |
26/02/2018 | D | JPY | NZD | 30 | 0.00003 |
26/02/2018 | D | JPY | NZD | 60 | 0.00006 |
26/02/2018 | D | JPY | NZD | 91 | 0.00009 |
26/02/2018 | D | JPY | NZD | 182 | 0.00017 |
26/02/2018 | D | JPY | NZD | 273 | 0.00026 |
26/02/2018 | D | JPY | NZD | 365 | 0.00036 |
26/02/2018 | D | JPY | NZD | 547 | 0.00055 |
26/02/2018 | D | JPY | NZD | 730 | 0.00078 |
26/02/2018 | D | JPY | NZD | 1095 | 0.00126 |
26/02/2018 | D | JPY | NZD | 1460 | 0.00184 |
26/02/2018 | D | JPY | NZD | 1825 | 0.00246 |
Hi,
You may refer to my solution in this file.
Hope this helps.
Hi,
Slight change to formula now required.
We have some transactions that are executed/entered on the weekend however the corresponding rates are not available as they are loaded on a weekday basis - Monday to Friday.
Can the formula be modified to lookup the last available rates? e.g. If transaction entered 22/10/17 (Sunday) can it look up the rates from the previous Friday 20/10/17?
Thanks
Hi,
Share some data and show the expected result.
Hi,
Assume 21/12/07 last rates entered as per below for EUR to NZD. Fast forward to Saturday 23/12/07. Rates to be generated are based on the 21/12/07 for the relevant term.
As an example, if a EURNZD transaction generated on 23/12/07, and term is for 45 days the average will be 0.008115 (which is based on last available rates generated from 21/12/07).
Note your original formula looks up term of transaction and lower swap rate and upper swap rates, and lower and upper term, to generate a weighted average fwd points.
Effective from | Exchange Rate Type | From currency | Currency into which system translates | Term in days | Forex swap rate |
21/12/2017 | D | EUR | NZD | 1 | 0.00022 |
21/12/2017 | D | EUR | NZD | 7 | 0.00315 |
21/12/2017 | D | EUR | NZD | 14 | 0.00410 |
21/12/2017 | D | EUR | NZD | 30 | 0.00637 |
21/12/2017 | D | EUR | NZD | 60 | 0.00986 |
21/12/2017 | D | EUR | NZD | 91 | 0.01326 |
21/12/2017 | D | EUR | NZD | 182 | 0.02501 |
21/12/2017 | D | EUR | NZD | 273 | 0.03705 |
21/12/2017 | D | EUR | NZD | 365 | 0.04942 |
21/12/2017 | D | EUR | NZD | 547 | 0.07626 |
21/12/2017 | D | EUR | NZD | 730 | 0.10334 |
21/12/2017 | D | EUR | NZD | 1095 | 0.15984 |
21/12/2017 | D | EUR | NZD | 1460 | 0.21663 |
21/12/2017 | D | EUR | NZD | 1825 | 0.28144 |
Hi,
It's been a while since i answered your first question. Please show me the exact result you are expecting and how have you arrived at that result.
All the information is available from previous posts. This included a file that you prepared yourself for the final answer. If you follow the logic from the original posts to now it will make sense. I also included an example of an answer in my most recent post.
Thanks
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |