|
From: Daniel L. <dan...@gm...> - 2024-09-27 19:50:44
|
Hi Francois, Thanks for your input. However the link which you have provided says that "Piecewise yield term structure. This term structure is bootstrapped on a number of interest rate instruments which are passed as a vector of RateHelper instances. Their maturities mark the boundaries of the interpolated segments." I think my problem is different. I already have rates for zeros and basically I want to interpolate i.e want create a curve. The quotes are like below (like LIBOR - I know we have moved from directly using LIBOR, but lets ignore that for the time being) dates = [ql.Date(31,12,2019), ql.Date(31,12,2020), ql.Date(31,12,2021)] zeros = [0.01, 0.02, 0.03] In my case, instead of actual dates I only have information like O/N, 6 months etc. In this way, I have below question 1) how should I create the dates to be passed in above method 2) what would be the correct approach to pass the information on Compounding frequency? For tenor 1-week compounding frequency is typically weekly, for 6-months, for example, it is half-years etc. So for each tenor, the compounding frequency is different 3) is there any approach in QL to change from discrete frequency to continuously compounding frequency? On Sat, 28 Sept 2024 at 00:46, Francois Botha <ig...@gm...> wrote: > > Hi Daniel. > > You will have to construct a PiecewiseYieldCurve with the appropriate RateHelper instances as inputs. Refer to https://quantlib-python-docs.readthedocs.io/en/latest/termstructures.html#piecewise > > Regards > Francois Botha > > On Wed, 25 Sept 2024, 13:45 Daniel Lobo, <dan...@gm...> wrote: >> >> Hi, >> >> I was going through the instruction to build zero curve in >> >> https://quantlib-python-docs.readthedocs.io/en/latest/termstructures.html >> >> However as per the below, I need to pass dates as input >> >> dates = [ql.Date(31,12,2019), ql.Date(31,12,2020), ql.Date(31,12,2021)] >> zeros = [0.01, 0.02, 0.03] >> >> ql.ZeroCurve(dates, zeros, ql.ActualActual(), ql.TARGET()) >> >> However in my case, I have data as O/N, 1-week, 1-month etc. So my >> question is how should I create the dates to be passed in above >> method? >> >> Also, what would be the correct approach to pass the information on >> Compounding frequency? For tenor 1-week compounding frequency is >> typically weekly, for 6-months, for example, it is half-years etc. So >> for each tenor, the compounding frequency is different. >> >> So to pass information on the compounding frequency, should I need to >> convert all rates to common frequency like Continuous compounding? Is >> there any method in Quantlib to convert to Continuous frequency? >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |