You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(60) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(18) |
Feb
(4) |
Mar
(6) |
Apr
(2) |
May
|
Jun
(12) |
Jul
(48) |
Aug
(6) |
Sep
(3) |
Oct
(24) |
Nov
(15) |
Dec
(18) |
| 2002 |
Jan
(39) |
Feb
(12) |
Mar
(80) |
Apr
(72) |
May
(46) |
Jun
(27) |
Jul
(23) |
Aug
(34) |
Sep
(65) |
Oct
(71) |
Nov
(19) |
Dec
(14) |
| 2003 |
Jan
(44) |
Feb
(59) |
Mar
(18) |
Apr
(62) |
May
(54) |
Jun
(27) |
Jul
(46) |
Aug
(15) |
Sep
(44) |
Oct
(36) |
Nov
(19) |
Dec
(12) |
| 2004 |
Jan
(26) |
Feb
(33) |
Mar
(47) |
Apr
(63) |
May
(36) |
Jun
(65) |
Jul
(80) |
Aug
(163) |
Sep
(65) |
Oct
(39) |
Nov
(36) |
Dec
(39) |
| 2005 |
Jan
(97) |
Feb
(78) |
Mar
(64) |
Apr
(64) |
May
(48) |
Jun
(55) |
Jul
(89) |
Aug
(57) |
Sep
(51) |
Oct
(111) |
Nov
(86) |
Dec
(76) |
| 2006 |
Jan
(84) |
Feb
(103) |
Mar
(143) |
Apr
(92) |
May
(55) |
Jun
(58) |
Jul
(71) |
Aug
(57) |
Sep
(74) |
Oct
(59) |
Nov
(8) |
Dec
(32) |
| 2007 |
Jan
(60) |
Feb
(40) |
Mar
(50) |
Apr
(26) |
May
(61) |
Jun
(120) |
Jul
(119) |
Aug
(48) |
Sep
(121) |
Oct
(66) |
Nov
(103) |
Dec
(43) |
| 2008 |
Jan
(60) |
Feb
(109) |
Mar
(92) |
Apr
(106) |
May
(82) |
Jun
(59) |
Jul
(67) |
Aug
(118) |
Sep
(131) |
Oct
(56) |
Nov
(37) |
Dec
(69) |
| 2009 |
Jan
(75) |
Feb
(76) |
Mar
(103) |
Apr
(78) |
May
(61) |
Jun
(35) |
Jul
(66) |
Aug
(69) |
Sep
(166) |
Oct
(46) |
Nov
(72) |
Dec
(65) |
| 2010 |
Jan
(48) |
Feb
(57) |
Mar
(93) |
Apr
(85) |
May
(123) |
Jun
(82) |
Jul
(98) |
Aug
(121) |
Sep
(146) |
Oct
(86) |
Nov
(72) |
Dec
(34) |
| 2011 |
Jan
(96) |
Feb
(55) |
Mar
(73) |
Apr
(57) |
May
(33) |
Jun
(74) |
Jul
(89) |
Aug
(71) |
Sep
(103) |
Oct
(76) |
Nov
(52) |
Dec
(61) |
| 2012 |
Jan
(48) |
Feb
(54) |
Mar
(78) |
Apr
(60) |
May
(75) |
Jun
(59) |
Jul
(33) |
Aug
(66) |
Sep
(43) |
Oct
(46) |
Nov
(75) |
Dec
(51) |
| 2013 |
Jan
(112) |
Feb
(72) |
Mar
(49) |
Apr
(48) |
May
(42) |
Jun
(44) |
Jul
(80) |
Aug
(19) |
Sep
(33) |
Oct
(37) |
Nov
(38) |
Dec
(98) |
| 2014 |
Jan
(113) |
Feb
(93) |
Mar
(49) |
Apr
(106) |
May
(97) |
Jun
(155) |
Jul
(87) |
Aug
(127) |
Sep
(85) |
Oct
(48) |
Nov
(41) |
Dec
(37) |
| 2015 |
Jan
(34) |
Feb
(50) |
Mar
(104) |
Apr
(80) |
May
(82) |
Jun
(66) |
Jul
(41) |
Aug
(84) |
Sep
(37) |
Oct
(65) |
Nov
(83) |
Dec
(52) |
| 2016 |
Jan
(68) |
Feb
(35) |
Mar
(42) |
Apr
(35) |
May
(54) |
Jun
(75) |
Jul
(45) |
Aug
(52) |
Sep
(60) |
Oct
(52) |
Nov
(36) |
Dec
(64) |
| 2017 |
Jan
(92) |
Feb
(59) |
Mar
(35) |
Apr
(53) |
May
(83) |
Jun
(43) |
Jul
(65) |
Aug
(68) |
Sep
(46) |
Oct
(75) |
Nov
(40) |
Dec
(49) |
| 2018 |
Jan
(68) |
Feb
(54) |
Mar
(48) |
Apr
(58) |
May
(51) |
Jun
(44) |
Jul
(40) |
Aug
(68) |
Sep
(35) |
Oct
(15) |
Nov
(7) |
Dec
(37) |
| 2019 |
Jan
(43) |
Feb
(7) |
Mar
(22) |
Apr
(21) |
May
(31) |
Jun
(39) |
Jul
(73) |
Aug
(45) |
Sep
(47) |
Oct
(89) |
Nov
(19) |
Dec
(69) |
| 2020 |
Jan
(52) |
Feb
(63) |
Mar
(45) |
Apr
(59) |
May
(42) |
Jun
(57) |
Jul
(30) |
Aug
(29) |
Sep
(75) |
Oct
(64) |
Nov
(96) |
Dec
(22) |
| 2021 |
Jan
(14) |
Feb
(24) |
Mar
(35) |
Apr
(58) |
May
(36) |
Jun
(15) |
Jul
(18) |
Aug
(31) |
Sep
(30) |
Oct
(33) |
Nov
(27) |
Dec
(16) |
| 2022 |
Jan
(35) |
Feb
(22) |
Mar
(14) |
Apr
(20) |
May
(44) |
Jun
(53) |
Jul
(25) |
Aug
(56) |
Sep
(11) |
Oct
(47) |
Nov
(22) |
Dec
(36) |
| 2023 |
Jan
(30) |
Feb
(17) |
Mar
(31) |
Apr
(48) |
May
(31) |
Jun
(7) |
Jul
(25) |
Aug
(26) |
Sep
(61) |
Oct
(66) |
Nov
(19) |
Dec
(21) |
| 2024 |
Jan
(37) |
Feb
(29) |
Mar
(26) |
Apr
(26) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(13) |
Sep
(15) |
Oct
(25) |
Nov
(13) |
Dec
(8) |
| 2025 |
Jan
(13) |
Feb
(1) |
Mar
(16) |
Apr
(17) |
May
(8) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(6) |
Oct
(15) |
Nov
(6) |
Dec
|
| 2026 |
Jan
(6) |
Feb
(4) |
Mar
(20) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Luigi B. <lui...@gm...> - 2020-11-17 10:24:00
|
Nope, objects exported through SWIG are not pickleable – if that's the word :) Luigi On Tue, Nov 17, 2020 at 11:20 AM <ben...@ma...> wrote: > From QuantlibXL you can serialize into XML. I have used this and it works > quite well, but that is probably not that useful if your client is not > Excel. From Python I don’t think that Quantlib supports serialization but > I am not 100% sure on that. I did take a quick look at Pickle in python, > but did not get to the testing stage. > > > > *From:* da...@el... <da...@el...> > *Sent:* Tuesday, 17 November 2020 12:34 AM > *To:* qua...@li... > *Subject:* [Quantlib-users] How best to store historical yield curves? > > > > Hi everyone, > > My apologies if this has been covered before, but here goes: > > I’d like to store curves, to build up a history. Eg, store a history of > Euribor 6m curves, and EONIA curves, constructed from historical data. I > could simply serialize every object that each curve requires (ratehandlers > etc) and rebuild as needed, but is there a more efficient way? A set of > dates and discount factors perhaps? I don’t necessarily want to > “re-bootstrap” every curve for each day. > > > > Thanks as always, > > David > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: <ben...@ma...> - 2020-11-17 10:18:10
|
>From QuantlibXL you can serialize into XML. I have used this and it works quite well, but that is probably not that useful if your client is not Excel. From Python I don’t think that Quantlib supports serialization but I am not 100% sure on that. I did take a quick look at Pickle in python, but did not get to the testing stage. From: da...@el... <da...@el...> Sent: Tuesday, 17 November 2020 12:34 AM To: qua...@li... Subject: [Quantlib-users] How best to store historical yield curves? Hi everyone, My apologies if this has been covered before, but here goes: I’d like to store curves, to build up a history. Eg, store a history of Euribor 6m curves, and EONIA curves, constructed from historical data. I could simply serialize every object that each curve requires (ratehandlers etc) and rebuild as needed, but is there a more efficient way? A set of dates and discount factors perhaps? I don’t necessarily want to “re-bootstrap” every curve for each day. Thanks as always, David |
|
From: Luigi B. <lui...@gm...> - 2020-11-17 08:09:29
|
>From the file names and paths, it seems you have the 64-bit version of QuantLib installed but spyder is using 32-bit python. May you check that? Luigi On Tue, Nov 17, 2020 at 3:52 AM Teddy O <tm...@ho...> wrote: > I installed quantlib using "pip install QuantLib" and now I'm getting the > below error. I'm using windows 10 and Spyder IDE. I don't see any dll file > called _QuantLib, only _QuantLib.cp37-win_amd64.pyd. > > > File "C:\Conda\lib\site-packages\QuantLib\QuantLib.py", line 13, in from . > import _QuantLib > > > ImportError: DLL load failed: The specified module could not be found. > > > These are my path variables: > > > C:\Conda\python38.zip > C:\Conda\DLLs > C:\Conda\lib > C:\Conda > > C:\Conda\lib\site-packages > C:\Conda\lib\site-packages\win32 > C:\Conda\lib\site-packages\win32\lib > C:\Conda\lib\site-packages\Pythonwin > C:\Conda\lib\site-packages\IPython\extensions > C:\Users\name t\.ipython > > Has anyone experienced a similar problem? > > Thanks > > > Sent from Outlook <http://aka.ms/weboutlook> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Teddy O <tm...@ho...> - 2020-11-17 02:50:19
|
I installed quantlib using "pip install QuantLib" and now I'm getting the below error. I'm using windows 10 and Spyder IDE. I don't see any dll file called _QuantLib, only _QuantLib.cp37-win_amd64.pyd. File "C:\Conda\lib\site-packages\QuantLib\QuantLib.py", line 13, in from . import _QuantLib ImportError: DLL load failed: The specified module could not be found. These are my path variables: C:\Conda\python38.zip C:\Conda\DLLs C:\Conda\lib C:\Conda C:\Conda\lib\site-packages C:\Conda\lib\site-packages\win32 C:\Conda\lib\site-packages\win32\lib C:\Conda\lib\site-packages\Pythonwin C:\Conda\lib\site-packages\IPython\extensions C:\Users\name t\.ipython Has anyone experienced a similar problem? Thanks Sent from Outlook<http://aka.ms/weboutlook> |
|
From: <da...@el...> - 2020-11-16 13:59:30
|
Thanks Luigi!
That seems to be exactly what I am after: to save the minimum data set that will let me efficiently re-create a curve in memory.
Best wishes,
David
From: Luigi Ballabio <lui...@gm...>
Sent: Monday, 16 November 2020 13:49
To: da...@el...
Cc: QuantLib users <qua...@li...>
Subject: Re: [Quantlib-users] How best to store historical yield curves?
Hi David,
calling the nodes() method on a bootstrapped curve will give you the set of dates and values resulting from the bootstrap. Depending on the type of your curve, they could be dates and discount factors, or dates and zero rates, or dates and forward rates. You can build a curve with the same data and interpolation by feeding them back to the corresponding interpolated class; e.g., nodes from PiecewiseYieldCurve<Discount, LogCubic> would go into building an InterpolatedDiscountCurve<LogCubic>, and nodes from PiecewiseYieldCurve<ForwardRate, BackwardFlat> would go into an InterpolatedForwardCurve<BackwardFlat>.
Luigi
On Mon, Nov 16, 2020 at 2:36 PM <da...@el... <mailto:da...@el...> > wrote:
Hi everyone,
My apologies if this has been covered before, but here goes:
I’d like to store curves, to build up a history. Eg, store a history of Euribor 6m curves, and EONIA curves, constructed from historical data. I could simply serialize every object that each curve requires (ratehandlers etc) and rebuild as needed, but is there a more efficient way? A set of dates and discount factors perhaps? I don’t necessarily want to “re-bootstrap” every curve for each day.
Thanks as always,
David
_______________________________________________
QuantLib-users mailing list
Qua...@li... <mailto:Qua...@li...>
https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: <da...@el...> - 2020-11-16 13:52:52
|
Thanks Amine, I had planned to run a one-time historical batch build that would run through one day at a time, collect that day’s data, bootstrap the curve and save it. Then maintain that history daily with new curves. David From: Amine Ifri <ami...@gm...> Sent: Monday, 16 November 2020 13:39 To: da...@el... Cc: qua...@li... Subject: Re: [Quantlib-users] How best to store historical yield curves? Hi David, If all you have is market instrument quotes then I would assume there is no way to avoid bootstrapping first, but if you already have discount factors for a set of dates, the DiscountCurve class has a constructor that takes dates and discount factors as inputs... Hope this helps, Amine Ifri On 16 Nov 2020, at 13:35, da...@el... <mailto:da...@el...> wrote: Hi everyone, My apologies if this has been covered before, but here goes: I’d like to store curves, to build up a history. Eg, store a history of Euribor 6m curves, and EONIA curves, constructed from historical data. I could simply serialize every object that each curve requires (ratehandlers etc) and rebuild as needed, but is there a more efficient way? A set of dates and discount factors perhaps? I don’t necessarily want to “re-bootstrap” every curve for each day. Thanks as always, David _______________________________________________ QuantLib-users mailing list Qua...@li... <mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Luigi B. <lui...@gm...> - 2020-11-16 13:49:43
|
Hi David,
calling the nodes() method on a bootstrapped curve will give you the
set of dates and values resulting from the bootstrap. Depending on the type
of your curve, they could be dates and discount factors, or dates and zero
rates, or dates and forward rates. You can build a curve with the same
data and interpolation by feeding them back to the corresponding
interpolated class; e.g., nodes from PiecewiseYieldCurve<Discount,
LogCubic> would go into building an InterpolatedDiscountCurve<LogCubic>,
and nodes from PiecewiseYieldCurve<ForwardRate, BackwardFlat> would go into
an InterpolatedForwardCurve<BackwardFlat>.
Luigi
On Mon, Nov 16, 2020 at 2:36 PM <da...@el...> wrote:
> Hi everyone,
>
> My apologies if this has been covered before, but here goes:
>
> I’d like to store curves, to build up a history. Eg, store a history of
> Euribor 6m curves, and EONIA curves, constructed from historical data. I
> could simply serialize every object that each curve requires (ratehandlers
> etc) and rebuild as needed, but is there a more efficient way? A set of
> dates and discount factors perhaps? I don’t necessarily want to
> “re-bootstrap” every curve for each day.
>
>
>
> Thanks as always,
>
> David
>
>
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Amine I. <ami...@gm...> - 2020-11-16 13:39:46
|
Hi David, If all you have is market instrument quotes then I would assume there is no way to avoid bootstrapping first, but if you already have discount factors for a set of dates, the DiscountCurve class has a constructor that takes dates and discount factors as inputs... Hope this helps, Amine Ifri > On 16 Nov 2020, at 13:35, da...@el... wrote: > > > Hi everyone, > > My apologies if this has been covered before, but here goes: > > I’d like to store curves, to build up a history. Eg, store a history of Euribor 6m curves, and EONIA curves, constructed from historical data. I could simply serialize every object that each curve requires (ratehandlers etc) and rebuild as needed, but is there a more efficient way? A set of dates and discount factors perhaps? I don’t necessarily want to “re-bootstrap” every curve for each day. > > Thanks as always, > > David > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: <da...@el...> - 2020-11-16 13:34:36
|
Hi everyone, My apologies if this has been covered before, but here goes: I'd like to store curves, to build up a history. Eg, store a history of Euribor 6m curves, and EONIA curves, constructed from historical data. I could simply serialize every object that each curve requires (ratehandlers etc) and rebuild as needed, but is there a more efficient way? A set of dates and discount factors perhaps? I don't necessarily want to "re-bootstrap" every curve for each day. Thanks as always, David |
|
From: Eric E. <eri...@re...> - 2020-11-16 12:57:31
|
I don't think it makes sense to load the XLL into Python. One motivation for exporting the QuantLibAddin interface to a non-Excel platform such as C or C++ is that you can then exactly replicate the behavior of a spreadsheet in some other environment. I have used exactly that for grid computing where the spreadsheet sent calculations off to the grid for processing. But if you just want to call QuantLib from Python and you don't care about matching a spreadsheet then it would make more sense to use QuantLib's normal SWIG binding to Python. You could export the QuantLibAddin interface to COM and I think we may have even done that at one point, I can't remember. Not sure how you would go about calling pure QuantLib from COM. Regards, Eric On 11/16/20 12:54 PM, da...@el... wrote: > > My question would be why would you want to use QuantLibXL in Python? > > As I understand it, the main point of the Excel interface is to create > a system which holds object state, as Excel (and some other > frameworks) don’t support this. Python is OO-ready, so doesn’t require > this ObjectHandler layer. All it would add is a lot of unnecessary > type conversion from Python -> C++ -> Excel datatypes. > > Since we are on the subject of generating interfaces, I was wondering > whether a COM interface would be possible: ie auto-generate the IDL > file from C++ class definitions to add the COM layer onto the existing > QL classes. > > Best wishes, > > David > > *From:*Eric Ehlers <eri...@re...> > *Sent:* Monday, 16 November 2020 10:34 > *To:* SX L <han...@ho...> > *Cc:* qua...@li... > *Subject:* Re: [Quantlib-users] How to expose QuantLibAddin to Python? > > > I managed to load QuantLibXLL into Python with win32com. > > That's an interesting exercise to attempt. An XLL is a DLL so I guess > there is nothing to prevent you from loading it as such into Python. > But the XLL's entry points are designed to be called from Excel so it > would be a hassle at best to use from Python. > > > However, what about Linux side? SWIG? Can gensrc generate C interfaces similar to > XL ones? > > The idea behind gensrc is that you could autogenerate source code for > the QuantLibAddin interface for any platform, Excel is just one > example. There is a build for C++ but it only supports a subset of > the functionality that QuantLibXL supports. So the C++ build is more > of a proof of concept. It works on Windows and Linux and is > documented here: > > https://www.quantlib.org/quantlibaddin/build_cpp.html > > Once upon a time, we implemented a gensrc module to export the > QuantLibAddin interface to C, and that facilitated deployment to > platforms such as Python that talk C. However that build has not been > maintained for a long time and it would not be a trivial task to > resurrect it. > > Regards, > Eric > > On 11/15/20 5:13 PM, SX L wrote: > > I managed to load QuantLibXLL into Python with win32com. However, > what about Linux side? SWIG? Can gensrc generate C interfaces > similar to XL ones? > > > > > _______________________________________________ > > QuantLib-users mailing list > > Qua...@li... <mailto:Qua...@li...> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: <da...@el...> - 2020-11-16 11:54:30
|
My question would be why would you want to use QuantLibXL in Python? As I understand it, the main point of the Excel interface is to create a system which holds object state, as Excel (and some other frameworks) don't support this. Python is OO-ready, so doesn't require this ObjectHandler layer. All it would add is a lot of unnecessary type conversion from Python -> C++ -> Excel datatypes. Since we are on the subject of generating interfaces, I was wondering whether a COM interface would be possible: ie auto-generate the IDL file from C++ class definitions to add the COM layer onto the existing QL classes. Best wishes, David From: Eric Ehlers <eri...@re...> Sent: Monday, 16 November 2020 10:34 To: SX L <han...@ho...> Cc: qua...@li... Subject: Re: [Quantlib-users] How to expose QuantLibAddin to Python? > I managed to load QuantLibXLL into Python with win32com. That's an interesting exercise to attempt. An XLL is a DLL so I guess there is nothing to prevent you from loading it as such into Python. But the XLL's entry points are designed to be called from Excel so it would be a hassle at best to use from Python. > However, what about Linux side? SWIG? Can gensrc generate C interfaces similar to XL ones? The idea behind gensrc is that you could autogenerate source code for the QuantLibAddin interface for any platform, Excel is just one example. There is a build for C++ but it only supports a subset of the functionality that QuantLibXL supports. So the C++ build is more of a proof of concept. It works on Windows and Linux and is documented here: https://www.quantlib.org/quantlibaddin/build_cpp.html Once upon a time, we implemented a gensrc module to export the QuantLibAddin interface to C, and that facilitated deployment to platforms such as Python that talk C. However that build has not been maintained for a long time and it would not be a trivial task to resurrect it. Regards, Eric On 11/15/20 5:13 PM, SX L wrote: I managed to load QuantLibXLL into Python with win32com. However, what about Linux side? SWIG? Can gensrc generate C interfaces similar to XL ones? _______________________________________________ QuantLib-users mailing list Qua...@li... <mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Eric E. <eri...@re...> - 2020-11-16 10:35:43
|
> I managed to load QuantLibXLL into Python with win32com. That's an interesting exercise to attempt. An XLL is a DLL so I guess there is nothing to prevent you from loading it as such into Python. But the XLL's entry points are designed to be called from Excel so it would be a hassle at best to use from Python. > However, what about Linux side? SWIG? Can gensrc generate C interfaces similar to XL ones? The idea behind gensrc is that you could autogenerate source code for the QuantLibAddin interface for any platform, Excel is just one example. There is a build for C++ but it only supports a subset of the functionality that QuantLibXL supports. So the C++ build is more of a proof of concept. It works on Windows and Linux and is documented here: https://www.quantlib.org/quantlibaddin/build_cpp.html Once upon a time, we implemented a gensrc module to export the QuantLibAddin interface to C, and that facilitated deployment to platforms such as Python that talk C. However that build has not been maintained for a long time and it would not be a trivial task to resurrect it. Regards, Eric On 11/15/20 5:13 PM, SX L wrote: > I managed to load QuantLibXLL into Python with win32com. However, what > about Linux side? SWIG? Can gensrc generate C interfaces similar to XL > ones? > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Peter C. <pca...@gm...> - 2020-11-15 17:38:25
|
That makes sense. But then, how does your proposed fix help in this
situation? To me, it looks like the ObservableSettings instance might
still get deleted before the observables?
On Sun, 15 Nov 2020 at 16:30, SX L <han...@ho...> wrote:
>
> My guess is that the shared_ptr of those non-static Observables are stored in another static variable such as OH::Repository. So it depends on which dtor between the two static variables will be called first.
>
> ________________________________
> From: Peter Caspers <pca...@gm...>
> Sent: Saturday, November 14, 2020 8:08 PM
> To: SX L <han...@ho...>
> Cc: Eric Ehlers <eri...@re...>; qua...@li... <qua...@li...>
> Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
>
> Hi Philip, I am just curious and maybe the question is naive, but if
> the ObservableSettings instance is stored as a
> shared_ptr<ObservableSettings> within a static map, how can that
> instance be destroyed before any non-static Observable instance?
> Thanks, Peter
>
> On Sat, 14 Nov 2020 at 09:27, SX L <han...@ho...> wrote:
> >
> > I don't have a github account yet, and I am an old fashion coder still using svn. However, the change is simple as below. If I were to go into multithread later, I would dump or re-design Singleton pattern, which is notorious for multithread.
> >
> > Index: ql/patterns/singleton.hpp
> > ===================================================================
> > --- ql/patterns/singleton.hpp (revision 130)
> > +++ ql/patterns/singleton.hpp (working copy)
> > @@ -160,7 +160,7 @@
> > T& Singleton<T>::instance() {
> >
> > #if (QL_MANAGED == 0) && !defined(QL_SINGLETON_THREAD_SAFE_INIT)
> > - static std::map<ThreadKey, ext::shared_ptr<T> > instances_;
> > + static T instances_;
> > #endif
> >
> > // thread safe double checked locking pattern with atomic memory calls
> > @@ -185,9 +185,7 @@
> > ThreadKey id = 0;
> > #endif
> >
> > - ext::shared_ptr<T>& instance = instances_[id];
> > - if (!instance)
> > - instance = ext::shared_ptr<T>(new T);
> > + T* instance = &instances_;
> >
> > #endif
> >
> > ________________________________
> > From: Eric Ehlers <eri...@re...>
> > Sent: Wednesday, November 11, 2020 4:35 AM
> > To: SX L <han...@ho...>
> > Cc: qua...@li... <qua...@li...>
> > Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
> >
> >
> > Hi Philip,
> >
> > Would you be willing to submit a pull request?
> >
> > Regards,
> > Eric
> >
> > On 11/10/20 5:21 AM, SX L wrote:
> >
> > Hi Eric,
> >
> > Thanks for looking into this issue. Yes, I identified the issue in my windows x64 debug version. The issue could be hard to reproduce since my release version gives me normal exit code. It really depends on the sequence of calling dtors of those shared pointers at exit.
> >
> > So I would suggest moving away from shared pointers in Singletons. Create a singltonDestroyer or use static instances.
> >
> > Get Outlook for Android
> >
> > ________________________________
> > From: Eric Ehlers <eri...@re...>
> > Sent: Monday, November 9, 2020, 11:42 PM
> > To: SX L
> > Cc: qua...@li...
> > Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
> >
> > Hi Philip,
> >
> > I tried unsuccessfully to recreate the error. You did not say which operating system you are using but you mention "debug version" which sounds like visual studio so I tested it on Windows - I'm using Visual Studio 2019 on 64-bit WIndows 10. I built it using "Debug (static runtime)" x64 and I ran ClientCppDemo and it behaves as I expected (no access violation). Anything else I can try to recreate the error?
> >
> > I have not examined the code but your remarks sound sensible to me. What resolution would you suggest?
> >
> > Regards,
> > Eric
> >
> > On 10/7/20 6:43 AM, SX L wrote:
> >
> > I was trying the Quantlib Addin. The QLADemo exits abnormally in the debug version with an access violation exception. It turned out to be the case that ObervableSettings is deleted earlier than some observer and observables at exit. So in the dtor of the observer, ObservableSettings is called to check if update is deferred, hence causing the exception. I feel it's unsafe to use shared pointers inside a singleton. Any suggestion? Thanks.
> >
> > Regards,
> >
> > Philip
> >
> >
> > Get Outlook for Android
> >
> >
> > _______________________________________________
> > QuantLib-users mailing list
> > Qua...@li...
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >
> >
> > _______________________________________________
> > QuantLib-users mailing list
> > Qua...@li...
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: SX L <han...@ho...> - 2020-11-15 16:14:06
|
I managed to load QuantLibXLL into Python with win32com. However, what about Linux side? SWIG? Can gensrc generate C interfaces similar to XL ones? |
|
From: SX L <han...@ho...> - 2020-11-15 15:31:05
|
My guess is that the shared_ptr of those non-static Observables are stored in another static variable such as OH::Repository. So it depends on which dtor between the two static variables will be called first.
________________________________
From: Peter Caspers <pca...@gm...>
Sent: Saturday, November 14, 2020 8:08 PM
To: SX L <han...@ho...>
Cc: Eric Ehlers <eri...@re...>; qua...@li... <qua...@li...>
Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
Hi Philip, I am just curious and maybe the question is naive, but if
the ObservableSettings instance is stored as a
shared_ptr<ObservableSettings> within a static map, how can that
instance be destroyed before any non-static Observable instance?
Thanks, Peter
On Sat, 14 Nov 2020 at 09:27, SX L <han...@ho...> wrote:
>
> I don't have a github account yet, and I am an old fashion coder still using svn. However, the change is simple as below. If I were to go into multithread later, I would dump or re-design Singleton pattern, which is notorious for multithread.
>
> Index: ql/patterns/singleton.hpp
> ===================================================================
> --- ql/patterns/singleton.hpp (revision 130)
> +++ ql/patterns/singleton.hpp (working copy)
> @@ -160,7 +160,7 @@
> T& Singleton<T>::instance() {
>
> #if (QL_MANAGED == 0) && !defined(QL_SINGLETON_THREAD_SAFE_INIT)
> - static std::map<ThreadKey, ext::shared_ptr<T> > instances_;
> + static T instances_;
> #endif
>
> // thread safe double checked locking pattern with atomic memory calls
> @@ -185,9 +185,7 @@
> ThreadKey id = 0;
> #endif
>
> - ext::shared_ptr<T>& instance = instances_[id];
> - if (!instance)
> - instance = ext::shared_ptr<T>(new T);
> + T* instance = &instances_;
>
> #endif
>
> ________________________________
> From: Eric Ehlers <eri...@re...>
> Sent: Wednesday, November 11, 2020 4:35 AM
> To: SX L <han...@ho...>
> Cc: qua...@li... <qua...@li...>
> Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
>
>
> Hi Philip,
>
> Would you be willing to submit a pull request?
>
> Regards,
> Eric
>
> On 11/10/20 5:21 AM, SX L wrote:
>
> Hi Eric,
>
> Thanks for looking into this issue. Yes, I identified the issue in my windows x64 debug version. The issue could be hard to reproduce since my release version gives me normal exit code. It really depends on the sequence of calling dtors of those shared pointers at exit.
>
> So I would suggest moving away from shared pointers in Singletons. Create a singltonDestroyer or use static instances.
>
> Get Outlook for Android
>
> ________________________________
> From: Eric Ehlers <eri...@re...>
> Sent: Monday, November 9, 2020, 11:42 PM
> To: SX L
> Cc: qua...@li...
> Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
>
> Hi Philip,
>
> I tried unsuccessfully to recreate the error. You did not say which operating system you are using but you mention "debug version" which sounds like visual studio so I tested it on Windows - I'm using Visual Studio 2019 on 64-bit WIndows 10. I built it using "Debug (static runtime)" x64 and I ran ClientCppDemo and it behaves as I expected (no access violation). Anything else I can try to recreate the error?
>
> I have not examined the code but your remarks sound sensible to me. What resolution would you suggest?
>
> Regards,
> Eric
>
> On 10/7/20 6:43 AM, SX L wrote:
>
> I was trying the Quantlib Addin. The QLADemo exits abnormally in the debug version with an access violation exception. It turned out to be the case that ObervableSettings is deleted earlier than some observer and observables at exit. So in the dtor of the observer, ObservableSettings is called to check if update is deferred, hence causing the exception. I feel it's unsafe to use shared pointers inside a singleton. Any suggestion? Thanks.
>
> Regards,
>
> Philip
>
>
> Get Outlook for Android
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Peter C. <pca...@gm...> - 2020-11-14 12:08:51
|
Hi Philip, I am just curious and maybe the question is naive, but if
the ObservableSettings instance is stored as a
shared_ptr<ObservableSettings> within a static map, how can that
instance be destroyed before any non-static Observable instance?
Thanks, Peter
On Sat, 14 Nov 2020 at 09:27, SX L <han...@ho...> wrote:
>
> I don't have a github account yet, and I am an old fashion coder still using svn. However, the change is simple as below. If I were to go into multithread later, I would dump or re-design Singleton pattern, which is notorious for multithread.
>
> Index: ql/patterns/singleton.hpp
> ===================================================================
> --- ql/patterns/singleton.hpp (revision 130)
> +++ ql/patterns/singleton.hpp (working copy)
> @@ -160,7 +160,7 @@
> T& Singleton<T>::instance() {
>
> #if (QL_MANAGED == 0) && !defined(QL_SINGLETON_THREAD_SAFE_INIT)
> - static std::map<ThreadKey, ext::shared_ptr<T> > instances_;
> + static T instances_;
> #endif
>
> // thread safe double checked locking pattern with atomic memory calls
> @@ -185,9 +185,7 @@
> ThreadKey id = 0;
> #endif
>
> - ext::shared_ptr<T>& instance = instances_[id];
> - if (!instance)
> - instance = ext::shared_ptr<T>(new T);
> + T* instance = &instances_;
>
> #endif
>
> ________________________________
> From: Eric Ehlers <eri...@re...>
> Sent: Wednesday, November 11, 2020 4:35 AM
> To: SX L <han...@ho...>
> Cc: qua...@li... <qua...@li...>
> Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
>
>
> Hi Philip,
>
> Would you be willing to submit a pull request?
>
> Regards,
> Eric
>
> On 11/10/20 5:21 AM, SX L wrote:
>
> Hi Eric,
>
> Thanks for looking into this issue. Yes, I identified the issue in my windows x64 debug version. The issue could be hard to reproduce since my release version gives me normal exit code. It really depends on the sequence of calling dtors of those shared pointers at exit.
>
> So I would suggest moving away from shared pointers in Singletons. Create a singltonDestroyer or use static instances.
>
> Get Outlook for Android
>
> ________________________________
> From: Eric Ehlers <eri...@re...>
> Sent: Monday, November 9, 2020, 11:42 PM
> To: SX L
> Cc: qua...@li...
> Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
>
> Hi Philip,
>
> I tried unsuccessfully to recreate the error. You did not say which operating system you are using but you mention "debug version" which sounds like visual studio so I tested it on Windows - I'm using Visual Studio 2019 on 64-bit WIndows 10. I built it using "Debug (static runtime)" x64 and I ran ClientCppDemo and it behaves as I expected (no access violation). Anything else I can try to recreate the error?
>
> I have not examined the code but your remarks sound sensible to me. What resolution would you suggest?
>
> Regards,
> Eric
>
> On 10/7/20 6:43 AM, SX L wrote:
>
> I was trying the Quantlib Addin. The QLADemo exits abnormally in the debug version with an access violation exception. It turned out to be the case that ObervableSettings is deleted earlier than some observer and observables at exit. So in the dtor of the observer, ObservableSettings is called to check if update is deferred, hence causing the exception. I feel it's unsafe to use shared pointers inside a singleton. Any suggestion? Thanks.
>
> Regards,
>
> Philip
>
>
> Get Outlook for Android
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Eric E. <eri...@re...> - 2020-11-14 10:46:12
|
OK, I will take a crack at it before the next release. I hope that I
can recreate the error somehow, otherwise it will be hard to test the fix.
Kind Regards,
Eric
On 11/14/20 9:25 AM, SX L wrote:
> I don't have a github account yet, and I am an old fashion coder still
> using svn. However, the change is simple as below. If I were to go
> into multithread later, I would dump or re-design Singleton pattern,
> which is notorious for multithread.
>
> Index: ql/patterns/singleton.hpp
> ===================================================================
> --- ql/patterns/singleton.hpp (revision 130)
> +++ ql/patterns/singleton.hpp (working copy)
> @@ -160,7 +160,7 @@
> T& Singleton<T>::instance() {
>
> #if (QL_MANAGED == 0) && !defined(QL_SINGLETON_THREAD_SAFE_INIT)
> - static std::map<ThreadKey, ext::shared_ptr<T> > instances_;
> + static T instances_;
> #endif
>
> // thread safe double checked locking pattern with atomic
> memory calls
> @@ -185,9 +185,7 @@
> ThreadKey id = 0;
> #endif
>
> - ext::shared_ptr<T>& instance = instances_[id];
> - if (!instance)
> - instance = ext::shared_ptr<T>(new T);
> + T* instance = &instances_;
>
> #endif
>
> ------------------------------------------------------------------------
> *From:* Eric Ehlers <eri...@re...>
> *Sent:* Wednesday, November 11, 2020 4:35 AM
> *To:* SX L <han...@ho...>
> *Cc:* qua...@li...
> <qua...@li...>
> *Subject:* Re: [Quantlib-users] ObservableSettings is deleted early
> than Observables.
>
> Hi Philip,
>
> Would you be willing to submit a pull request?
>
> Regards,
> Eric
>
> On 11/10/20 5:21 AM, SX L wrote:
>> Hi Eric,
>>
>> Thanks for looking into this issue. Yes, I identified the issue in my
>> windows x64 debug version. The issue could be hard to reproduce since
>> my release version gives me normal exit code. It really depends on
>> the sequence of calling dtors of those shared pointers at exit.
>>
>> So I would suggest moving away from shared pointers in Singletons.
>> Create a singltonDestroyer or use static instances.
>>
>> Get Outlook for Android <https://aka.ms/ghei36>
>>
>> ------------------------------------------------------------------------
>> *From:* Eric Ehlers <eri...@re...>
>> <mailto:eri...@re...>
>> *Sent:* Monday, November 9, 2020, 11:42 PM
>> *To:* SX L
>> *Cc:* qua...@li...
>> <mailto:qua...@li...>
>> *Subject:* Re: [Quantlib-users] ObservableSettings is deleted early
>> than Observables.
>>
>> Hi Philip,
>>
>> I tried unsuccessfully to recreate the error. You did not say which
>> operating system you are using but you mention "debug version" which
>> sounds like visual studio so I tested it on Windows - I'm using
>> Visual Studio 2019 on 64-bit WIndows 10. I built it using "Debug
>> (static runtime)" x64 and I ran ClientCppDemo and it behaves as I
>> expected (no access violation). Anything else I can try to recreate
>> the error?
>>
>> I have not examined the code but your remarks sound sensible to me.
>> What resolution would you suggest?
>>
>> Regards,
>> Eric
>>
>> On 10/7/20 6:43 AM, SX L wrote:
>>> I was trying the Quantlib Addin. The QLADemo exits abnormally in the
>>> debug version with an access violation exception. It turned out to
>>> be the case that ObervableSettings is deleted earlier than some
>>> observer and observables at exit. So in the dtor of the observer,
>>> ObservableSettings is called to check if update is deferred, hence
>>> causing the exception. I feel it's unsafe to use shared pointers
>>> inside a singleton. Any suggestion? Thanks.
>>>
>>> Regards,
>>>
>>> Philip
>>>
>>>
>>> Get Outlook for Android <https://aka.ms/ghei36>
>>>
>>>
>>> _______________________________________________
>>> QuantLib-users mailing list
>>> Qua...@li... <mailto:Qua...@li...>
>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
|
|
From: SX L <han...@ho...> - 2020-11-14 08:26:15
|
I don't have a github account yet, and I am an old fashion coder still using svn. However, the change is simple as below. If I were to go into multithread later, I would dump or re-design Singleton pattern, which is notorious for multithread.
Index: ql/patterns/singleton.hpp
===================================================================
--- ql/patterns/singleton.hpp (revision 130)
+++ ql/patterns/singleton.hpp (working copy)
@@ -160,7 +160,7 @@
T& Singleton<T>::instance() {
#if (QL_MANAGED == 0) && !defined(QL_SINGLETON_THREAD_SAFE_INIT)
- static std::map<ThreadKey, ext::shared_ptr<T> > instances_;
+ static T instances_;
#endif
// thread safe double checked locking pattern with atomic memory calls
@@ -185,9 +185,7 @@
ThreadKey id = 0;
#endif
- ext::shared_ptr<T>& instance = instances_[id];
- if (!instance)
- instance = ext::shared_ptr<T>(new T);
+ T* instance = &instances_;
#endif
________________________________
From: Eric Ehlers <eri...@re...>
Sent: Wednesday, November 11, 2020 4:35 AM
To: SX L <han...@ho...>
Cc: qua...@li... <qua...@li...>
Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
Hi Philip,
Would you be willing to submit a pull request?
Regards,
Eric
On 11/10/20 5:21 AM, SX L wrote:
Hi Eric,
Thanks for looking into this issue. Yes, I identified the issue in my windows x64 debug version. The issue could be hard to reproduce since my release version gives me normal exit code. It really depends on the sequence of calling dtors of those shared pointers at exit.
So I would suggest moving away from shared pointers in Singletons. Create a singltonDestroyer or use static instances.
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: Eric Ehlers <eri...@re...><mailto:eri...@re...>
Sent: Monday, November 9, 2020, 11:42 PM
To: SX L
Cc: qua...@li...<mailto:qua...@li...>
Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables.
Hi Philip,
I tried unsuccessfully to recreate the error. You did not say which operating system you are using but you mention "debug version" which sounds like visual studio so I tested it on Windows - I'm using Visual Studio 2019 on 64-bit WIndows 10. I built it using "Debug (static runtime)" x64 and I ran ClientCppDemo and it behaves as I expected (no access violation). Anything else I can try to recreate the error?
I have not examined the code but your remarks sound sensible to me. What resolution would you suggest?
Regards,
Eric
On 10/7/20 6:43 AM, SX L wrote:
I was trying the Quantlib Addin. The QLADemo exits abnormally in the debug version with an access violation exception. It turned out to be the case that ObervableSettings is deleted earlier than some observer and observables at exit. So in the dtor of the observer, ObservableSettings is called to check if update is deferred, hence causing the exception. I feel it's unsafe to use shared pointers inside a singleton. Any suggestion? Thanks.
Regards,
Philip
Get Outlook for Android<https://aka.ms/ghei36>
_______________________________________________
QuantLib-users mailing list
Qua...@li...<mailto:Qua...@li...>
https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Luigi B. <lui...@gm...> - 2020-11-12 08:37:02
|
Hello Jian,
you can open a new issue at
https://github.com/lballabio/QuantLib-SWIG/issues asking for the class to
be exported. It's likely that someone will pick it up for next release.
Luigi
On Thu, Nov 12, 2020 at 2:44 AM jian Xu <jia...@gm...> wrote:
> Thank you so much for the detailed explanation, Jack. I don't have
> the development environment set up. So let me think about which way
> to go. But generally, I do think this is a useful class to have in
> Python.
>
> On Wed, Nov 11, 2020 at 6:27 PM Jack G <jac...@gm...> wrote:
> >
> > Hi Jian,
> >
> > QuantLib relies on another project, which auto-generates interface code,
> to export functionality to python and other languages -
> https://github.com/lballabio/QuantLib-SWIG. The reason you can't see
> fixed/floating risky bond in the python wrap is because an interface for it
> hasn't been included in this file:
> https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/bonds.i
> >
> > If you want to have a go at adding it yourself (it's an instructive
> process), you will need to:
> > - fork the QuantLib-SWIG repo, and locally add the code to the file I
> mentioned above, following the other examples in the file
> > - test your changes, which requires a few sub-steps (the first time,
> this process will take several hours to set up and run):
> > a) build QuantLib v1.20 locally from source as described here:
> https://www.quantlib.org/install.shtml (if you're using Windows you can
> try Visual Studio, but personally I find it easiest to do it using Windows
> Docker Desktop inside a Docker container in a linux environment)
> > b) build QuantLib-SWIG v1.20 with your modifications
> > c) test the code changes locally using Python
> > - when the wrapper is working, make a pull request with your changes
> into the QuantLib-SWIG repo, and Luigi will merge your changes after the
> automated tests pass
> > - optionally, you might consider adding documentation for the new python
> classes to the repo that generates the online documentation shown here:
> https://quantlib-python-docs.readthedocs.io/en/latest/
> >
> > If this sounds too ambitious for you, let me know and I can make the
> changes to expose the class for you, as it looks like a useful class to
> have available.
> >
> > Best,
> > Jack
> >
> > On Thu, Nov 12, 2020 at 5:31 AM jian Xu <jia...@gm...> wrote:
> >>
> >> Hi,
> >>
> >> There is a RiskyBond class under experimental/credit in the C++ repo.
> >> However, when I'm using the Python interface, it seems that it's not
> >> there. My question is, how to get the RiskyBond in Python? Or is
> >> there a reason that it's not exposed?
> >>
> >> More generally, I am trying to calibrate a survival probability curve
> >> of a fixed rate bond. And I think RiskyBond is the correct one to
> >> use. If it's not in Python, what's the proper object for this task?
> >> Thanks.
> >>
> >> Jian
> >>
> >>
> >> _______________________________________________
> >> QuantLib-users mailing list
> >> Qua...@li...
> >> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: jian Xu <jia...@gm...> - 2020-11-12 01:41:35
|
Thank you so much for the detailed explanation, Jack. I don't have the development environment set up. So let me think about which way to go. But generally, I do think this is a useful class to have in Python. On Wed, Nov 11, 2020 at 6:27 PM Jack G <jac...@gm...> wrote: > > Hi Jian, > > QuantLib relies on another project, which auto-generates interface code, to export functionality to python and other languages - https://github.com/lballabio/QuantLib-SWIG. The reason you can't see fixed/floating risky bond in the python wrap is because an interface for it hasn't been included in this file: https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/bonds.i > > If you want to have a go at adding it yourself (it's an instructive process), you will need to: > - fork the QuantLib-SWIG repo, and locally add the code to the file I mentioned above, following the other examples in the file > - test your changes, which requires a few sub-steps (the first time, this process will take several hours to set up and run): > a) build QuantLib v1.20 locally from source as described here: https://www.quantlib.org/install.shtml (if you're using Windows you can try Visual Studio, but personally I find it easiest to do it using Windows Docker Desktop inside a Docker container in a linux environment) > b) build QuantLib-SWIG v1.20 with your modifications > c) test the code changes locally using Python > - when the wrapper is working, make a pull request with your changes into the QuantLib-SWIG repo, and Luigi will merge your changes after the automated tests pass > - optionally, you might consider adding documentation for the new python classes to the repo that generates the online documentation shown here: https://quantlib-python-docs.readthedocs.io/en/latest/ > > If this sounds too ambitious for you, let me know and I can make the changes to expose the class for you, as it looks like a useful class to have available. > > Best, > Jack > > On Thu, Nov 12, 2020 at 5:31 AM jian Xu <jia...@gm...> wrote: >> >> Hi, >> >> There is a RiskyBond class under experimental/credit in the C++ repo. >> However, when I'm using the Python interface, it seems that it's not >> there. My question is, how to get the RiskyBond in Python? Or is >> there a reason that it's not exposed? >> >> More generally, I am trying to calibrate a survival probability curve >> of a fixed rate bond. And I think RiskyBond is the correct one to >> use. If it's not in Python, what's the proper object for this task? >> Thanks. >> >> Jian >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Jack G <jac...@gm...> - 2020-11-12 00:28:10
|
Hi Jian, QuantLib relies on another project, which auto-generates interface code, to export functionality to python and other languages - https://github.com/lballabio/QuantLib-SWIG. The reason you can't see fixed/floating risky bond in the python wrap is because an interface for it hasn't been included in this file: https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/bonds.i If you want to have a go at adding it yourself (it's an instructive process), you will need to: - fork the QuantLib-SWIG repo, and locally add the code to the file I mentioned above, following the other examples in the file - test your changes, which requires a few sub-steps (the first time, this process will take several hours to set up and run): a) build QuantLib v1.20 locally from source as described here: https://www.quantlib.org/install.shtml (if you're using Windows you can try Visual Studio, but personally I find it easiest to do it using Windows Docker Desktop inside a Docker container in a linux environment) b) build QuantLib-SWIG v1.20 with your modifications c) test the code changes locally using Python - when the wrapper is working, make a pull request with your changes into the QuantLib-SWIG repo, and Luigi will merge your changes after the automated tests pass - optionally, you might consider adding documentation for the new python classes to the repo that generates the online documentation shown here: https://quantlib-python-docs.readthedocs.io/en/latest/ If this sounds too ambitious for you, let me know and I can make the changes to expose the class for you, as it looks like a useful class to have available. Best, Jack On Thu, Nov 12, 2020 at 5:31 AM jian Xu <jia...@gm...> wrote: > Hi, > > There is a RiskyBond class under experimental/credit in the C++ repo. > However, when I'm using the Python interface, it seems that it's not > there. My question is, how to get the RiskyBond in Python? Or is > there a reason that it's not exposed? > > More generally, I am trying to calibrate a survival probability curve > of a fixed rate bond. And I think RiskyBond is the correct one to > use. If it's not in Python, what's the proper object for this task? > Thanks. > > Jian > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: jian Xu <jia...@gm...> - 2020-11-11 21:30:30
|
Hi, There is a RiskyBond class under experimental/credit in the C++ repo. However, when I'm using the Python interface, it seems that it's not there. My question is, how to get the RiskyBond in Python? Or is there a reason that it's not exposed? More generally, I am trying to calibrate a survival probability curve of a fixed rate bond. And I think RiskyBond is the correct one to use. If it's not in Python, what's the proper object for this task? Thanks. Jian |
|
From: Eric E. <eri...@re...> - 2020-11-10 20:35:28
|
Hi Philip, Would you be willing to submit a pull request? Regards, Eric On 11/10/20 5:21 AM, SX L wrote: > Hi Eric, > > Thanks for looking into this issue. Yes, I identified the issue in my > windows x64 debug version. The issue could be hard to reproduce since > my release version gives me normal exit code. It really depends on the > sequence of calling dtors of those shared pointers at exit. > > So I would suggest moving away from shared pointers in Singletons. > Create a singltonDestroyer or use static instances. > > Get Outlook for Android <https://aka.ms/ghei36> > > ------------------------------------------------------------------------ > *From:* Eric Ehlers <eri...@re...> > *Sent:* Monday, November 9, 2020, 11:42 PM > *To:* SX L > *Cc:* qua...@li... > *Subject:* Re: [Quantlib-users] ObservableSettings is deleted early > than Observables. > > Hi Philip, > > I tried unsuccessfully to recreate the error. You did not say which > operating system you are using but you mention "debug version" which > sounds like visual studio so I tested it on Windows - I'm using Visual > Studio 2019 on 64-bit WIndows 10. I built it using "Debug (static > runtime)" x64 and I ran ClientCppDemo and it behaves as I expected (no > access violation). Anything else I can try to recreate the error? > > I have not examined the code but your remarks sound sensible to me. > What resolution would you suggest? > > Regards, > Eric > > On 10/7/20 6:43 AM, SX L wrote: >> I was trying the Quantlib Addin. The QLADemo exits abnormally in the >> debug version with an access violation exception. It turned out to be >> the case that ObervableSettings is deleted earlier than some observer >> and observables at exit. So in the dtor of the observer, >> ObservableSettings is called to check if update is deferred, hence >> causing the exception. I feel it's unsafe to use shared pointers >> inside a singleton. Any suggestion? Thanks. >> >> Regards, >> >> Philip >> >> >> Get Outlook for Android <https://aka.ms/ghei36> >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Eric E. <eri...@re...> - 2020-11-10 20:26:25
|
QuantLibXL / ObjectHandler 1.20 Released QuantLibXL, QuantLibAddin, ObjectHandler, and gensrc version 1.20 have been released and are available for download: https://bintray.com/quantlib/releases/QuantLibXL/1.20#files QuantLibAddin http://www.quantlibaddin.org QuantLibAddin exports the QuantLib interface to a variety of end user platforms. QuantLibXL http://www.quantlibxl.org QuantLibXL is the implementation of QuantLibAddin for Microsoft Excel. The QuantLibXL project includes a binary release comprising a compiled Addin and example workbooks. ObjectHandler http://www.objecthandler.org ObjectHandler implements a repository where objects can be stored, shared, updated, interrogated, and destroyed. This facilitates object orientation in procedural environments such as spreadsheets. |
|
From: SX L <han...@ho...> - 2020-11-10 04:22:49
|
Hi Eric, Thanks for looking into this issue. Yes, I identified the issue in my windows x64 debug version. The issue could be hard to reproduce since my release version gives me normal exit code. It really depends on the sequence of calling dtors of those shared pointers at exit. So I would suggest moving away from shared pointers in Singletons. Create a singltonDestroyer or use static instances. Get Outlook for Android<https://aka.ms/ghei36> ________________________________ From: Eric Ehlers <eri...@re...> Sent: Monday, November 9, 2020, 11:42 PM To: SX L Cc: qua...@li... Subject: Re: [Quantlib-users] ObservableSettings is deleted early than Observables. Hi Philip, I tried unsuccessfully to recreate the error. You did not say which operating system you are using but you mention "debug version" which sounds like visual studio so I tested it on Windows - I'm using Visual Studio 2019 on 64-bit WIndows 10. I built it using "Debug (static runtime)" x64 and I ran ClientCppDemo and it behaves as I expected (no access violation). Anything else I can try to recreate the error? I have not examined the code but your remarks sound sensible to me. What resolution would you suggest? Regards, Eric On 10/7/20 6:43 AM, SX L wrote: I was trying the Quantlib Addin. The QLADemo exits abnormally in the debug version with an access violation exception. It turned out to be the case that ObervableSettings is deleted earlier than some observer and observables at exit. So in the dtor of the observer, ObservableSettings is called to check if update is deferred, hence causing the exception. I feel it's unsafe to use shared pointers inside a singleton. Any suggestion? Thanks. Regards, Philip Get Outlook for Android<https://aka.ms/ghei36> _______________________________________________ QuantLib-users mailing list Qua...@li...<mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-users |