Posted by
Peter Caspers-2 on
URL: http://quantlib.414.s1.nabble.com/qlxl-dependencies-and-object-updates-tp13212p13219.html
> would you elaborate a little more here.
For simplicity, first replace the references in the rate helpers to the
quotes by simple excel constants, i.e. change the formula in a2 to
=qlDepositRateHelper2("R1";0.02;"2m";2;"TARGET";"MF";;"ACT/360")
Now compute a6 (yield curve) and a9 (discount factor). I get
0.9983375805
Next, change cell a2 to
=qlDepositRateHelper2("R1";0.021;"2m";2;"TARGET";"MF";;"ACT/360")
and compute a9 (a6 is not computed before!). Now I get
0.9982546818
(All this also works when leaving the references to the quotes as they are
and instead of computing cell a2 compute c2)
There is no call of setValue() in this whole procedure. But obviously the
yield curve objects update() method must have been called through computing
a2, otherwise I would not get a different discount factor? But that would
mean that some observable / observer notification takes place and I would
like to understand how exactly.
Thx, Peter
-----Ursprüngliche Nachricht-----
Von:
[hidden email] [mailto:
[hidden email]] Im
Auftrag von Ferdinando Ametrano
Gesendet: Freitag, 25. März 2011 11:06
An: Peter Caspers
Cc: Eric Ehlers;
[hidden email]
Betreff: Re: Re: [Quantlib-dev] qlxl dependencies and object updates
Hi Peter
> In fact there may be a problem. I attach an example sheet. [...] During
this I
> observe that more and more memory is used by excel.exe. Escaping the
> loop, the number of objects is 5 (seems ok). If I delete the yield curve
> object (by computing cell b12) the memory allocated before is released.
>
> I am aware that one should not recompute the yield curve object if quotes
> are updated, but rather rely on the implemented observer pattern. However
> the behaviour above should not be as it is, should it?
yes, I think you've found a genuine memory leak. Eric ?
> However, if I recompute e.g. cell a2 (the first rate helper) and a9
> afterwards, I see the same effect, i.e. the yield curve object seems to
> have received a notification from the recomputed rate helper object?
would you elaborate a little more here. I mean there might be a lot
going on under the surface (and undocumented :-), but before
discovering my cards I would need to understand what exactly do you do
in this second case. Namely before recomputing a2 do you setValue ?
What do you mean by "the yield curve object seems to have received a
notification from the recomputed rate helper object"
later
ciao -- Nando
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today!
http://p.sf.net/sfu/intel-dev2devmar_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev