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
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Christofer B. <bog...@gm...> - 2020-09-06 20:12:14
|
Hi, I am wondering if there is any way to get the simulated path generated from some stochastic process like GBM with constant volatility and Heston. I am using Python implementation of Quantlib. Any pointer will be highly appreciated. Thanks, |
|
From: Ruth M. <mas...@ic...> - 2020-09-05 17:34:27
|
Hi ; I have a portfolio of bonds in a table that I would like to value. Can one suggest the most efficient way I can value all at once. I can only value one bond at a time. Thanks Regards; Ruth |
|
From: Luigi B. <lui...@gm...> - 2020-09-05 16:18:12
|
Hello Mudit, Francois,
the QuantLib license is the 3-clause BSD license (<
https://opensource.org/licenses/BSD-3-Clause>). It allows you to do
anything with the QuantLib code: your product can be closed source, and if
you're modifying the QuantLib code, you don't have to make the modified
source available. I'm not a lawyer either, but as I read it, your only
obligation is that if you redistribute/sell whatever it is you do, in
binary or source form, you must also include the full text of the QuantLib
license, including the disclaimer of warranty. It doesn't mean you're
applying the same license to your product! Basically, you're saying that
your product includes or uses some QuantLib code, and you're including the
QuantLib license so it's clear to whomever uses it that the QuantLib
developers are not responsible for anything that might happen as a
consequence.
Hope this helps. In any case, you can find more information by researching
the 3-clause BSD license.
Luigi
P.S. @Francois: GPL is an entirely different beast, and I'm not sure I'm
qualified to answer about that.
On Sat, Sep 5, 2020 at 9:27 AM Francois Botha <ig...@gm...> wrote:
> Hi
>
> I'm also interested this question. Hope it's OK if I add to it, Mudit.
>
> I understand that the license is quite permissive, but I'm still not sure
> exactly what it requires.
>
> Can I link to quantlib from a commercial product?
>
> Can I copy code directly from quantlib into my project and compile it?
>
> When do I have to release the quantlib source code alongside my commercial
> product?
>
> I know few of us here are lawyers and that the usual disclaimer holds, but
> I'm sure someone else here is less confused than I am.
>
> While we're at it, it doesn't pertain to quantlib, but how do the answers
> to my questions change if the license were eg a GPL based license?
>
> Thanks
> Francois
>
> On Sat, 5 Sep 2020, 08:42 Mudit Sharma, <sha...@gm...> wrote:
>
>> Dear list,
>>
>> I intend to derive a commercial product relying on Quantlib. I just want
>> to be sure that
>> I can use Quantlib freely for my product. I have read the license and I
>> think my product will not violate it. However I have a doubt :
>>
>> 1) In this page : https://www.quantlib.org/license.shtml
>> there it is mentioned : It allows proprietary extensions to be
>> commercialized
>> I wanted to know what exactly is meant by this statement.
>> Can the extension be anything ? another library/api/website/blog etc ?
>>
>> Hoping to hear from you soon,
>> Mudit Sharma
>> _______________________________________________
>> 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: Francois B. <ig...@gm...> - 2020-09-05 07:24:37
|
Hi I'm also interested this question. Hope it's OK if I add to it, Mudit. I understand that the license is quite permissive, but I'm still not sure exactly what it requires. Can I link to quantlib from a commercial product? Can I copy code directly from quantlib into my project and compile it? When do I have to release the quantlib source code alongside my commercial product? I know few of us here are lawyers and that the usual disclaimer holds, but I'm sure someone else here is less confused than I am. While we're at it, it doesn't pertain to quantlib, but how do the answers to my questions change if the license were eg a GPL based license? Thanks Francois On Sat, 5 Sep 2020, 08:42 Mudit Sharma, <sha...@gm...> wrote: > Dear list, > > I intend to derive a commercial product relying on Quantlib. I just want > to be sure that > I can use Quantlib freely for my product. I have read the license and I > think my product will not violate it. However I have a doubt : > > 1) In this page : https://www.quantlib.org/license.shtml > there it is mentioned : It allows proprietary extensions to be > commercialized > I wanted to know what exactly is meant by this statement. > Can the extension be anything ? another library/api/website/blog etc ? > > Hoping to hear from you soon, > Mudit Sharma > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Mudit S. <sha...@gm...> - 2020-09-05 06:38:58
|
Dear list, I intend to derive a commercial product relying on Quantlib. I just want to be sure that I can use Quantlib freely for my product. I have read the license and I think my product will not violate it. However I have a doubt : 1) In this page : https://www.quantlib.org/license.shtml there it is mentioned : It allows proprietary extensions to be commercialized I wanted to know what exactly is meant by this statement. Can the extension be anything ? another library/api/website/blog etc ? Hoping to hear from you soon, Mudit Sharma |
|
From: Javid A. <jav...@ya...> - 2020-09-01 14:05:08
|
Hi All, I am trying to reproduce the Eonia discount curve example provided in the QuantLib Python Cookbook (Chapter 8, page 61) using both QuantLib Python in a Jupyter notebook as well as QuantLib Excel. As part of a basic 'sanity' check I want to be able to demonstrate that the PVs of the instruments used to build this curve are zero. When I use QL Excel (Version 16) I get a number of errors which I need help to resolve. If necessary I can provide my spreadsheet if that would be helpful. The specific problems I am encountering are: (1) The function qlPiecewiseYieldCurve only seems to work with interpolation types of LogLinear, Linear, BackwardFlat or ForwardFlat. If I use either CubicSpline or LogCubic interpolation this function seems to fail with error messages below: "qlPiecewiseYieldCurve - Unknown id for Type: Discount:LogCubic" or "qlPiecewiseYieldCurve - Unknown id for Type: Discount:CubicSpline" According to the link below both are acceptable interpolation types for this function.https://www.quantlib.org/quantlibaddin/func_piecewiseyieldcurve.html#qlPiecewiseYieldCurve Is this a known bug or am I doing something wrong? (2) In order to construct the EONIA discount curve I have used a combination of qlDepositRateHelper, qlOISRateHelper and qlDatedOISRateHelper. I then used the function qlOvernightIndexedSwapfromOISRateHelper which I understood would create an OIS Swap object from the OIS helpers used. Although this function seems to work for an OIS helper created using the qlOISRateHelper function, it seems to fail when applied to an OIS helper created using the qlDatedOISRateHelper with error message: qlOvernightIndexedSwapFromOISRateHelper - Error retrieving object with id 'EUROISFRA1#001' - unable to convert reference to type 'class QuantLibAddin::OISRateHelper' found instead 'class QuantLibAddin::DatedOISRateHelper' Is this a known bug or am I doing something wrong? (3) I then tried to display the fixed leg and OIS leg schedules produced by the functions qlOvernightIndexedSwapFixedLegAnalysis and qlOvernightIndexedSwapOvernightLegAnalysis and noticed that the fixed leg 'Amount' and the 'Effective Rate' both show 0, which looks wrong. Is this a known bug? (4) Where the function qlOvernightIndexedSwapfromOISRateHelper successfully creates an OIS Swap object, I have attempted to value the fixed leg and overnight leg. First I set up a discounting swap engine using qlDiscountingSwapEngine and then tried to price each leg using qlOvernightIndexedSwapFixedLegNPV and qlOvernightIndexedSwapOvernightLegNPV respectively in order to confirm that these are equal. Although I seem to get a reasonable value for the overnight leg, the fixed leg NPV returns 0 which I think is wrong. Please advise on whether this is a bug. Note that I have separately tried to use qlMakeOIS and price the fixed leg and overnight leg separately, which seems to work, but it seemed natural to be able to directly price the relevant OIS instrument via the helper. Finally, I have some general questions on the use of QL Python/Excel (i) Is it possible to create a joint calendar in QL Excel and if so how do I do this? (ii) Is there a way to display the contents of an object in QL Excel? I noticed that there are some logging functions and was wondering whether these would serve this purpose? If so would you please provide an example, since I was unable to get these to work. (iii) Finally, in QL Python I am struggling to figure out what valid methods and attributes are applicable to objects. For example, if I create an OIS swap object using OISSwapObj =ql.MakeOIS(OISSwapTenor, OISSwapIndex, OISFixedRate), how would I know that I can obtain the NPV of this object using OISSwapObj.NPV() and what other methods(?) can I use? Is there a list that I can refer to, since I don't see this information in the QuantLib-Python Documentation page (www.quant lib-python-docs.readthedocs.io/en/latest)? For each accrual period I had wanted to display things like Accrual Start Date, Accrual End Date, Payment Date, Fixing Date, etc.. In other words, how do I get the same information out of this QL Python object that I can retrieve using something like qlOvernightIndexedSwapFixedLegAnalysis in QL Excel? Thanks in advance. Regards, Javid |
|
From: Amine I. <ami...@gm...> - 2020-08-31 12:52:13
|
Hi Sumit, From my experience, there is a 2factor Gaussian and CIR square root diffusion model (1-factor) with calibration to initial term structure possible. If you have access to the CPP code, it’s all under the QL/models/shortrate folder. Regards, Amine Ifri > On 31 Aug 2020, at 13:09, Sumit Sengupta <su...@mo...> wrote: > > > Thanks a lot Luigi/Laurent. > > Can I ask, for pricing and risk for swaptions, apart from the 1 factor HW model, what other models are supported in Quantlib? > > Is the calibration (to mkt vol) and pricing under sabr forward measure supported in Quantlib python? If so, is there any python code/ notebook that can be shared. > > Thanks > Sumit > >> On Mon, 31 Aug 2020, 12:13 Luigi Ballabio, <lui...@gm...> wrote: >> Hello, >> I confirm LMM is not exported to Python. Truth be told, it's not fully integrated with the C++ library either. We need some work on that. >> >> Luigi >> >> >>> On Sun, Aug 30, 2020 at 11:28 PM Sumit Sengupta <su...@mo...> wrote: >>> Hi, >>> >>> I wanted to confirm if I can use Quantlib python to price Swaptions / Bond options using HJM/LMM models. >>> >>> Going through the quantlib python cookbook, I don't see any examples / sample code on how to do this. Does this mean it's not supported in Quantlib? >>> >>> Regards >>> >>> -- >>> Mosaic Smart Data >>> >>> mobile +44 (0)7961839363 >>> su...@mo... >>> 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom >>> www.mosaicsmartdata.com >>> _______________________________________________ >>> 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: Sumit S. <su...@mo...> - 2020-08-31 12:07:34
|
Thanks a lot Luigi/Laurent. Can I ask, for pricing and risk for swaptions, apart from the 1 factor HW model, what other models are supported in Quantlib? Is the calibration (to mkt vol) and pricing under sabr forward measure supported in Quantlib python? If so, is there any python code/ notebook that can be shared. Thanks Sumit On Mon, 31 Aug 2020, 12:13 Luigi Ballabio, <lui...@gm...> wrote: > Hello, > I confirm LMM is not exported to Python. Truth be told, it's not > fully integrated with the C++ library either. We need some work on that. > > Luigi > > > On Sun, Aug 30, 2020 at 11:28 PM Sumit Sengupta <su...@mo...> > wrote: > >> Hi, >> >> I wanted to confirm if I can use Quantlib python to price Swaptions / >> Bond options using HJM/LMM models. >> >> Going through the quantlib python cookbook, I don't see any examples / >> sample code on how to do this. Does this mean it's not supported in >> Quantlib? >> >> Regards >> >> -- >> Mosaic Smart Data >> >> mobile +44 (0)7961839363 >> su...@mo... >> 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom >> www.mosaicsmartdata.com >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2020-08-31 11:13:14
|
Hello,
I confirm LMM is not exported to Python. Truth be told, it's not fully
integrated with the C++ library either. We need some work on that.
Luigi
On Sun, Aug 30, 2020 at 11:28 PM Sumit Sengupta <su...@mo...>
wrote:
> Hi,
>
> I wanted to confirm if I can use Quantlib python to price Swaptions /
> Bond options using HJM/LMM models.
>
> Going through the quantlib python cookbook, I don't see any examples /
> sample code on how to do this. Does this mean it's not supported in
> Quantlib?
>
> Regards
>
> --
> Mosaic Smart Data
>
> mobile +44 (0)7961839363
> su...@mo...
> 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom
> www.mosaicsmartdata.com
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Laurent B <lp...@ho...> - 2020-08-31 09:00:27
|
Hi, From what I can remember, there ‘s a Libor Swaption pricer in the C++ codebase. Maybe not available via Python. Regards Laurent Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Sumit Sengupta<mailto:su...@mo...> Sent: 30 August 2020 22:27 To: qua...@li...<mailto:qua...@li...> Subject: [Quantlib-users] Libor market model implementation in Quantlib Hi, I wanted to confirm if I can use Quantlib python to price Swaptions / Bond options using HJM/LMM models. Going through the quantlib python cookbook, I don't see any examples / sample code on how to do this. Does this mean it's not supported in Quantlib? Regards -- Mosaic Smart Data mobile +44 (0)7961839363 su...@mo...<mailto:su...@mo...> 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom www.mosaicsmartdata.com<https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mosaicsmartdata.com%2F&data=02%7C01%7C%7Ce4cd7b69cafc4ded166008d84d2b8fee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637344196774478642&sdata=cqsA4Lzl5QK5QdJCgbeDnw7ZdAX6KvbMYqKLyHjqoug%3D&reserved=0> |
|
From: Sumit S. <su...@mo...> - 2020-08-30 21:25:49
|
Hi, I wanted to confirm if I can use Quantlib python to price Swaptions / Bond options using HJM/LMM models. Going through the quantlib python cookbook, I don't see any examples / sample code on how to do this. Does this mean it's not supported in Quantlib? Regards -- Mosaic Smart Data mobile +44 (0)7961839363 su...@mo... 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom www.mosaicsmartdata.com |
|
From: Sumit S. <su...@mo...> - 2020-08-27 15:08:07
|
Sorry - pls ignore. I found the issue with the handling of Normal (Bachelier) volatilities On Thu, 27 Aug 2020 at 15:13, Sumit Sengupta <su...@mo...> wrote: > Hi, > I am following the example in python cookbook to calibrate the HW 1 > factor model to market supplied Normal vols > > The cookbook specifically mentions in Chapter 17: > > [image: image.png] > Perhaps that's why my code is failing (see attached jupyter notebook). > > Any pointers to how I can fix this issue will be greatly appreciated... > > I guess the usual approximation: > normalVol ~ price * log-normalvol > > also won't work as the rates are -ve ? > > Regards > Sumit > > -- > Mosaic Smart Data > > mobile +44 (0)7961839363 > su...@mo... > 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom > www.mosaicsmartdata.com > -- Mosaic Smart Data mobile +44 (0)7961839363 su...@mo... 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom www.mosaicsmartdata.com |
|
From: Sumit S. <su...@mo...> - 2020-08-27 14:41:51
|
Hi, I am following the example in python cookbook to calibrate the HW 1 factor model to market supplied Normal vols The cookbook specifically mentions in Chapter 17: [image: image.png] Perhaps that's why my code is failing (see attached jupyter notebook). Any pointers to how I can fix this issue will be greatly appreciated... I guess the usual approximation: normalVol ~ price * log-normalvol also won't work as the rates are -ve ? Regards Sumit -- Mosaic Smart Data mobile +44 (0)7961839363 su...@mo... 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom www.mosaicsmartdata.com |
|
From: Amine I. <ami...@gm...> - 2020-08-25 10:50:11
|
Hi Daniel,
These functions below are implemented using the (intelligent) MACRO design:
#define DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(METHOD) \
template <class Stat> \
std::vector<Real> \
GenericSequenceStatistics<Stat>::METHOD() const { \
for (Size i=0; i<dimension_; i++) \
results_[i] = stats_[i].METHOD(); \
return results_; \
}
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(mean)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(variance)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(standardDeviation)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(downsideVariance)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(downsideDeviation)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(semiVariance)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(semiDeviation)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(errorEstimate)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(skewness)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(kurtosis)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(min)
DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID(max)
#undef DEFINE_SEQUENCE_STAT_CONST_METHOD_VOID
And these methods METHOD() are defined here: ql/math/statistics/generalstatistics.cpp
Hope this helps.
Amine
> On 25 Aug 2020, at 11:25, Daniel Lobo <dan...@gm...> wrote:
>
> Hi Quantlib experts -
>
> I was looking at various implementation of the statistical tools here -
>
> https://github.com/lballabio/QuantLib/blob/master/ql/math/statistics/sequencestatistics.hpp <https://github.com/lballabio/QuantLib/blob/master/ql/math/statistics/sequencestatistics.hpp>
>
> There implemented various methods and classes like -
>
> std::vector<Real> mean() const;
> std::vector<Real> variance() const;
> std::vector<Real> standardDeviation() const;
> std::vector<Real> downsideVariance() const;
> std::vector<Real> downsideDeviation() const;
> std::vector<Real> semiVariance() const;
> std::vector<Real> semiDeviation() const;
> std::vector<Real> errorEstimate() const;
> std::vector<Real> skewness() const;
> std::vector<Real> kurtosis() const;
> std::vector<Real> min() const;
> std::vector<Real> max() const;
>
> and classes like Real() etc.
>
> Can you please help to point the source files, where actual definitions and calculations are coded?
>
> Really appreciate for your help and apologies if my question is really stupid.
>
> Thanks and regards,
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Daniel L. <dan...@gm...> - 2020-08-25 10:25:27
|
Hi Quantlib experts - I was looking at various implementation of the statistical tools here - https://github.com/lballabio/QuantLib/blob/master/ql/math/statistics/sequencestatistics.hpp There implemented various methods and classes like - std::vector<Real> mean() const; std::vector<Real> variance() const; std::vector<Real> standardDeviation() const; std::vector<Real> downsideVariance() const; std::vector<Real> downsideDeviation() const; std::vector<Real> semiVariance() const; std::vector<Real> semiDeviation() const; std::vector<Real> errorEstimate() const; std::vector<Real> skewness() const; std::vector<Real> kurtosis() const; std::vector<Real> min() const; std::vector<Real> max() const; and classes like Real() etc. Can you please help to point the source files, where actual definitions and calculations are coded? Really appreciate for your help and apologies if my question is really stupid. Thanks and regards, |
|
From: <sh...@op...> - 2020-08-19 11:33:46
|
Hi Kuljeet, Looks like the include directory is not properly setup in Visual Studio, so it cannot find the header file (ql/quantlib.hpp). Kind Regards, Steven From: Kuljeet singh <kul...@gm...> Sent: Tuesday, 18 August 2020 20:47 To: qua...@li... Subject: [Quantlib-users] Build successful in c++ but error during "Start Debugging" Hi, I am using QuantLib-1.18, VS 15 and boost_1_64_0. Build QuantLib successfully. But when I run an example code I see error. Could you please advise what could be the reason? Error msg below: 1>------ Build started: Project: TestingQuantLib2, Configuration: Debug Win32 ------ 1> TestingQuantLib2.cpp 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code 2. 1>c:\users\kuljeet\desktop\lib\quantlib-1.18\quantlibtest\testingquantlib2\testingquantlib2\testingquantlib2.cpp(1): fatal error C1083: Cannot open include file: 'ql/quantlib.hpp': No such file or directory ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Thanks, Kuljeet |
|
From: Kuljeet s. <kul...@gm...> - 2020-08-18 18:47:30
|
Hi, I am using QuantLib-1.18, VS 15 and boost_1_64_0. Build QuantLib successfully. But when I run an example code I see error. Could you please advise what could be the reason? Error msg below: 1>------ Build started: Project: TestingQuantLib2, Configuration: Debug Win32 ------ 1> TestingQuantLib2.cpp 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code 2. 1>c:\users\kuljeet\desktop\lib\quantlib-1.18\quantlibtest\testingquantlib2\testingquantlib2\testingquantlib2.cpp(1): fatal error C1083: Cannot open include file: 'ql/quantlib.hpp': No such file or directory ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Thanks, Kuljeet |
|
From: Aleksis A. R. <ale...@go...> - 2020-08-16 13:47:30
|
Thanks Peter - I thought about point one (poor extrapolation of the vol cube with steep skew) but wouldn’t this impact both the TSR and parallel shift replication models (since the OTM replicated swaptions would be overvalued with absurdly high vols)? So not quite sure how it would explain the unique blow-up of the convexity adj of the TSR model in the increasing vol skew scenario. Regarding point two I presume this is defined via the withRateBound() attribute on the LinearTSRPricerSettings() class in quantlib python? Will attempt at investigating this further. But so far the most material impact seems to be coming from the mean reversion parameter which appears to address the issue at hand. > On 16 Aug 2020, at 12:43, Peter Caspers <pca...@gm...> wrote: > > Hi Aleksis, > > some additional points to check are maybe > > - the extrapolation of the volatilities, if you use linear extrapolation volatilities might be become unreasonably large outside the quoted region, especially is the skew is steep > - the integration boundaries used in the LinearTSR pricer - these should correspond to the range of replication scenarios you use I assume > > Kind regards > Peter > > > On Sat, 15 Aug 2020 at 11:57, Aleksis Ali Raza <ale...@go... <mailto:ale...@go...>> wrote: > That’s quite helpful Peter. > > My primary concern was the unsavoury exponential behaviour of the TSR model I was seeing with increasing vol skew (the third plot of my original email) leading to unrealistic values of the TSR convexity adjustment. There doesn’t appear to be much in the literature regarding the sensitivity of these models to pure vol skew (although I admit I haven’t braved through Piterbarg’s work). > > However, your suggestion of playing around with the mean reversion parameter yielded some much more agreeable results (by setting the mean reversion to much higher levels than I was originally using): > > > Many thanks, Aleksis > > >> On 14 Aug 2020, at 21:32, Peter Caspers <pca...@gm... <mailto:pca...@gm...>> wrote: >> >> Hi Aleksis, >> >> the LinearTSR model assumes >> >> (*) P(t,T) / A(t) = a S(t) + b >> >> where t = fixing time, T = payment time, P(t,T) = discount factor, A(t) = annuity, S(t) = swap rate and a and b are model parameters. b is determined by a no arbitrage condition. a is implied from the mean reversion parameter. See the Piterbarg Interest Rate Modeling books for more details on this. >> >> You compute your static replication portfolio using parallel shifts of the rate curve if I understand correctly. This not exactly the same as (*). This might be one possible source of the mismatch under extreme market conditions. I suppose different choices of the mean reversion will affect the result as well. Other possible reasons certainly include the numerical integration scheme of the LinearTSRPricer, you might pass in a custom Integrator to do a check on this. >> >> But in short, I just wouldn't expect a perfect match since the two approaches represent different models from the start. >> >> Kind regards >> Peter >> >> On Fri, 14 Aug 2020 at 14:06, Aleksis Ali Raza via QuantLib-users <qua...@li... <mailto:qua...@li...>> wrote: >> Hi. >> >> I’ve been looking at the LinearTSR pricer for CMS in Quantlib and comparing it with a replication portfolio of OTM swaptions. To set things up I use: a flat rate term structure of 5% (both for discounting and forwards); a normal vol cube with simple symmetric smile (ATM vols around 50bps and skew +/- 15bps for each +/- 1% OTM). I consider a CMS swaplet (fix in adv, pay in arrears with an annual tenor) with a maturity of 5y on a 20y swap reference rate (and compare it with a 5y20y annual/3mL vanilla swap on a 100mm nominal). After solving for the appropriate CMS nominal and the corresponding nominal weights of the replication swaptions (using a parallel shift range of +/- 10% in 50bps shifts i.e. using 20 payer+20 receiver swaptions), the convexity adjustments are a close match and the overall fit looks pretty decent: >> >> <Figure_1.png> >> >> Now playing around with both the vols and the vol skew, the scenarios of the TSR pricer and the replicated swaption portfolio have the behaviors shown in the plots below (granted up to quite extreme vol levels!). At these more extreme levels of vol and skew, increasing the range of the replication portfolio gives a closer match for the vol shift case, and somewhat improves the match for the skew scaling case - however the discrepancies are still apparent even using a large replication set of swaptions. Note that skew scaling here just means making the vol smile more acute by scaling the OTM spreads by a scale factor. >> >> Not knowing enough about what the LinearTSR pricer is actually doing it’d be helpful if someone could comment on the deviations shown below at the high vol/skew levels and what model parameters might potentially address/explain them. Or, more significantly, if the below behaviors are more of a reflection of a flaw in my replication methodology? >> >> Thanks, Aleksis >> >> <Figure_2.png><Figure_3.png> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... <mailto:Qua...@li...> >> https://lists.sourceforge.net/lists/listinfo/quantlib-users <https://lists.sourceforge.net/lists/listinfo/quantlib-users> > |
|
From: Peter C. <pca...@gm...> - 2020-08-16 11:43:52
|
Hi Aleksis, some additional points to check are maybe - the extrapolation of the volatilities, if you use linear extrapolation volatilities might be become unreasonably large outside the quoted region, especially is the skew is steep - the integration boundaries used in the LinearTSR pricer - these should correspond to the range of replication scenarios you use I assume Kind regards Peter On Sat, 15 Aug 2020 at 11:57, Aleksis Ali Raza <ale...@go...> wrote: > That’s quite helpful Peter. > > My primary concern was the unsavoury exponential behaviour of the TSR > model I was seeing with increasing vol skew (the third plot of my original > email) leading to unrealistic values of the TSR convexity adjustment. There > doesn’t appear to be much in the literature regarding the sensitivity of > these models to pure vol skew (although I admit I haven’t braved through > Piterbarg’s work). > > However, your suggestion of playing around with the mean reversion > parameter yielded some much more agreeable results (by setting the mean > reversion to much higher levels than I was originally using): > > > Many thanks, Aleksis > > > On 14 Aug 2020, at 21:32, Peter Caspers <pca...@gm...> wrote: > > Hi Aleksis, > > the LinearTSR model assumes > > (*) P(t,T) / A(t) = a S(t) + b > > where t = fixing time, T = payment time, P(t,T) = discount factor, A(t) = > annuity, S(t) = swap rate and a and b are model parameters. b is determined > by a no arbitrage condition. a is implied from the mean reversion > parameter. See the Piterbarg Interest Rate Modeling books for more details > on this. > > You compute your static replication portfolio using parallel shifts of the > rate curve if I understand correctly. This not exactly the same as (*). > This might be one possible source of the mismatch under extreme > market conditions. I suppose different choices of the mean reversion will > affect the result as well. Other possible reasons certainly include the > numerical integration scheme of the LinearTSRPricer, you might pass in a > custom Integrator to do a check on this. > > But in short, I just wouldn't expect a perfect match since the two > approaches represent different models from the start. > > Kind regards > Peter > > On Fri, 14 Aug 2020 at 14:06, Aleksis Ali Raza via QuantLib-users < > qua...@li...> wrote: > >> Hi. >> >> I’ve been looking at the LinearTSR pricer for CMS in Quantlib and >> comparing it with a replication portfolio of OTM swaptions. To set things >> up I use: a flat rate term structure of 5% (both for discounting and >> forwards); a normal vol cube with simple symmetric smile (ATM vols around >> 50bps and skew +/- 15bps for each +/- 1% OTM). I consider a CMS swaplet >> (fix in adv, pay in arrears with an annual tenor) with a maturity of 5y on >> a 20y swap reference rate (and compare it with a 5y20y annual/3mL vanilla >> swap on a 100mm nominal). After solving for the appropriate CMS nominal >> and the corresponding nominal weights of the replication swaptions (using a >> parallel shift range of +/- 10% in 50bps shifts i.e. using 20 payer+20 >> receiver swaptions), the convexity adjustments are a close match and the >> overall fit looks pretty decent: >> >> <Figure_1.png> >> >> Now playing around with both the vols and the vol skew, the scenarios of >> the TSR pricer and the replicated swaption portfolio have the behaviors >> shown in the plots below (granted up to quite extreme vol levels!). At >> these more extreme levels of vol and skew, increasing the range of the >> replication portfolio gives a closer match for the vol shift case, and >> somewhat improves the match for the skew scaling case - however the >> discrepancies are still apparent even using a large replication set of >> swaptions. Note that skew scaling here just means making the vol smile >> more acute by scaling the OTM spreads by a scale factor. >> >> Not knowing enough about what the LinearTSR pricer is actually doing it’d >> be helpful if someone could comment on the deviations shown below at the >> high vol/skew levels and what model parameters might potentially >> address/explain them. Or, more significantly, if the below behaviors are >> more of a reflection of a flaw in my replication methodology? >> >> Thanks, Aleksis >> >> <Figure_2.png><Figure_3.png> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > > |
|
From: Aleksis A. R. <ale...@go...> - 2020-08-15 09:58:04
|
That’s quite helpful Peter. My primary concern was the unsavoury exponential behaviour of the TSR model I was seeing with increasing vol skew (the third plot of my original email) leading to unrealistic values of the TSR convexity adjustment. There doesn’t appear to be much in the literature regarding the sensitivity of these models to pure vol skew (although I admit I haven’t braved through Piterbarg’s work). However, your suggestion of playing around with the mean reversion parameter yielded some much more agreeable results (by setting the mean reversion to much higher levels than I was originally using): Many thanks, Aleksis > On 14 Aug 2020, at 21:32, Peter Caspers <pca...@gm...> wrote: > > Hi Aleksis, > > the LinearTSR model assumes > > (*) P(t,T) / A(t) = a S(t) + b > > where t = fixing time, T = payment time, P(t,T) = discount factor, A(t) = annuity, S(t) = swap rate and a and b are model parameters. b is determined by a no arbitrage condition. a is implied from the mean reversion parameter. See the Piterbarg Interest Rate Modeling books for more details on this. > > You compute your static replication portfolio using parallel shifts of the rate curve if I understand correctly. This not exactly the same as (*). This might be one possible source of the mismatch under extreme market conditions. I suppose different choices of the mean reversion will affect the result as well. Other possible reasons certainly include the numerical integration scheme of the LinearTSRPricer, you might pass in a custom Integrator to do a check on this. > > But in short, I just wouldn't expect a perfect match since the two approaches represent different models from the start. > > Kind regards > Peter > > On Fri, 14 Aug 2020 at 14:06, Aleksis Ali Raza via QuantLib-users <qua...@li... <mailto:qua...@li...>> wrote: > Hi. > > I’ve been looking at the LinearTSR pricer for CMS in Quantlib and comparing it with a replication portfolio of OTM swaptions. To set things up I use: a flat rate term structure of 5% (both for discounting and forwards); a normal vol cube with simple symmetric smile (ATM vols around 50bps and skew +/- 15bps for each +/- 1% OTM). I consider a CMS swaplet (fix in adv, pay in arrears with an annual tenor) with a maturity of 5y on a 20y swap reference rate (and compare it with a 5y20y annual/3mL vanilla swap on a 100mm nominal). After solving for the appropriate CMS nominal and the corresponding nominal weights of the replication swaptions (using a parallel shift range of +/- 10% in 50bps shifts i.e. using 20 payer+20 receiver swaptions), the convexity adjustments are a close match and the overall fit looks pretty decent: > > <Figure_1.png> > > Now playing around with both the vols and the vol skew, the scenarios of the TSR pricer and the replicated swaption portfolio have the behaviors shown in the plots below (granted up to quite extreme vol levels!). At these more extreme levels of vol and skew, increasing the range of the replication portfolio gives a closer match for the vol shift case, and somewhat improves the match for the skew scaling case - however the discrepancies are still apparent even using a large replication set of swaptions. Note that skew scaling here just means making the vol smile more acute by scaling the OTM spreads by a scale factor. > > Not knowing enough about what the LinearTSR pricer is actually doing it’d be helpful if someone could comment on the deviations shown below at the high vol/skew levels and what model parameters might potentially address/explain them. Or, more significantly, if the below behaviors are more of a reflection of a flaw in my replication methodology? > > Thanks, Aleksis > > <Figure_2.png><Figure_3.png> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... <mailto:Qua...@li...> > https://lists.sourceforge.net/lists/listinfo/quantlib-users <https://lists.sourceforge.net/lists/listinfo/quantlib-users> |
|
From: Christofer B. <bog...@gm...> - 2020-08-14 09:18:59
|
This worked. Many thanks for this suggestion. Regards, On Fri, Aug 14, 2020 at 1:07 PM Luigi Ballabio <lui...@gm...> wrote: > Christofer, > I suspect at this point you have broken pieces of installation lying > around from three different Python versions and interfering with your new > attempts. I suggest you use virtualenv to create a clean environment and > work in that one. It's a good practice anyway. > > Whatever version of python3 you want to use, create a new work directory, > enter it in the terminal, and run: > > python3 -m venv ql-env > > this will create a new directory ql-env with a clean Python environment > (based on the version you used). You don't need to enter in the directory: > stay where you are. To activate the new environment, run: > > . ql-env/bin/activate > > > (notice the single dot at the beginning followed by a space - that's > actually a command). Your shell prompt should now have a (ql-env) at the > beginning to show that you're in the new environment. Now, when you use > python or pip (or python3 or pip3) you'll get the versions in the > environment. To check, you can try: > > pip list > > which should return only pip and setuptools and no other module (because > the new environment is clean). Now finally try: > > pip install QuantLib > > which should hopefully work. If it does, install into the environment the > other modules you need. > > The new environment is only active in the shell you're using; any other > shell and program using Python will still use the default one. Also, if > you exit the terminal and later you come back and want to work in the > environment, you'll have to repeat the "activate" step above. > > Hope this helps, > Luigi > > > > On Thu, Aug 13, 2020 at 8:45 PM Christofer Bogaso < > bog...@gm...> wrote: > >> Appears to me that installing Quantlib in Mac-Python3 is >> frustratingly difficult and there are many breakpoints. >> >> I reinstalled Python and QuantLib altogether. With the new installation - >> >> >>> import sys >> >> >>> sys.path >> >> ['', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools-33.1.1-py3.6.egg'] >> >> >>> import QuantLib >> >> Traceback (most recent call last): >> >> File "<stdin>", line 1, in <module> >> >> File >> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/QuantLib/__init__.py", >> line 21, in <module> >> >> from .QuantLib import * >> >> File >> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/QuantLib/QuantLib.py", >> line 13, in <module> >> >> from . import _QuantLib >> >> ImportError: cannot import name '_QuantLib' >> >> And now it is failing with a new reason!!! >> >> >> On Thu, Aug 13, 2020 at 11:11 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> From inside Python, try >>> >>> import sys >>> print(sys.path) >>> >>> The list you get should include /usr/local/lib/python3.8/site-packages, >>> where pip3 installed QuantLib. If not, you might have some configuration >>> to do. >>> >>> On Thu, Aug 13, 2020 at 7:09 PM Christofer Bogaso < >>> bog...@gm...> wrote: >>> >>>> It would be better if I can load QuantLin with Python3. >>>> >>>> I failed to use some of the packages with Python2 (2.7.16) like >>>> matplotlib. Thanks, >>>> >>>> On Thu, Aug 13, 2020 at 8:09 PM Javid Ashraff <jav...@ya...> >>>> wrote: >>>> >>>>> I recall having the same problem in the past. Try using pip install >>>>> rather than pip3 install. >>>>> >>>>> Regards, >>>>> >>>>> Javid >>>>> >>>>> On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso < >>>>> bog...@gm...> wrote: >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> I have reinstalled Python3 using brew. And then installed again the >>>>> QuantLib as below - >>>>> >>>>> pip3 install QuantLib-Python >>>>> >>>>> Requirement already satisfied: QuantLib-Python in >>>>> /usr/local/lib/python3.8/site-packages (1.18) >>>>> >>>>> Requirement already satisfied: QuantLib in >>>>> /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19) >>>>> >>>>> After that I tried to import the library within Python3, but failed. >>>>> >>>>> >>> import QuantLib as ql >>>>> >>>>> Traceback (most recent call last): >>>>> >>>>> File "<stdin>", line 1, in <module> >>>>> >>>>> ModuleNotFoundError: No module named 'QuantLib' >>>>> >>>>> Any idea why is it failing? >>>>> >>>>> On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio < >>>>> lui...@gm...> wrote: >>>>> >>>>> I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/ >>>>> *directory. To be sure you're not missing anything, you might also >>>>> run "pip uninstall QuantLib-Python" first, then look for anything related >>>>> to QuantLib in /usr/local/lib and its Python subdirectories. Once you >>>>> clean them (but be careful to only clean stuff with "quantlib" in its >>>>> name), you can run "pip install" again. >>>>> >>>>> Luigi >>>>> >>>>> >>>>> On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso < >>>>> bog...@gm...> wrote: >>>>> >>>>> Thanks Luigi. But, how can I clean that? Is there any specific syntax? >>>>> >>>>> On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio < >>>>> lui...@gm...> wrote: >>>>> >>>>> Hello, >>>>> from the fact the traceback starts from " >>>>> *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to >>>>> */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's >>>>> importing a version you tried to compile rather than the one you installed >>>>> with pip. If that's the case, I'd try cleaning that one up. >>>>> >>>>> Hope this helps, >>>>> Luigi >>>>> >>>>> >>>>> On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < >>>>> bog...@gm...> wrote: >>>>> >>>>> Hi, >>>>> >>>>> I wanted to run QuantLib from my Python workplace, however failed to >>>>> import the library with below error - >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *>>> import QuantLibTraceback (most recent call last): File >>>>> "<stdin>", line 1, in <module> File >>>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in >>>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", >>>>> line 13, in <module> File >>>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in >>>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", >>>>> line 6, in __bootstrap__ImportError: >>>>> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, >>>>> 2): Symbol not found: >>>>> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb >>>>> Referenced from: >>>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so >>>>> Expected in: /usr/local/lib/libQuantLib.0.dylib in >>>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* >>>>> >>>>> I used the syntax *pip install QuantLib-Python* when I installed >>>>> QuantLib, the installation appears to be successful. >>>>> >>>>> Any help will be highly appreciated. >>>>> >>>>> Thanks, >>>>> _______________________________________________ >>>>> 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: Luigi B. <lui...@gm...> - 2020-08-14 07:37:41
|
Christofer,
I suspect at this point you have broken pieces of installation lying
around from three different Python versions and interfering with your new
attempts. I suggest you use virtualenv to create a clean environment and
work in that one. It's a good practice anyway.
Whatever version of python3 you want to use, create a new work directory,
enter it in the terminal, and run:
python3 -m venv ql-env
this will create a new directory ql-env with a clean Python environment
(based on the version you used). You don't need to enter in the directory:
stay where you are. To activate the new environment, run:
. ql-env/bin/activate
(notice the single dot at the beginning followed by a space - that's
actually a command). Your shell prompt should now have a (ql-env) at the
beginning to show that you're in the new environment. Now, when you use
python or pip (or python3 or pip3) you'll get the versions in the
environment. To check, you can try:
pip list
which should return only pip and setuptools and no other module (because
the new environment is clean). Now finally try:
pip install QuantLib
which should hopefully work. If it does, install into the environment the
other modules you need.
The new environment is only active in the shell you're using; any other
shell and program using Python will still use the default one. Also, if
you exit the terminal and later you come back and want to work in the
environment, you'll have to repeat the "activate" step above.
Hope this helps,
Luigi
On Thu, Aug 13, 2020 at 8:45 PM Christofer Bogaso <
bog...@gm...> wrote:
> Appears to me that installing Quantlib in Mac-Python3 is
> frustratingly difficult and there are many breakpoints.
>
> I reinstalled Python and QuantLib altogether. With the new installation -
>
> >>> import sys
>
> >>> sys.path
>
> ['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip',
> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages',
> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools-33.1.1-py3.6.egg']
>
> >>> import QuantLib
>
> Traceback (most recent call last):
>
> File "<stdin>", line 1, in <module>
>
> File
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/QuantLib/__init__.py",
> line 21, in <module>
>
> from .QuantLib import *
>
> File
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/QuantLib/QuantLib.py",
> line 13, in <module>
>
> from . import _QuantLib
>
> ImportError: cannot import name '_QuantLib'
>
> And now it is failing with a new reason!!!
>
>
> On Thu, Aug 13, 2020 at 11:11 PM Luigi Ballabio <lui...@gm...>
> wrote:
>
>> From inside Python, try
>>
>> import sys
>> print(sys.path)
>>
>> The list you get should include /usr/local/lib/python3.8/site-packages,
>> where pip3 installed QuantLib. If not, you might have some configuration
>> to do.
>>
>> On Thu, Aug 13, 2020 at 7:09 PM Christofer Bogaso <
>> bog...@gm...> wrote:
>>
>>> It would be better if I can load QuantLin with Python3.
>>>
>>> I failed to use some of the packages with Python2 (2.7.16) like
>>> matplotlib. Thanks,
>>>
>>> On Thu, Aug 13, 2020 at 8:09 PM Javid Ashraff <jav...@ya...>
>>> wrote:
>>>
>>>> I recall having the same problem in the past. Try using pip install
>>>> rather than pip3 install.
>>>>
>>>> Regards,
>>>>
>>>> Javid
>>>>
>>>> On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso <
>>>> bog...@gm...> wrote:
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> I have reinstalled Python3 using brew. And then installed again the
>>>> QuantLib as below -
>>>>
>>>> pip3 install QuantLib-Python
>>>>
>>>> Requirement already satisfied: QuantLib-Python in
>>>> /usr/local/lib/python3.8/site-packages (1.18)
>>>>
>>>> Requirement already satisfied: QuantLib in
>>>> /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19)
>>>>
>>>> After that I tried to import the library within Python3, but failed.
>>>>
>>>> >>> import QuantLib as ql
>>>>
>>>> Traceback (most recent call last):
>>>>
>>>> File "<stdin>", line 1, in <module>
>>>>
>>>> ModuleNotFoundError: No module named 'QuantLib'
>>>>
>>>> Any idea why is it failing?
>>>>
>>>> On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <
>>>> lui...@gm...> wrote:
>>>>
>>>> I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/
>>>> *directory. To be sure you're not missing anything, you might also
>>>> run "pip uninstall QuantLib-Python" first, then look for anything related
>>>> to QuantLib in /usr/local/lib and its Python subdirectories. Once you
>>>> clean them (but be careful to only clean stuff with "quantlib" in its
>>>> name), you can run "pip install" again.
>>>>
>>>> Luigi
>>>>
>>>>
>>>> On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso <
>>>> bog...@gm...> wrote:
>>>>
>>>> Thanks Luigi. But, how can I clean that? Is there any specific syntax?
>>>>
>>>> On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <
>>>> lui...@gm...> wrote:
>>>>
>>>> Hello,
>>>> from the fact the traceback starts from "
>>>> *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to
>>>> */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's
>>>> importing a version you tried to compile rather than the one you installed
>>>> with pip. If that's the case, I'd try cleaning that one up.
>>>>
>>>> Hope this helps,
>>>> Luigi
>>>>
>>>>
>>>> On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso <
>>>> bog...@gm...> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I wanted to run QuantLib from my Python workplace, however failed to
>>>> import the library with below error -
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *>>> import QuantLibTraceback (most recent call last): File "<stdin>",
>>>> line 1, in <module> File
>>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in
>>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py",
>>>> line 13, in <module> File
>>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in
>>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py",
>>>> line 6, in __bootstrap__ImportError:
>>>> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so,
>>>> 2): Symbol not found:
>>>> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb
>>>> Referenced from:
>>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so
>>>> Expected in: /usr/local/lib/libQuantLib.0.dylib in
>>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so*
>>>>
>>>> I used the syntax *pip install QuantLib-Python* when I installed
>>>> QuantLib, the installation appears to be successful.
>>>>
>>>> Any help will be highly appreciated.
>>>>
>>>> Thanks,
>>>> _______________________________________________
>>>> 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: Christofer B. <bog...@gm...> - 2020-08-13 18:45:55
|
Appears to me that installing Quantlib in Mac-Python3 is
frustratingly difficult and there are many breakpoints.
I reinstalled Python and QuantLib altogether. With the new installation -
>>> import sys
>>> sys.path
['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools-33.1.1-py3.6.egg']
>>> import QuantLib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/QuantLib/__init__.py",
line 21, in <module>
from .QuantLib import *
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/QuantLib/QuantLib.py",
line 13, in <module>
from . import _QuantLib
ImportError: cannot import name '_QuantLib'
And now it is failing with a new reason!!!
On Thu, Aug 13, 2020 at 11:11 PM Luigi Ballabio <lui...@gm...>
wrote:
> From inside Python, try
>
> import sys
> print(sys.path)
>
> The list you get should include /usr/local/lib/python3.8/site-packages,
> where pip3 installed QuantLib. If not, you might have some configuration
> to do.
>
> On Thu, Aug 13, 2020 at 7:09 PM Christofer Bogaso <
> bog...@gm...> wrote:
>
>> It would be better if I can load QuantLin with Python3.
>>
>> I failed to use some of the packages with Python2 (2.7.16) like
>> matplotlib. Thanks,
>>
>> On Thu, Aug 13, 2020 at 8:09 PM Javid Ashraff <jav...@ya...>
>> wrote:
>>
>>> I recall having the same problem in the past. Try using pip install
>>> rather than pip3 install.
>>>
>>> Regards,
>>>
>>> Javid
>>>
>>> On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso <
>>> bog...@gm...> wrote:
>>>
>>>
>>> Thanks.
>>>
>>> I have reinstalled Python3 using brew. And then installed again the
>>> QuantLib as below -
>>>
>>> pip3 install QuantLib-Python
>>>
>>> Requirement already satisfied: QuantLib-Python in
>>> /usr/local/lib/python3.8/site-packages (1.18)
>>>
>>> Requirement already satisfied: QuantLib in
>>> /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19)
>>>
>>> After that I tried to import the library within Python3, but failed.
>>>
>>> >>> import QuantLib as ql
>>>
>>> Traceback (most recent call last):
>>>
>>> File "<stdin>", line 1, in <module>
>>>
>>> ModuleNotFoundError: No module named 'QuantLib'
>>>
>>> Any idea why is it failing?
>>>
>>> On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <lui...@gm...>
>>> wrote:
>>>
>>> I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/
>>> *directory. To be sure you're not missing anything, you might also run
>>> "pip uninstall QuantLib-Python" first, then look for anything related to
>>> QuantLib in /usr/local/lib and its Python subdirectories. Once you clean
>>> them (but be careful to only clean stuff with "quantlib" in its name), you
>>> can run "pip install" again.
>>>
>>> Luigi
>>>
>>>
>>> On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso <
>>> bog...@gm...> wrote:
>>>
>>> Thanks Luigi. But, how can I clean that? Is there any specific syntax?
>>>
>>> On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...>
>>> wrote:
>>>
>>> Hello,
>>> from the fact the traceback starts from "
>>> *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to
>>> */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's
>>> importing a version you tried to compile rather than the one you installed
>>> with pip. If that's the case, I'd try cleaning that one up.
>>>
>>> Hope this helps,
>>> Luigi
>>>
>>>
>>> On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso <
>>> bog...@gm...> wrote:
>>>
>>> Hi,
>>>
>>> I wanted to run QuantLib from my Python workplace, however failed to
>>> import the library with below error -
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *>>> import QuantLibTraceback (most recent call last): File "<stdin>",
>>> line 1, in <module> File
>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in
>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py",
>>> line 13, in <module> File
>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in
>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py",
>>> line 6, in __bootstrap__ImportError:
>>> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so,
>>> 2): Symbol not found:
>>> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb
>>> Referenced from:
>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so
>>> Expected in: /usr/local/lib/libQuantLib.0.dylib in
>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so*
>>>
>>> I used the syntax *pip install QuantLib-Python* when I installed
>>> QuantLib, the installation appears to be successful.
>>>
>>> Any help will be highly appreciated.
>>>
>>> Thanks,
>>> _______________________________________________
>>> 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: Luigi B. <lui...@gm...> - 2020-08-13 17:41:53
|
>From inside Python, try import sys print(sys.path) The list you get should include /usr/local/lib/python3.8/site-packages, where pip3 installed QuantLib. If not, you might have some configuration to do. On Thu, Aug 13, 2020 at 7:09 PM Christofer Bogaso < bog...@gm...> wrote: > It would be better if I can load QuantLin with Python3. > > I failed to use some of the packages with Python2 (2.7.16) like > matplotlib. Thanks, > > On Thu, Aug 13, 2020 at 8:09 PM Javid Ashraff <jav...@ya...> > wrote: > >> I recall having the same problem in the past. Try using pip install >> rather than pip3 install. >> >> Regards, >> >> Javid >> >> On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso < >> bog...@gm...> wrote: >> >> >> Thanks. >> >> I have reinstalled Python3 using brew. And then installed again the >> QuantLib as below - >> >> pip3 install QuantLib-Python >> >> Requirement already satisfied: QuantLib-Python in >> /usr/local/lib/python3.8/site-packages (1.18) >> >> Requirement already satisfied: QuantLib in >> /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19) >> >> After that I tried to import the library within Python3, but failed. >> >> >>> import QuantLib as ql >> >> Traceback (most recent call last): >> >> File "<stdin>", line 1, in <module> >> >> ModuleNotFoundError: No module named 'QuantLib' >> >> Any idea why is it failing? >> >> On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >> I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/ >> *directory. To be sure you're not missing anything, you might also run >> "pip uninstall QuantLib-Python" first, then look for anything related to >> QuantLib in /usr/local/lib and its Python subdirectories. Once you clean >> them (but be careful to only clean stuff with "quantlib" in its name), you >> can run "pip install" again. >> >> Luigi >> >> >> On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso < >> bog...@gm...> wrote: >> >> Thanks Luigi. But, how can I clean that? Is there any specific syntax? >> >> On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >> Hello, >> from the fact the traceback starts from " >> *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to >> */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's importing >> a version you tried to compile rather than the one you installed with pip. >> If that's the case, I'd try cleaning that one up. >> >> Hope this helps, >> Luigi >> >> >> On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < >> bog...@gm...> wrote: >> >> Hi, >> >> I wanted to run QuantLib from my Python workplace, however failed to >> import the library with below error - >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *>>> import QuantLibTraceback (most recent call last): File "<stdin>", >> line 1, in <module> File >> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in >> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", >> line 13, in <module> File >> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in >> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", >> line 6, in __bootstrap__ImportError: >> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, >> 2): Symbol not found: >> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb >> Referenced from: >> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so >> Expected in: /usr/local/lib/libQuantLib.0.dylib in >> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* >> >> I used the syntax *pip install QuantLib-Python* when I installed >> QuantLib, the installation appears to be successful. >> >> Any help will be highly appreciated. >> >> Thanks, >> _______________________________________________ >> 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: Christofer B. <bog...@gm...> - 2020-08-13 17:09:59
|
It would be better if I can load QuantLin with Python3. I failed to use some of the packages with Python2 (2.7.16) like matplotlib. Thanks, On Thu, Aug 13, 2020 at 8:09 PM Javid Ashraff <jav...@ya...> wrote: > I recall having the same problem in the past. Try using pip install > rather than pip3 install. > > Regards, > > Javid > > On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso < > bog...@gm...> wrote: > > > Thanks. > > I have reinstalled Python3 using brew. And then installed again the > QuantLib as below - > > pip3 install QuantLib-Python > > Requirement already satisfied: QuantLib-Python in > /usr/local/lib/python3.8/site-packages (1.18) > > Requirement already satisfied: QuantLib in > /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19) > > After that I tried to import the library within Python3, but failed. > > >>> import QuantLib as ql > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > ModuleNotFoundError: No module named 'QuantLib' > > Any idea why is it failing? > > On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <lui...@gm...> > wrote: > > I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/ > *directory. To be sure you're not missing anything, you might also run > "pip uninstall QuantLib-Python" first, then look for anything related to > QuantLib in /usr/local/lib and its Python subdirectories. Once you clean > them (but be careful to only clean stuff with "quantlib" in its name), you > can run "pip install" again. > > Luigi > > > On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso < > bog...@gm...> wrote: > > Thanks Luigi. But, how can I clean that? Is there any specific syntax? > > On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> > wrote: > > Hello, > from the fact the traceback starts from " > *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to > */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's importing > a version you tried to compile rather than the one you installed with pip. > If that's the case, I'd try cleaning that one up. > > Hope this helps, > Luigi > > > On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < > bog...@gm...> wrote: > > Hi, > > I wanted to run QuantLib from my Python workplace, however failed to > import the library with below error - > > > > > > > > > > > > > > > > > > > > > > *>>> import QuantLibTraceback (most recent call last): File "<stdin>", > line 1, in <module> File > "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in > <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", > line 13, in <module> File > "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in > <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", > line 6, in __bootstrap__ImportError: > dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, > 2): Symbol not found: > __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb > Referenced from: > /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so > Expected in: /usr/local/lib/libQuantLib.0.dylib in > /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* > > I used the syntax *pip install QuantLib-Python* when I installed > QuantLib, the installation appears to be successful. > > Any help will be highly appreciated. > > Thanks, > _______________________________________________ > 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 > |