Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/how-to-get-discretely-compounded-zero-rates-tp1090p1091.html
On Thu, 2007-06-28 at 13:57 -0700, jing lu wrote:
> I would like to know how to request monthly compounded zero rates from
> a termstructure using the zeroRate member function. From example in
> test-suites I see one can request continuously compounded zero rates
> with termStructure_->zeroRate(testDate, rfdc,Continuous, NoFrequency);
> However if I use termStructure_->zeroRate(testDate, rfdc,Compounded,
> Monthly);
> the program crashes.
Jing,
in your program, can you wrap the call in a try/catch block, as in:
try {
termStructure_->zeroRate(testDate, rfdc,Compounded, Monthly);
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
}
so that the actual error message is printed out?
Luigi
--
Grabel's Law:
2 is not equal to 3 -- not even for large values of 2.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users