Login  Register

A few questions about PiecewiseFlatForward

Posted by Michele Ravani-2 on Sep 26, 2002; 4:15pm
URL: http://quantlib.414.s1.nabble.com/A-few-questions-about-PiecewiseFlatForward-tp2215.html

Hi

I was reading through the code of PiecewiseFlatForward and I have a few
questions:

* Wouldn't it be slightly more efficient to check the condition 'same
maturity date' in the rate helper? Any sorting algorithm should guarantee
that the condition expressed in the function used for the comparison of the
vector elements holds for all of them. The exception could be thrown by the
helper.

* The class takes a reference to a vector of RateHelper handles
owned by another part of the program.

One can change a rate value (obvious), but also one of the vector
items, i.e. substitute an element for another or add another one.
After receiving the notification of a change PiecewiseFlatForward would
bootstrap at the first chance, but at this point there is not guarantee
that the instruments vector is still sorted or doesn't contain instruments
with the same date. Am I missing something?

I know it is a bit extreme, but for instance in a YC server where a
user or another server can request (and change) a 'personal' YC such a
situation could arise.

Ciao

--
Michele Ravani                  [hidden email]
"Those who live hoping, die singing" My Gran