Open xwzhu opened 1 month ago
Hi, I also want to chime in that we see these issues a lot and are very interested in improvements to the FX handling. We have a fix for the TradingCalendar tag (just as you illustrated it) that we are looking to contribute shortly. This should help spot date and expiry date calculations for FX swap rate helpers.
Moreover, the FX spot logic needs similar adjustments, relying on the trading calendar property as well. We have yet to get there, but I'm interested in whether anyone from Acadia has any thoughts on that already.
Kind regards, Fredrik
HI @gbfredrik,
Having thinked about this issue again yesterday, I am now actually using three calendars in my local fork.
Taking EUR/USD (T+2) for example, the three calendars are configured as:
For GBP/EUR (T+2), they are:
The reason to separate out an additional calendar just for spot date, is that I think when advancing tenors the joint calendar is still the expected one, and it will make a difference when tenors are businessday based (1D, 5D, etc.).
Then the spot date (T+2 case) is calculated in the following way:
horizon date (T) ---> advance 2 days with spot date calendar
---> adjust with joint calendar of spot date calendar and trading calendar
And forward date is calculated as:
spot date ---> advance tenor with advance calendar
---> adjust with joint calendar of advance calendar and trading calendar
It seems that currently ORE is using a too simplified method to handle FX spot date, option expiry and delivery dates, which doesn't work for pairs involving USD, e.g. EUR/USD. Please refer to this wiki page for more infomation.
The Quantlib library has this partially implemented, see this PR, however such functionality is not being used. So for EUR-USD-FX convention, I think the correctly way would be to configure it like below, and pass the
<TradingCalendar>
field toFXSwapRateHelper
when building implied yield curves.Further more, the TN/ON quotes need to be marked optional. As during days around US holiday, one of them may not be available. The code also need to allow deriving ON rate directly when TN is not available.
For FX volatility quotes, the expiry date calculation follows a reverse spot date rule from delivery date, which is also treated incorrectly in the exisint code.