|
From: Brian S. <bri...@gm...> - 2023-10-19 12:12:44
|
Hi Luigi,
Thanks for this reference.
However in line number 194 ans onwards, following codes are written
auto eoniaTermStructure =
ext::make_shared<PiecewiseYieldCurve<Discount, Cubic>>(
todaysDate, eoniaInstruments, termStructureDayCounter);
eoniaTermStructure->enableExtrapolation();
// This curve will be used for discounting cash flows
RelinkableHandle<YieldTermStructure> discountingTermStructure;
discountingTermStructure.linkTo(eoniaTermStructure);
However I wonder how can I implement above code in python?
In https://quantlib-python-docs.readthedocs.io/en/latest/termstructures/yield.html,
there is one instruction which reads as,
ql.PiecewiseYieldCurve(referenceDate, instruments, dayCounter, jumps,
jumpDate, i=Interpolator(), bootstrap=bootstrap_type())
However, with this I am getting below error
ql.PiecewiseYieldCurve(todaysDate, eoniaInstruments, termStructureDayCounter)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'QuantLib' has no attribute 'PiecewiseYieldCurve'
Any workaround will be very helpful.
Thanks for your time.
On Wed, 11 Oct 2023 at 19:21, Luigi Ballabio <lui...@gm...> wrote:
>
> To get started, a simpler version is also in the examples:
>
> https://github.com/lballabio/QuantLib/blob/master/Examples/MulticurveBootstrapping/MulticurveBootstrapping.cpp
>
> Luigi
>
>
> On Fri, Sep 29, 2023 at 6:57 PM Mike DelMedico <mik...@gm...> wrote:
>>
>> Hi there,
>>
>> I started here to get familiar with everything in the library:
>>
>> https://leanpub.com/quantlibpythoncookbook/
>>
>> Note that if you want to make the stairstepped front end of the curve you will have to do some tricks with zero coupon rate helpers, but it’s not crazy complicated once you get the ball rolling. There might be a more efficient way to do it but that would be best answered by someone else that knows the library better.
>>
>> Another helpful source for the front end would be this:
>>
>> https://www.cmegroup.com/market-data/files/cme-term-sofr-reference-rates-benchmark-methodology.pdf
>>
>> Hope that helps.
>>
>> -Mike
>>
>>
>>
>> On Fri, Sep 29, 2023 at 11:35 Brian Smith <bri...@gm...> wrote:
>>>
>>> Hi,
>>>
>>> Appreciate, if someone can provide some insight on below request.
>>>
>>> Thanks and regards,
>>>
>>> On Thu, 28 Sept 2023 at 01:51, Brian Smith <bri...@gm...> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am looking for some work-out examples on construction of SOFT curve
>>> > given various market instruments (mostly OIS) either with Python or
>>> > C++
>>> >
>>> > Could you please point some useful sources on construction of SOFR
>>> > curve using QL?
>>> >
>>> > Many thanks for your time.
>>>
>>>
>>> _______________________________________________
>>> QuantLib-users mailing list
>>> Qua...@li...
>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|