Re: Output zero rates can differ from the input rates by quite a bit

Posted by StephenWong on
URL: http://quantlib.414.s1.nabble.com/Output-zero-rates-can-differ-from-the-input-rates-by-quite-a-bit-tp6690p6696.html


Luigi Ballabio wrote
On Nov 4, 2011, at 10:43 PM, StephenWong wrote:
> Luigi Ballabio wrote:
>> On Fri, 2011-11-04 at 06:36 -0700, StephenWong wrote:
>>>> What do you mean "feeding zero rates into the PiecewiseYieldCurve"?
>>>> You don't feed zero rates in that, you feed deposit rates, swap  
>>>> rates,
>>>> futures... Do you mean some other class?
>>
>>> Yes Luigi you are right! I meant feeding those rates into the
>>> PiecewiseYieldCurve through a bunch of DepositRateHelpers.
>>
>> Then I rather expect you won't get the same rates if you ask the  
>> curve
>> for zero rates.  They have different conventions.
>>
>
> But I used the same day count convention in the DepositRateHelpers  
> and in
> the YieldTermStructure::zeroRate call.

Day count convention is not all.  Deposit rates are not compounded.  
If you don't specify a compounding convention, zero rates are  
continuously compounded.

Luigi
Thanks for the answers and your patience, Luigi! That explains why I have to choose Compounding:Simple in YieldTermStructure::zeroRate to even get those output rates that I listed. Anything else would give much worse rates.

What is the logic behind using no compounding? May be this should be added in the document/manual?