QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

Building OIS curve from SOFR (or Fed Funds) Futures

Open LZ1153 opened this issue 10 months ago • 8 comments

I found there was a thread in url below discussing this requirement back in 2020. I'm wondering if we can have a way to build OIS curve using SOFR or Fed Fund futures that stepping on meeting dates, eg: FOMC.

https://sourceforge.net/p/quantlib/mailman/message/36789736/

LZ1153 avatar Jan 16 '25 01:01 LZ1153

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

boring-cyborg[bot] avatar Jan 16 '25 01:01 boring-cyborg[bot]

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Mar 17 '25 02:03 github-actions[bot]

Thank you @lballabio for keeping this issue alive. By chance there is a workaround to build step curves from futures at the moment please?

LZ1153 avatar Apr 10 '25 01:04 LZ1153

Hi, I'm not sure what the request was — is it how to add jumps to the curve corresponding to meeting dates?

lballabio avatar Apr 10 '25 15:04 lballabio

Hi @lballabio . Thanks for your response. On top of jump, the request was to allow forward rate to be flat and changed (stepped) on meeting day. By referring to this screenshot taken from your blog, I understand flat can be stepped if we feeding Meeting OIS rates to DatedOISBuilder. I'm trying to achieve the same result by using "OvernightIndexFutureRateHelper" or "SofrFutureRateHelper" but it seems both helper doesn't support this "stepped" feature on specific date directly. Hope my explanation is clearer now.

https://www.implementingquantlib.com/2023/09/ametrano-bianchetti.html

Image

LZ1153 avatar Apr 11 '25 00:04 LZ1153

The constructor of OvernightIndexFutureRateHelper takes a value date and a maturity date explicitly. Setting it up so that the maturity date equals the meeting date should give you a node at that point, as you want.

lballabio avatar Apr 15 '25 13:04 lballabio

Thanks for your response, @lballabio . I think the OvernightIndex futures are either IMM dated or mature at end of month and doesn't coincide with meeting dates. Appreciate if you could share how I can achieve the desired result please.

LZ1153 avatar Apr 16 '25 15:04 LZ1153

I confess I'm not sure what you're after. The steps in the curve are not added externally in some way; they're the result of keeping forwards flat between the nodes of the curve, which in turn are determined by the maturities of the quoted instruments. This is why using DatedOISBuilder works; the custom maturities of the OIS determine the nodes. If you want a node at a meeting date which doesn't correspond to an instrument, there's no provision for that in the implementation.

lballabio avatar May 06 '25 10:05 lballabio

Thanks @lballabio . I think something similar in CME Fedwatch tool in this URL. By using SOFR futures, there is a way to predict what is the market expectation on FOMC decision. That's basically what I trying to achieve - using OvernightIndexFutureRateHelper yet solving for a flat forward rate between FOMC meetings date. Hopefully this gives a clearer picture. Cheers.

https://www.cmegroup.com/markets/interest-rates/cme-fedwatch-tool.html

LZ1153 avatar Jun 26 '25 08:06 LZ1153

You can use the two parameters at https://github.com/lballabio/QuantLib/blob/v1.38/ql/termstructures/yield/oisratehelper.hpp#L52-L53 to specify that a given OIS helper should set the node at a specific date (i.e., a meeting date if you want that).

lballabio avatar Jun 30 '25 09:06 lballabio

Brilliant! That's exactly what I am looking for based on your explanation! I will give it a try and close the issue if that works. Much appreciated @lballabio .

LZ1153 avatar Jul 01 '25 00:07 LZ1153

Hi @lballabio , I found Pillar Date is not supported for both SofrFutureRateHelper and OvernightIndexFutureRateHelper. Am I missing anything please? If it is indeed supported please will be much appreciated if you could show me simple implementation?

LZ1153 avatar Jul 01 '25 16:07 LZ1153

Hmm, you're right, it's not supported by those helpers. It should be implemented.

lballabio avatar Jul 01 '25 16:07 lballabio

Thanks @lballabio . Think we should have that added for SofrFutureRateHelper and OvernightIndexFutureRateHelper please could expert help please?

LZ1153 avatar Jul 01 '25 23:07 LZ1153

I opened #2256, let's see if someone picks this up. In the meantime, if what you're looking for are the expected rates before and after a meeting date, can't you calculate it from the corresponding futures prices without going through bootstrapping?

lballabio avatar Jul 02 '25 08:07 lballabio

Yes - I could at the mean time as workaround. Thanks @lballabio

LZ1153 avatar Jul 04 '25 00:07 LZ1153

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Sep 02 '25 02:09 github-actions[bot]

This issue was automatically closed because it has been stalled for two weeks with no further activity.

github-actions[bot] avatar Sep 17 '25 02:09 github-actions[bot]