Quantlib objects and memory

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Quantlib objects and memory

Samuel CORNUT
Hi everyone,

I am a new user of Quantlib and Quantlib excel add-in. I create objects in Excel, for example a swap, I write its id in a cell and I am able to compute several quantities (basis point sensitivity, fair rate, npv...) but it seems that my object is saved in the RAM and when I restart my computer the swap object is lost and I get an error when I try to compute the quantities above. This is quite annoying, especially when one wants to create a portfolio and monitor it from day to day.

Is there anyone who could help me on this matter ? I am new to quantlib so my question is probably dull...

Thanks a lot,

Samuel


Windows 7 : Trouvez le PC qui vous convient! Découvrez notre offre !
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Quantlib objects and memory

Ferdinando M. Ametrano-3
Hi Samuel

> I am a new user of Quantlib and Quantlib excel add-in. I create objects in
> Excel, for example a swap, I write its id in a cell and I am able to compute
> several quantities (basis point sensitivity, fair rate, npv...) but it seems
> that my object is saved in the RAM and when I restart my computer the swap
> object is lost and I get an error when I try to compute the quantities
> above. This is quite annoying, especially when one wants to create a
> portfolio and monitor it from day to day.
> Is there anyone who could help me on this matter ?

take a look at ohObjectSave to serialize object to a file, and
ohObjectLoad to deserialize them back in a later session.
You have to use named objects, not anonymous objects, and please note
that anything after # doesn't belong to the name

ciao -- Nando

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users