On Thu, 2010-08-05 at 06:27 -0500, Kakhkhor Abdijalilov wrote:
> Can someone tell me if this code fragment is well defined and
> efficient in QuantLib for all instruments?
>
> std::cout << someInstrument.NVP() << '\t' << someInstrument.errorEstimate();
>
> I am 95% confident that it is well defined for all instruments
> (assuming that error estimate is applicable) and doesn't trigger
> double calculation (thanks to LazyObject).
I'm 95% confident too. No, make it 99%. It works as you want as long
as one doesn't implement an instrument and overrides its machinery. I
don't think there's any such instrument in the library.
Luigi
--
What is written without effort is, in general, read without pleasure.
-- Samuel Johnson
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users