RE: Re: piecewise flat forward algorithm
Posted by
Adjriou Belak on
URL: http://quantlib.414.s1.nabble.com/piecewise-flat-forward-algorithm-tp3876p3878.html
Hi,
I agree with you but this option makes the downward curve impossible. You can test it by making a 2Y swap rate at 6% and and a 3Y swap rate at 4 % to test, you will have an exception. In this configuration, you will not have spot and forward (2-3) rates negatives but just less big than the others. And of course there is sometimes negative rates but if this option (QL_NEGATIVE_RATES) means no negative rates, it should let downward curve.
Regards,
On 06/28/2005 10:07:10 AM, Adjriou Belak wrote:
>
> In the algorithm fo find the zero coupon (with the brent solver 1D) ,
> there is a problem when the curve is downward !! There is an option
> QL_NEGATIVE_RATES that prevents the negative rates but it prevents
> also the downward curve. In the code :
>
> #if defined(QL_NEGATIVE_RATES)
> // discount are not required to be decreasing--all bets
> are off.
> // We choose as max a value very unlikely to be exceeded.
> DiscountFactor max = 3.0;
> #else
> DiscountFactor max = discounts_[i-1];
> #endif
> solver.solve(FFObjFunction(this,instrument,i),
> accuracy_,guess,min,max);
>
> The discount factor is set to the last one so the curve can't be
> downward. So a downaward curve doesn't mean negative rates !
I beg to
differ. A downward curve might mot mean negative spot rates,
but it does mean negative forward rates.
Later,
Luigi
----------------------------------------
Brady's First Law of Problem Solving:
When confronted by a difficult problem, you can solve it more
easily by reducing it to the question, "How would the
Lone Ranger have handled this?"
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Quantlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !