Structure functions in header file <ql/.../probabilitytraits.hpp>

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

Structure functions in header file <ql/.../probabilitytraits.hpp>

Amine Ifri
Hi there,

I was recently using the bootstrapping classes to build all sorts of hazard rates curves from quotes of credit spreads in the market for a prototype of mine and came across the following functions in <probabilitytraits.hpp>:

Real HazardRate::minValueAfter(Size i, const C*c, bool validData) {…} and Real HazardRate::maxValueAfter(Size i, const C*c, bool validData) {…}

I was wondering whether the argument Size i in these two functions is redundant, as I can’t see its use anywhere in the source code for these two functions.

Thanks,
Amine


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Structure functions in header file <ql/.../probabilitytraits.hpp>

Andres Hernandez-2
Hi Amine,

the traits classes will be used as template parameter and there it will be expected that the function has a particular signature.

Look at SurvivalProbability in the same file (probabilitytraits.hpp) for an example where Size i is used.

Cheers
Andres
On Fri, 21 Jul 2017 at 11:21, Amine Ifri <[hidden email]> wrote:
Hi there,

I was recently using the bootstrapping classes to build all sorts of hazard rates curves from quotes of credit spreads in the market for a prototype of mine and came across the following functions in <probabilitytraits.hpp>:

Real HazardRate::minValueAfter(Size i, const C*c, bool validData) {…} and Real HazardRate::maxValueAfter(Size i, const C*c, bool validData) {…}

I was wondering whether the argument Size i in these two functions is redundant, as I can’t see its use anywhere in the source code for these two functions.

Thanks,
Amine


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users