Login  Register

Re: Market Yield in Risky Bonds

Posted by Peter Caspers-4 on Mar 25, 2016; 5:58pm
URL: http://quantlib.414.s1.nabble.com/Market-Yield-in-Risky-Bonds-tp17361p17364.html

Hi Daniel,

apart form that in the Bond class (i.e. in instruments/bond.hpp) there is

        //! yield given a (clean) price and settlement date
        /*! The default bond settlement is used if no date is given. */
        Rate yield(Real cleanPrice,
                   const DayCounter& dc,
                   Compounding comp,
                   Frequency freq,
                   Date settlementDate = Date(),
                   Real accuracy = 1.0e-8,
                   Size maxEvaluations = 100) const;

which I think is corresponding to the qlxl function you quoted.

Regards
Peter


On 25 March 2016 at 19:31, Daniel Garcia <[hidden email]> wrote:

> Dear,
>
> I've just found this re-implementation of the market yield method:
>
>  Rate yield(Real cleanPrice,
>                    const DayCounter& dc,
>                    Compounding comp,
>                    Frequency freq,
>                    Date settlementDate = Date(),
>                    Real accuracy = 1.0e-8,
>                    Size maxEvaluations = 100) const;
>
>
> Thank you very much
>
> 2016-03-25 19:05 GMT+01:00 Daniel Garcia <[hidden email]>:
>>
>> Alternatively Iwould like to find something similar to this within
>> quantlib
>>
>> http://quantlib.org/quantlibxl/func_bonds.html#qlBondYieldFromCleanPrice
>>
>>
>> Many thanks
>>
>>
>> 2016-03-25 18:51 GMT+01:00 Daniel Garcia <[hidden email]>:
>>>
>>> Dear,
>>>
>>> I'm using the class for risky bonds:
>>>
>>> ...\QuantLib-1.7.1\ql\experimental\credit\riskybond.cpp
>>>
>>> But I don't know how could I get the Yield for one of these bonds.
>>>
>>> Many thanks in advance
>>
>>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users