|
From: Luigi B. <lui...@gm...> - 2007-08-03 14:34:49
|
Hi Allen, apologies for the delay. I hope I'm not discouraging you or others from participating to the project... On Sat, 2007-07-14 at 02:54 -0400, Allen Kuo wrote: > Hi: I built a CallableFixedRateBond and would eventually like to make > a contribution to QuantLib. Was wondering if we can we take > callability to be a *feature* of a FixedRateBond, rather than > developing a new class CallableFixedRateBond (construction of a > FixedRateBond without the engine would resort to the original > discounted cashflow NPV calculation). As a gut feeling, I'd keep it a separate class. > If the notion of a Quantlib::FixedRateBond can be expanded to > include embedded optionality, class names also become shorter (they > are getting long…..), e.g. TreeFixedRateBondEngine versus > TreeCallableFixedRateBondEngine. True, but I would also keep the vanilla bonds simple---new users have enough difficulties already... also, I'm thinking of the possibility of having callable zero-coupon or floating-rate bonds too. Keeping it separate might help abstracting out the code for callability, so that part of it might be reused between such bonds. Later, Luigi -- The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" but "That's funny..." -- Isaac Asimov |