Re: long and possibly inifiniteobserver/observablenotifying loops

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: long and possibly inifiniteobserver/observablenotifying loops

DU VIGNAUD DE VILLEFORT FRANCOIS GASAPRD PHI

Hi all,

After further inquiries I have found out  what was going wrong in notification chains. Indeed, I discovered that the main culprit was the CapStripper. A drawing being worth more than thousand words (especially if your command of English is poor ;-) I have attached a picture showing dependencies between objects for the stripping of 3M volatilities. Let me point out that is only one part of the problem because this CapStripper is observed by another one which strips the 6M libor caps...
The fix proposal I tried to described last time is to make LazyObjects notifying their observers only once until they are recomputed. ( I hope it is clear enough this time).
This solves the problem quite efficiently (apart from the fact that all objects inheriting from TermStructure notify their observers twice systematically). Yet I can't refrain myself from suggesting further design improvements. What about removing all market data dependencies from instruments and indexes definitions ?  Not only it would simplify notifications chains, but it would also decouple Instrument/Indexes implementation from market data implementations.
Regards,
François



-------------------------------------------------------------------------
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-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

capstripper dependancies.png (26K) Download Attachment