Login  Register

Re: Python Saving Interest Rate Curve Objects to File

Posted by alihassani on Sep 26, 2016; 11:11am
URL: http://quantlib.414.s1.nabble.com/Python-Saving-Interest-Rate-Curve-Objects-to-File-tp17751p17752.html

There is a member of the swig curves called .nodes ()

You can try saving those and recreating the curve with those nodes.

On September 26, 2016 6:48:36 AM EDT, TSchulz85 <[hidden email]> wrote:
Hi, 

I'm very new to QuantLib and Python. Currently I'm bootstrapping e.g. EONIA
curves for different dates in the past. These curves I'm saving in Dict. Now
I'm trying to save this Dict into a file, so I can access the historical
curves without doing the full bootstrapping process (and manually adjusting
some of the input datapoints).
I've tried to pickle it and also tried different other methods (HDF5).
e.g.:

import pickle

Eoniafile = open('eoniaDB.obj', 'w')
pickle.dump(EoniaDB, Eoniafile)

This returns the following error:
TypeError: can't pickle SwigPyObject objects

Is there any way to save QuantLib curve objects to a drive or database?

Thanks,
Tobias



--
View this message in context: http://quantlib.10058.n7.nabble.com/Python-Saving-Interest-Rate-Curve-Objects-to-File-tp17751.html
Sent from the quantlib-users mailing list archive at Nabble.com.





QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users