Re: negative discount rate

Posted by jojogh on
URL: http://quantlib.414.s1.nabble.com/negative-discount-rate-tp15318p15329.html

I may correct it first, it is about the negative zero rate not discount rate, mis-wrote it, sorry about that.

Peter, I have  read the code of zspread in ql cashflows, the implementation is very similar to my work before, in which, use the rootfind function to find the accurate one. Have you ever met the result of the zspread to make the zero rate in the earlier tenor plus zspread to be negative one?

regards

Alex


2014-05-29 8:30 GMT+08:00 Yuanhao Zhang <[hidden email]>:
thanks Peter i will try this function of cash flow. 

Regards

Alex

Peter Caspers <[hidden email]>于2014年5月29日星期四写道:
maybe it could be illuminating looking at the zSpread method in ql /
cashflows / cashflows.?pp, which does something similar to what you
seem to try to achieve ?
Peter

On 28 May 2014 09:47, cheng.li <[hidden email]> wrote:
> Hi Luigi,
>
> I think here what he refers as "negative discount rate" actually means negative zero rates.
>
> Am I right Alex?
>
> Regards,
> Cheng
>
> -----邮件原件-----
> 发件人: Luigi Ballabio [mailto:[hidden email]]
> 发送时间: 2014年5月28日 15:32
> 收件人: Yuanhao Zhang
> 抄送: cheng.li; QuantLib QuantLib
> 主题: Re: [Quantlib-users] 答复: 答复: negative discount rate
>
> Hello,
>     optimization is a possibility, but are you sure of what you're doing? Negative rates are one thing (and QuantLib does allow them) but negative discount factors don't make sense...
>
> Luigi
>
>
> On Wed, May 28, 2014 at 7:44 AM, Yuanhao Zhang <[hidden email]> wrote:
>> Many thanks Cheng, I would take a look at the optimization class and try it.
>>
>> regards
>>
>> Alex
>>
>>
>> 2014-05-28 11:45 GMT+08:00 cheng.li <[hidden email]>:
>>
>>> Hi Yuanhao
>>>
>>>
>>>
>>> Maybe it is a little bit complicated than root finding…
>>>
>>>
>>>
>>> However if you are familiar with it, it won’t be too hard to start.
>>>
>>>
>>>
>>> Anyway I can’t come up any other idea which is suitable for your
>>> requirement.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Cheng
>>>
>>>
>>>
>>> 发件人: Yuanhao Zhang [mailto:[hidden email]]
>>> 发送时间: 2014年5月28日 11:14
>>> 收件人: cheng.li
>>> 抄送: QuantLib QuantLib
>>> 主题: Re: 答复: [Quantlib-users] negative discount rate
>>>
>>>
>>>
>>> I want to make it easy to implement. I try to make the curve shift
>>> from the point after 3 month tenor to make it hard to get the
>>> negative discount rate.
>>>
>>> Use optimization maybe too complicated, and cost too much time on the
>>> optimization, if I have thousands of bond.
>>>
>>>
>>>
>>> regards
>>>
>>>
>>>
>>> Alex
>>>
>>>
>>>
>>> 2014-05-28 10:47 GMT+08:00 cheng.li <[hidden email]>:
>>>
>>> Hi Yuanhao,
>>>
>>>
>>>
>>> As you are actually finding a root within some interval (e.g. (0.0,
>>> inf)), you can’t expect to find a “root” for sure. What you can do is
>>> to minimize the error within this interval.
>>>
>>>
>>>
>>> In such case I suggest you to use optimizer instead of root finder.
>>> QuantLib has a built-in framework for optimizer with constraint. E.g.
>>> you can use BFGS optimizer with boundary constraint like (0.0, inf).
>>>
>>>
>>>
>>> Under such setting, when optimizer hit the boundary it will stay
>>> there or try to find a better solution instead of throwing an error.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Cheng
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 发件人: Yuanhao Zhang [mailto:[hidden email]]
>>> 发送时间: 2014年5月28日 10:19
>>> 收件人: QuantLib QuantLib
>>> 主题: [Quantlib-users] negative> ------------------------------------------------------------------------------

> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users