|
From: Piter D. <pit...@pi...> - 2009-09-15 11:42:57
|
> what would you coerce it to? I would like to enhance the qlFixedRateBond Excel function in order to model some Brazilian bonds but I was just able in two ways that is not backward compatible: 1) Creating two new fields (Compounding and Frequency) but it would break current spreadsheets because the automatic code generation makes the fields Permanent and Trigger always as the last ones. So my new fields would be created between the IssueDate and Permanent fields, 2) Change the coupons vector from QuantLib:Rates to QuantLib::InterestRate. It breaks backward compatibility because, currently, it just accepts a handle created by qlInterestRate. When I send a Rate it crashes. A third way is create a new Excel function, the way I am doing the test, but the second way seems to be much better. Eric told that Coercion would help me on this (so I can use to convert QuantLib:Rates to QuantLib::InterestRate) but I am not sure if I got all the steps to make it. > it escapes me how you could make it backward compatible; I might > suggest to just add another signature if needed. I believe it won't work for Excel because it only accepts two functions with different names, doesn't matter if the signature is different. May you help me? Regards, ------------------------- Piter Dias pit...@pi... |