|
From: Francois B. <ig...@gm...> - 2024-01-01 15:36:45
|
Hi Robert, I don't know much about ASX dates, but I can see in the code at https://github.com/lballabio/QuantLib/blob/7dfe04c3797552f8853f0368eb8f7c07ef7051cd/ql/time/asx.cpp#L38 that if the relevant date is not a Friday, it is not considered valid. 13 March 2024 is a Thursday and that's why you're seeing the message. Whether the business logic behind that function is sound... I don't know. regards Francois Botha On Mon, 1 Jan 2024 at 11:28, Robert Chapman <rob...@gm...> wrote: > Has anyone run into this problem? I'm trying to use New Zealand 90 Day > Bank Bill Futures to build a curve. > When I try to create the helper, I'm getting: March 13th, 2024 is not a > valid ASX date > > > > ############################################################### > > # ZBH4 Comdty > > # SFE NZ 90 Day Bank Bill Future Contract (Sydney > Futures Exchange) > > # RuntimeError: March 13th, 2024 is not a valid ASX > date > > helper = ql.FuturesRateHelper(94.46, > > ql.Date(13, 3, 2024), > > ql.Date(), > > ql.Actual365Fixed(), > > 0.0, > > ql.Futures.ASX) > > > > It works for an ASX futures contract: > > > > ############################################################### > > # IRH4 Comdty > > # ASX 90 Day Bank Accepted Bills Future Contract > > # *works fine !* > > helper = ql.FuturesRateHelper(95.720, > > ql.Date(8, 3, 2024), > > ql.Date(), > > ql.Actual365Fixed(), > > 0.0, > > ql.Futures.ASX) > > > > print(f'helper maturity date: {helper.maturityDate()}' > ) > > > ############################################################### > > Do I need to build a custom helper or something? > > > > Robert Chapman > +61 418 693 633 > rob...@gm... > au.linkedin.com/in/robertchapman2095 > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |