Re: YieldTermStructure, FittedBondDiscountCurve

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: YieldTermStructure, FittedBondDiscountCurve

Dr. Harald Hubbes

Dear Quantlib Users

I have implemented most  the Term Structure Fitting Methods like

-          boost::shared_ptr<YieldTermStructure> ts0(new PiecewiseYieldCurve<Discount, LogLinear>(curveSettlementDays,calendar,B,dc));

 

-          ExponentialSplinesFitting exponentialSplines(constrainAtZero);

boost::shared_ptr<FittedBondDiscountCurve> ts1(new FittedBondDiscountCurve(curveSettlementDays,calendar,A,dc,exponentialSplines,tolerance,max));

 

-          NelsonSiegelFitting nelsonSiegel;

boost::shared_ptr<FittedBondDiscountCurve> ts3(new FittedBondDiscountCurve(curveSettlementDays,calendar,A,dc,nelsonSiegel,tolerance,max));

 

with std::vector<boost::shared_ptr<BondHelper> >                     A and

std::vector<boost::shared_ptr<RateHelper> >                                B

 

Since I can calculate the discount rates for a given date , can I also price a bond at a YieldTermStructure or FittedBondDiscountCurve directly with a “BondHelper”?

Can I obtain a measure for the fit quality?

 

Kind Regards, Harald Hubbes

 


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: YieldTermStructure, FittedBondDiscountCurve

Andres Hernandez
Hi,
 
I'm pretty sure that there is no formal measure of fit implemented. What would be available right now is the final value of the optimization objective, which would at least allow to compare the goodness of fit through time. If you have a concrete idea of another indicator that could be used, I would be very happy to hear about it.
 
cheers,
Andres
 
 
----- Original message -----
From: "Dr. Harald Hubbes" <[hidden email]>
To: <[hidden email]>
Cc:
Subject: Re: [Quantlib-users] YieldTermStructure, FittedBondDiscountCurve
Date: Tue, Jun 7, 2016 12:29 AM
 

Dear Quantlib Users

I have implemented most  the Term Structure Fitting Methods like

-          boost::shared_ptr<YieldTermStructure> ts0(new PiecewiseYieldCurve<Discount, LogLinear>(curveSettlementDays,calendar,B,dc));

 

-          ExponentialSplinesFitting exponentialSplines(constrainAtZero);

boost::shared_ptr<FittedBondDiscountCurve> ts1(new FittedBondDiscountCurve(curveSettlementDays,calendar,A,dc,exponentialSplines,tolerance,max));

 

-          NelsonSiegelFitting nelsonSiegel;

boost::shared_ptr<FittedBondDiscountCurve> ts3(new FittedBondDiscountCurve(curveSettlementDays,calendar,A,dc,nelsonSiegel,tolerance,max));

 

with std::vector<boost::shared_ptr<BondHelper> >                     A and

std::vector<boost::shared_ptr<RateHelper> >                                B

 

Since I can calculate the discount rates for a given date , can I also price a bond at a YieldTermStructure or FittedBondDiscountCurve directly with a “BondHelper”?

Can I obtain a measure for the fit quality?

 

Kind Regards, Harald Hubbes

 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
 


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: YieldTermStructure, FittedBondDiscountCurve

Luigi Ballabio
Hello,
   if you have an instance of the FittedBondDiscountCurve class, calling the fitResults() method will give you a reference to the FittingMethod used. In turn, the latter has methods such as numberOfIterations() or minimumCostValue() that can give you some information on the fit.

As  for pricing a bond: given any YieldTermStructure, and thus also a FittedBondDiscountCurve, you can get its price and other information (accrual, yield etc) by creating an instance of FixedRateBond, FloatingRateBond, or any of the classes that inherit from Bond (see the <ql/instrument/bonds> directory), passing the curve to a DiscountingBondEngine instance, and setting the engine to the bond. You can see an example of this in Examples/Bonds/Bonds.cpp, from line 385 onwards. The example uses bootstrapped curves, but any YieldTermStructure will work.

Luigi


On Tue, Jun 7, 2016 at 7:44 PM Andres Hernandez <[hidden email]> wrote:
Hi,
 
I'm pretty sure that there is no formal measure of fit implemented. What would be available right now is the final value of the optimization objective, which would at least allow to compare the goodness of fit through time. If you have a concrete idea of another indicator that could be used, I would be very happy to hear about it.
 
cheers,
Andres
 
 
----- Original message -----
From: "Dr. Harald Hubbes" <[hidden email]>
To: <[hidden email]>
Cc:
Subject: Re: [Quantlib-users] YieldTermStructure, FittedBondDiscountCurve
Date: Tue, Jun 7, 2016 12:29 AM
 

Dear Quantlib Users

I have implemented most  the Term Structure Fitting Methods like

-          boost::shared_ptr<YieldTermStructure> ts0(new PiecewiseYieldCurve<Discount, LogLinear>(curveSettlementDays,calendar,B,dc));

 

-          ExponentialSplinesFitting exponentialSplines(constrainAtZero);

boost::shared_ptr<FittedBondDiscountCurve> ts1(new FittedBondDiscountCurve(curveSettlementDays,calendar,A,dc,exponentialSplines,tolerance,max));

 

-          NelsonSiegelFitting nelsonSiegel;

boost::shared_ptr<FittedBondDiscountCurve> ts3(new FittedBondDiscountCurve(curveSettlementDays,calendar,A,dc,nelsonSiegel,tolerance,max));

 

with std::vector<boost::shared_ptr<BondHelper> >                     A and

std::vector<boost::shared_ptr<RateHelper> >                                B

 

Since I can calculate the discount rates for a given date , can I also price a bond at a YieldTermStructure or FittedBondDiscountCurve directly with a “BondHelper”?

Can I obtain a measure for the fit quality?

 

Kind Regards, Harald Hubbes

 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users