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: Jack G <jac...@gm...> - 2020-11-27 09:47:53
|
Luigi, Thanks for the pointer. It seems as though the only multi-path generator that is currently exposed via SWIG is for pseudorandoms only ( https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/montecarlo.i). I have the feeling that I should be adding the following to expose a multi-path generator for low discrepancy numbers, but for some reason this is upsetting my SWIG build (the error I get is "gcc: fatal error: Killed signal terminated program cc1plus" which I usually see when I add something subtly bad)... am I thinking on the right lines here? *%{* *typedef QuantLib::MultiPathGenerator<GaussianLowDiscrepancySequenceGenerator>* * GaussianMultiPathSobolGenerator;* *%}* *class GaussianMultiPathSobolGenerator {* * public:* * %extend {* * GaussianMultiPathSobolGenerator(* * const ext::shared_ptr<StochasticProcess>& process,* * const std::vector<Time>& times,* * const GaussianLowDiscrepancySequenceGenerator& generator,* * bool brownianBridge = false) {* * return new GaussianMultiPathSobolGenerator(process,* * QuantLib::TimeGrid(* * times.begin(),* * times.end()),* * generator,* * brownianBridge);* * }* * }* * Sample<MultiPath> next() const;* * Sample<MultiPath> antithetic() const;* *};* Best, Jack On Fri, Nov 27, 2020 at 4:35 PM Luigi Ballabio <lui...@gm...> wrote: > Hello Jack, > the Heston process is two-dimensional (it models both underlying and > vol) so you'll need to use a multi-path generator. The error you're > getting is the generator trying to cast the process to a one-dimensional > one and failing. > > Luigi > > > On Fri, Nov 27, 2020 at 4:13 AM Jack G <jac...@gm...> wrote: > >> Dear QL Users, >> >> I'm getting a slightly cryptic error when I try to manually generate >> paths for Heston using LD numbers in Python. >> >> It works fine for BS: >> >> *import QuantLib as ql* >> >> *initialValue = ql.QuoteHandle(ql.SimpleQuote(100))* >> *sigma = 0.2* >> >> *today = ql.Date().todaysDate()* >> *riskFreeTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0, >> ql.Actual365Fixed()))* >> *dividendTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0, >> ql.Actual365Fixed()))* >> *volTS = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(today, >> ql.NullCalendar(), sigma, ql.Actual365Fixed()))* >> *process = ql.BlackScholesProcess(initialValue, riskFreeTS, volTS)* >> >> *times = ql.TimeGrid(1, 12)* >> >> *rng = ql.UniformLowDiscrepancySequenceGenerator(12)* >> *seq = ql.GaussianLowDiscrepancySequenceGenerator(rng)* >> *path_gen = ql.GaussianSobolPathGenerator(process, times, seq, False)* >> >> *x = path_gen.next()* >> >> >> However, when I try the same with Heston, I get the following error: " >> RuntimeError: Boost assertion failed: px != 0" >> >> *v0 = 0.09 kappa = 0.8 theta = 0.09 rho = 0.4 sigma = 0.1 process = >> ql.HestonProcess(riskFreeTS, dividendTS, initialValue, v0, kappa, theta, >> sigma, rho) times = ql.TimeGrid(1, 12) rng = >> ql.UniformLowDiscrepancySequenceGenerator(12) seq = >> ql.GaussianLowDiscrepancySequenceGenerator(rng) path_gen = >> ql.GaussianSobolPathGenerator(process, times, seq, False) x = >> path_gen.next()* >> >> >> My working hypothesis is that the rng needs to be dimension 24 instead of >> 12 because of the second vol process that needs to be simulated, but when I >> change the dimension to 24 I get the following error: "RuntimeError: >> sequence generator dimensionality (24) != timeSteps (12)" >> >> I've looked through the QuantLib-SWIG code but not got too far... any >> pointers about how I might deal with this? Or have I done something stupid >> somewhere? >> >> Thanks, >> Jack >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2020-11-27 08:35:51
|
Hello Jack,
the Heston process is two-dimensional (it models both underlying and
vol) so you'll need to use a multi-path generator. The error you're
getting is the generator trying to cast the process to a one-dimensional
one and failing.
Luigi
On Fri, Nov 27, 2020 at 4:13 AM Jack G <jac...@gm...> wrote:
> Dear QL Users,
>
> I'm getting a slightly cryptic error when I try to manually generate paths
> for Heston using LD numbers in Python.
>
> It works fine for BS:
>
> *import QuantLib as ql*
>
> *initialValue = ql.QuoteHandle(ql.SimpleQuote(100))*
> *sigma = 0.2*
>
> *today = ql.Date().todaysDate()*
> *riskFreeTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0,
> ql.Actual365Fixed()))*
> *dividendTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0,
> ql.Actual365Fixed()))*
> *volTS = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(today,
> ql.NullCalendar(), sigma, ql.Actual365Fixed()))*
> *process = ql.BlackScholesProcess(initialValue, riskFreeTS, volTS)*
>
> *times = ql.TimeGrid(1, 12)*
>
> *rng = ql.UniformLowDiscrepancySequenceGenerator(12)*
> *seq = ql.GaussianLowDiscrepancySequenceGenerator(rng)*
> *path_gen = ql.GaussianSobolPathGenerator(process, times, seq, False)*
>
> *x = path_gen.next()*
>
>
> However, when I try the same with Heston, I get the following error: "
> RuntimeError: Boost assertion failed: px != 0"
>
> *v0 = 0.09 kappa = 0.8 theta = 0.09 rho = 0.4 sigma = 0.1 process =
> ql.HestonProcess(riskFreeTS, dividendTS, initialValue, v0, kappa, theta,
> sigma, rho) times = ql.TimeGrid(1, 12) rng =
> ql.UniformLowDiscrepancySequenceGenerator(12) seq =
> ql.GaussianLowDiscrepancySequenceGenerator(rng) path_gen =
> ql.GaussianSobolPathGenerator(process, times, seq, False) x =
> path_gen.next()*
>
>
> My working hypothesis is that the rng needs to be dimension 24 instead of
> 12 because of the second vol process that needs to be simulated, but when I
> change the dimension to 24 I get the following error: "RuntimeError:
> sequence generator dimensionality (24) != timeSteps (12)"
>
> I've looked through the QuantLib-SWIG code but not got too far... any
> pointers about how I might deal with this? Or have I done something stupid
> somewhere?
>
> Thanks,
> Jack
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2020-11-27 08:34:14
|
Hello,
you can retrieve them from spotCurve (methods dates(), zeroRates() or
nodes()) but not from spotCurveHandle, which only has the interface of the
base YieldTermStructure class.
Luigi
On Thu, Nov 26, 2020 at 11:38 PM Brian Smith <bri...@gm...>
wrote:
> Hi,
>
> Let say I build a term structure like this -
>
> from QuantLib import *
> import math
>
> todaysDate = Date(1, 9, 2019)
> Settings.instance().evaluationDate = todaysDate
> dayCount = Actual365Fixed()
> calendar = Canada()
> interpolation = Linear()
> compounding = Compounded
> compoundingFrequency = Continuous
>
> spotDates = [todaysDate, todaysDate + Period("6m"), todaysDate +
> Period("1y"), todaysDate + Period("2y"), todaysDate + Period("3y")]
> spotRates = [0, 0.061682, 0.066682, 0.067199, 0.067502]
>
> spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar,
> interpolation, compoundingFrequency)
> spotCurveHandle = YieldTermStructureHandle(spotCurve)
>
> Now, from the spotCurveHandle object, I want to extract all Nodes
> dates and rate information. Ofcourse I can get such information from
> spotDates and spotRates respectively, however I am looking for some
> way to extract the same information from the spotCurveHandle itself.
>
> Is there any method to do the same?
>
> Thanks for your insights.
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Jack G <jac...@gm...> - 2020-11-27 03:10:59
|
Dear QL Users, I'm getting a slightly cryptic error when I try to manually generate paths for Heston using LD numbers in Python. It works fine for BS: *import QuantLib as ql* *initialValue = ql.QuoteHandle(ql.SimpleQuote(100))* *sigma = 0.2* *today = ql.Date().todaysDate()* *riskFreeTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0, ql.Actual365Fixed()))* *dividendTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0, ql.Actual365Fixed()))* *volTS = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(today, ql.NullCalendar(), sigma, ql.Actual365Fixed()))* *process = ql.BlackScholesProcess(initialValue, riskFreeTS, volTS)* *times = ql.TimeGrid(1, 12)* *rng = ql.UniformLowDiscrepancySequenceGenerator(12)* *seq = ql.GaussianLowDiscrepancySequenceGenerator(rng)* *path_gen = ql.GaussianSobolPathGenerator(process, times, seq, False)* *x = path_gen.next()* However, when I try the same with Heston, I get the following error: " RuntimeError: Boost assertion failed: px != 0" *v0 = 0.09 kappa = 0.8 theta = 0.09 rho = 0.4 sigma = 0.1 process = ql.HestonProcess(riskFreeTS, dividendTS, initialValue, v0, kappa, theta, sigma, rho) times = ql.TimeGrid(1, 12) rng = ql.UniformLowDiscrepancySequenceGenerator(12) seq = ql.GaussianLowDiscrepancySequenceGenerator(rng) path_gen = ql.GaussianSobolPathGenerator(process, times, seq, False) x = path_gen.next()* My working hypothesis is that the rng needs to be dimension 24 instead of 12 because of the second vol process that needs to be simulated, but when I change the dimension to 24 I get the following error: "RuntimeError: sequence generator dimensionality (24) != timeSteps (12)" I've looked through the QuantLib-SWIG code but not got too far... any pointers about how I might deal with this? Or have I done something stupid somewhere? Thanks, Jack |
|
From: Brian S. <bri...@gm...> - 2020-11-26 22:33:31
|
Hi,
Let say I build a term structure like this -
from QuantLib import *
import math
todaysDate = Date(1, 9, 2019)
Settings.instance().evaluationDate = todaysDate
dayCount = Actual365Fixed()
calendar = Canada()
interpolation = Linear()
compounding = Compounded
compoundingFrequency = Continuous
spotDates = [todaysDate, todaysDate + Period("6m"), todaysDate +
Period("1y"), todaysDate + Period("2y"), todaysDate + Period("3y")]
spotRates = [0, 0.061682, 0.066682, 0.067199, 0.067502]
spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar,
interpolation, compoundingFrequency)
spotCurveHandle = YieldTermStructureHandle(spotCurve)
Now, from the spotCurveHandle object, I want to extract all Nodes
dates and rate information. Ofcourse I can get such information from
spotDates and spotRates respectively, however I am looking for some
way to extract the same information from the spotCurveHandle itself.
Is there any method to do the same?
Thanks for your insights.
|
|
From: Luigi B. <lui...@gm...> - 2020-11-26 09:15:30
|
Hello Brian,
the ZeroCurve class expects the passed rates to be consistent, so no,
you won't get the correct curve this way (and anyway, you're
explicitly passing Continuous to the curve, so you're telling it that those
rates are continuously compounded).
You can either convert some of your rates so that they are all annually
compounded (or all simple, or all continuous) and pass to ZeroCurve the
corresponding compounding; or it might be simple to calculate the
corresponding discount factors and use DiscountCurve instead. You can do
it by writing something like:
spotDates = [
todaysDate,
todaysDate + Period("6m"),
todaysDate + Period("1y"),
todaysDate + Period("2y"),
todaysDate + Period("3y")
]
discounts = [
1.0,
InterestRate(0.061682, dayCount, Simple,
NoFrequency).discountFactor(todaysDate, todaysDate + Period("6m")),
InterestRate(0.066682, dayCount, Simple,
NoFrequency).discountFactor(todaysDate, todaysDate + Period("1y")),
InterestRate(0.067199, dayCount, Compounded,
Annual).discountFactor(todaysDate, todaysDate + Period("2y")),
InterestRate(0.067502, dayCount, Compounded,
Annual).discountFactor(todaysDate, todaysDate + Period("3y")),
]
spotCurve = DiscountCurve(spotDates, discounts, dayCount)
Hope this helps,
Luigi
On Tue, Nov 24, 2020 at 9:26 PM Brian Smith <bri...@gm...>
wrote:
> Hi,
>
> Typically we build interest rate term structure as below -
>
> from QuantLib import *
> import math
>
> todaysDate = Date(1, 9, 2019)
> Settings.instance().evaluationDate = todaysDate
> dayCount = Actual365Fixed()
> calendar = Canada()
> interpolation = Linear()
> compounding = Compounded
> compoundingFrequency = Continuous
>
> spotDates = [todaysDate, todaysDate + Period("6m"), todaysDate +
> Period("1y"), todaysDate + Period("2y"), todaysDate + Period("3y")]
> spotRates = [0, 0.061682, 0.066682, 0.067199, 0.067502]
>
> spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar,
> interpolation, compoundingFrequency)
> spotCurveHandle = YieldTermStructureHandle(spotCurve)
>
> However in my spotRates object, the interest rates upto 1 year i.e.
> [0.061682, 0.066682] are defined as simple interest, however for the
> remaining cases it is Annually compounded.
>
> Under this scenario, is the building term structure using the above
> approach still correct?
>
> Your insight is highly appreciated.
>
> Many thanks,
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Ngonidzashe F. <ngo...@gm...> - 2020-11-25 08:12:43
|
Hi Luigi, Yes, I am using Python 3.8. I ultimately managed to run the valuation in PyCharm but the valuation is giving me an error when I run it in Spyder. Spyder updated to version 4.1.5 and I am not sure if this updated version has issues. It’s weird that Quantlib is working in PyCharm and not Spyder. I guess I now need to work with PyCharm. Thanks for your help Luigi! Kind regards, Ngoni On Wed, 25 Nov 2020 at 10:05, Luigi Ballabio <lui...@gm...> wrote: > Just to check, you're using Python 3.8 to try the valuation, right? > > Luigi > > > On Tue, Nov 24, 2020 at 10:53 PM Ngonidzashe Fungura < > ngo...@gm...> wrote: > >> Hi Luigi, >> >> I have tried installing as per your instructions and it indicates that it >> installed successfully as shown below; >> >> ngonifungura@Ngonis-MBP ~ % pip3 install QuantLib >> >> Collecting QuantLib >> >> Using cached QuantLib-1.20-cp38-cp38-macosx_10_9_x86_64.whl (14.7 MB) >> >> Installing collected packages: QuantLib >> >> Successfully installed QuantLib-1.20 >> >> ngonifungura@Ngonis-MBP ~ % pip3 install QuantLib-Python >> >> Collecting QuantLib-Python >> >> Using cached QuantLib_Python-1.18-py2.py3-none-any.whl (1.4 kB) >> >> Requirement already satisfied: QuantLib in >> /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages >> (from QuantLib-Python) (1.20) >> >> Installing collected packages: QuantLib-Python >> >> Successfully installed QuantLib-Python-1.18 >> >> However, I am still getting the error message that "No module named >> 'QuantLib'" when I try to run a valuation in Python >> >> Kind regards, >> >> Ngoni >> >> On Tue, 24 Nov 2020 at 21:40, Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello Ngoni, >>> you're the first one I heard trying to compile on Big Sur, so I'm >>> afraid I can't offer much help. However, if you want to use QuantLib from >>> Python without modifying it, I'd try installing it with "pip install >>> QuantLib" instead of compiling it. >>> >>> Hope this helps, >>> Luigi >>> >>> >>> On Tue, Nov 24, 2020 at 6:17 PM Ngonidzashe Fungura < >>> ngo...@gm...> wrote: >>> >>>> Hi QuantLib Users, >>>> >>>> Apple recently upgraded its software to macOS Big Sur version 11.0.1 >>>> and when I try to install Boost in terminal using "brew install boost", I >>>> am getting a warning shown below; >>>> >>>> Warning: You are using macOS 11.0. >>>> >>>> We do not provide support for this released but not yet supported >>>> version. >>>> >>>> You will encounter build failures with some formulae. >>>> >>>> Please create pull requests instead of asking for help on Homebrew's >>>> GitHub, >>>> >>>> Twitter or any other official channels. You are responsible for >>>> resolving >>>> >>>> any issues you experience while you are running this >>>> >>>> released but not yet supported version. >>>> >>>> Ultimately when I complete the installation of QuantLib-Python, I am >>>> not able to run my valuations in Python as I am getting an error message >>>> that "No module named 'QuantLib'". Could this be caused by the warning >>>> message above? I have researched this error and it seems that the upgrade >>>> has not happened yet to cater for the macOS Big Sur version 11.0.1 >>>> upgrade. If this is the issue, how can this be resolved or maybe I have to >>>> wait until the upgrade happens? >>>> >>>> Kind regards, >>>> >>>> Ngoni >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> -- Kind regards, Ngoni Fungura Mobile: +27(0)644126086 |
|
From: Luigi B. <lui...@gm...> - 2020-11-25 08:06:14
|
Just to check, you're using Python 3.8 to try the valuation, right? Luigi On Tue, Nov 24, 2020 at 10:53 PM Ngonidzashe Fungura <ngo...@gm...> wrote: > Hi Luigi, > > I have tried installing as per your instructions and it indicates that it > installed successfully as shown below; > > ngonifungura@Ngonis-MBP ~ % pip3 install QuantLib > > Collecting QuantLib > > Using cached QuantLib-1.20-cp38-cp38-macosx_10_9_x86_64.whl (14.7 MB) > > Installing collected packages: QuantLib > > Successfully installed QuantLib-1.20 > > ngonifungura@Ngonis-MBP ~ % pip3 install QuantLib-Python > > Collecting QuantLib-Python > > Using cached QuantLib_Python-1.18-py2.py3-none-any.whl (1.4 kB) > > Requirement already satisfied: QuantLib in > /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages > (from QuantLib-Python) (1.20) > > Installing collected packages: QuantLib-Python > > Successfully installed QuantLib-Python-1.18 > > However, I am still getting the error message that "No module named > 'QuantLib'" when I try to run a valuation in Python > > Kind regards, > > Ngoni > > On Tue, 24 Nov 2020 at 21:40, Luigi Ballabio <lui...@gm...> > wrote: > >> Hello Ngoni, >> you're the first one I heard trying to compile on Big Sur, so I'm >> afraid I can't offer much help. However, if you want to use QuantLib from >> Python without modifying it, I'd try installing it with "pip install >> QuantLib" instead of compiling it. >> >> Hope this helps, >> Luigi >> >> >> On Tue, Nov 24, 2020 at 6:17 PM Ngonidzashe Fungura < >> ngo...@gm...> wrote: >> >>> Hi QuantLib Users, >>> >>> Apple recently upgraded its software to macOS Big Sur version 11.0.1 and >>> when I try to install Boost in terminal using "brew install boost", I am >>> getting a warning shown below; >>> >>> Warning: You are using macOS 11.0. >>> >>> We do not provide support for this released but not yet supported >>> version. >>> >>> You will encounter build failures with some formulae. >>> >>> Please create pull requests instead of asking for help on Homebrew's >>> GitHub, >>> >>> Twitter or any other official channels. You are responsible for resolving >>> >>> any issues you experience while you are running this >>> >>> released but not yet supported version. >>> >>> Ultimately when I complete the installation of QuantLib-Python, I am not >>> able to run my valuations in Python as I am getting an error message that >>> "No module named 'QuantLib'". Could this be caused by the warning message >>> above? I have researched this error and it seems that the upgrade has not >>> happened yet to cater for the macOS Big Sur version 11.0.1 upgrade. If this >>> is the issue, how can this be resolved or maybe I have to wait until >>> the upgrade happens? >>> >>> Kind regards, >>> >>> Ngoni >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Ngonidzashe F. <ngo...@gm...> - 2020-11-24 21:53:54
|
Hi Luigi, I have tried installing as per your instructions and it indicates that it installed successfully as shown below; ngonifungura@Ngonis-MBP ~ % pip3 install QuantLib Collecting QuantLib Using cached QuantLib-1.20-cp38-cp38-macosx_10_9_x86_64.whl (14.7 MB) Installing collected packages: QuantLib Successfully installed QuantLib-1.20 ngonifungura@Ngonis-MBP ~ % pip3 install QuantLib-Python Collecting QuantLib-Python Using cached QuantLib_Python-1.18-py2.py3-none-any.whl (1.4 kB) Requirement already satisfied: QuantLib in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from QuantLib-Python) (1.20) Installing collected packages: QuantLib-Python Successfully installed QuantLib-Python-1.18 However, I am still getting the error message that "No module named 'QuantLib'" when I try to run a valuation in Python Kind regards, Ngoni On Tue, 24 Nov 2020 at 21:40, Luigi Ballabio <lui...@gm...> wrote: > Hello Ngoni, > you're the first one I heard trying to compile on Big Sur, so I'm > afraid I can't offer much help. However, if you want to use QuantLib from > Python without modifying it, I'd try installing it with "pip install > QuantLib" instead of compiling it. > > Hope this helps, > Luigi > > > On Tue, Nov 24, 2020 at 6:17 PM Ngonidzashe Fungura < > ngo...@gm...> wrote: > >> Hi QuantLib Users, >> >> Apple recently upgraded its software to macOS Big Sur version 11.0.1 and >> when I try to install Boost in terminal using "brew install boost", I am >> getting a warning shown below; >> >> Warning: You are using macOS 11.0. >> >> We do not provide support for this released but not yet supported version. >> >> You will encounter build failures with some formulae. >> >> Please create pull requests instead of asking for help on Homebrew's >> GitHub, >> >> Twitter or any other official channels. You are responsible for resolving >> >> any issues you experience while you are running this >> >> released but not yet supported version. >> >> Ultimately when I complete the installation of QuantLib-Python, I am not >> able to run my valuations in Python as I am getting an error message that >> "No module named 'QuantLib'". Could this be caused by the warning message >> above? I have researched this error and it seems that the upgrade has not >> happened yet to cater for the macOS Big Sur version 11.0.1 upgrade. If this >> is the issue, how can this be resolved or maybe I have to wait until >> the upgrade happens? >> >> Kind regards, >> >> Ngoni >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Brian S. <bri...@gm...> - 2020-11-24 20:23:32
|
Hi,
Typically we build interest rate term structure as below -
from QuantLib import *
import math
todaysDate = Date(1, 9, 2019)
Settings.instance().evaluationDate = todaysDate
dayCount = Actual365Fixed()
calendar = Canada()
interpolation = Linear()
compounding = Compounded
compoundingFrequency = Continuous
spotDates = [todaysDate, todaysDate + Period("6m"), todaysDate +
Period("1y"), todaysDate + Period("2y"), todaysDate + Period("3y")]
spotRates = [0, 0.061682, 0.066682, 0.067199, 0.067502]
spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar,
interpolation, compoundingFrequency)
spotCurveHandle = YieldTermStructureHandle(spotCurve)
However in my spotRates object, the interest rates upto 1 year i.e.
[0.061682, 0.066682] are defined as simple interest, however for the
remaining cases it is Annually compounded.
Under this scenario, is the building term structure using the above
approach still correct?
Your insight is highly appreciated.
Many thanks,
|
|
From: Luigi B. <lui...@gm...> - 2020-11-24 19:40:27
|
Hello Ngoni,
you're the first one I heard trying to compile on Big Sur, so I'm
afraid I can't offer much help. However, if you want to use QuantLib from
Python without modifying it, I'd try installing it with "pip install
QuantLib" instead of compiling it.
Hope this helps,
Luigi
On Tue, Nov 24, 2020 at 6:17 PM Ngonidzashe Fungura <ngo...@gm...>
wrote:
> Hi QuantLib Users,
>
> Apple recently upgraded its software to macOS Big Sur version 11.0.1 and
> when I try to install Boost in terminal using "brew install boost", I am
> getting a warning shown below;
>
> Warning: You are using macOS 11.0.
>
> We do not provide support for this released but not yet supported version.
>
> You will encounter build failures with some formulae.
>
> Please create pull requests instead of asking for help on Homebrew's
> GitHub,
>
> Twitter or any other official channels. You are responsible for resolving
>
> any issues you experience while you are running this
>
> released but not yet supported version.
>
> Ultimately when I complete the installation of QuantLib-Python, I am not
> able to run my valuations in Python as I am getting an error message that
> "No module named 'QuantLib'". Could this be caused by the warning message
> above? I have researched this error and it seems that the upgrade has not
> happened yet to cater for the macOS Big Sur version 11.0.1 upgrade. If this
> is the issue, how can this be resolved or maybe I have to wait until
> the upgrade happens?
>
> Kind regards,
>
> Ngoni
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Ngonidzashe F. <ngo...@gm...> - 2020-11-24 17:15:18
|
Hi QuantLib Users, Apple recently upgraded its software to macOS Big Sur version 11.0.1 and when I try to install Boost in terminal using "brew install boost", I am getting a warning shown below; Warning: You are using macOS 11.0. We do not provide support for this released but not yet supported version. You will encounter build failures with some formulae. Please create pull requests instead of asking for help on Homebrew's GitHub, Twitter or any other official channels. You are responsible for resolving any issues you experience while you are running this released but not yet supported version. Ultimately when I complete the installation of QuantLib-Python, I am not able to run my valuations in Python as I am getting an error message that "No module named 'QuantLib'". Could this be caused by the warning message above? I have researched this error and it seems that the upgrade has not happened yet to cater for the macOS Big Sur version 11.0.1 upgrade. If this is the issue, how can this be resolved or maybe I have to wait until the upgrade happens? Kind regards, Ngoni |
|
From: Daniel L. <dan...@gm...> - 2020-11-24 15:38:39
|
Thanks Jack for mentioning the dir() function. I was looking for something similar for long. On Tue, 24 Nov 2020 at 19:34, Jack G <jac...@gm...> wrote: > Just to confirm, this method is exposed in python: > > [image: image.png] > > I have found a very useful tool in python is the dir() function... if you > call this on a ql class it will tell you everything that is available from > it as an option - eg. below (easier full screen of course...) > > [image: image.png] > > On Tue, Nov 24, 2020 at 9:33 PM Francois Botha <ig...@gm...> wrote: > >> I'm not very familiar with the Python interface, but I do believe the >> original C++ Schedule class has previousDate and nextDate methods. My guess >> would be that they are available in Python too. >> >> regards >> Francois Botha >> >> >> On Tue, 24 Nov 2020 at 15:27, Daniel Lobo <dan...@gm...> >> wrote: >> >>> Hi, >>> >>> Let assume I have below parameters for some instrument - >>> >>> import QuantLib as ql >>> >>> risk_free_rate = 0.01 >>> day_count = ql.Actual365Fixed() >>> calendar = ql.UnitedStates() >>> calculation_date = ql.Date(1, 9, 2019) >>> settle_date = calendar.advance(calculation_date, 5, ql.Days) >>> maturity_date = calendar.advance(settle_date, 10, ql.Years) >>> >>> schedule = ql.Schedule(settle_date, maturity_date, ql.Period(6, >>> ql.Months), calendar, ql.ModifiedFollowing, ql.ModifiedFollowing, >>> ql.DateGeneration.Forward, False) >>> >>> Now let say I am given some arbitrary date >>> >>> some_date = ql.Date(7, 11, 2019) >>> >>> With this, is there any direct way to find the next pricing date from >>> the schedule object? >>> >>> >>> _______________________________________________ >>> 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: Jack G <jac...@gm...> - 2020-11-24 14:04:34
|
Just to confirm, this method is exposed in python: [image: image.png] I have found a very useful tool in python is the dir() function... if you call this on a ql class it will tell you everything that is available from it as an option - eg. below (easier full screen of course...) [image: image.png] On Tue, Nov 24, 2020 at 9:33 PM Francois Botha <ig...@gm...> wrote: > I'm not very familiar with the Python interface, but I do believe the > original C++ Schedule class has previousDate and nextDate methods. My guess > would be that they are available in Python too. > > regards > Francois Botha > > > On Tue, 24 Nov 2020 at 15:27, Daniel Lobo <dan...@gm...> wrote: > >> Hi, >> >> Let assume I have below parameters for some instrument - >> >> import QuantLib as ql >> >> risk_free_rate = 0.01 >> day_count = ql.Actual365Fixed() >> calendar = ql.UnitedStates() >> calculation_date = ql.Date(1, 9, 2019) >> settle_date = calendar.advance(calculation_date, 5, ql.Days) >> maturity_date = calendar.advance(settle_date, 10, ql.Years) >> >> schedule = ql.Schedule(settle_date, maturity_date, ql.Period(6, >> ql.Months), calendar, ql.ModifiedFollowing, ql.ModifiedFollowing, >> ql.DateGeneration.Forward, False) >> >> Now let say I am given some arbitrary date >> >> some_date = ql.Date(7, 11, 2019) >> >> With this, is there any direct way to find the next pricing date from >> the schedule object? >> >> >> _______________________________________________ >> 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-11-24 13:32:45
|
I'm not very familiar with the Python interface, but I do believe the original C++ Schedule class has previousDate and nextDate methods. My guess would be that they are available in Python too. regards Francois Botha On Tue, 24 Nov 2020 at 15:27, Daniel Lobo <dan...@gm...> wrote: > Hi, > > Let assume I have below parameters for some instrument - > > import QuantLib as ql > > risk_free_rate = 0.01 > day_count = ql.Actual365Fixed() > calendar = ql.UnitedStates() > calculation_date = ql.Date(1, 9, 2019) > settle_date = calendar.advance(calculation_date, 5, ql.Days) > maturity_date = calendar.advance(settle_date, 10, ql.Years) > > schedule = ql.Schedule(settle_date, maturity_date, ql.Period(6, > ql.Months), calendar, ql.ModifiedFollowing, ql.ModifiedFollowing, > ql.DateGeneration.Forward, False) > > Now let say I am given some arbitrary date > > some_date = ql.Date(7, 11, 2019) > > With this, is there any direct way to find the next pricing date from > the schedule object? > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Daniel L. <dan...@gm...> - 2020-11-24 13:25:32
|
Hi, Let assume I have below parameters for some instrument - import QuantLib as ql risk_free_rate = 0.01 day_count = ql.Actual365Fixed() calendar = ql.UnitedStates() calculation_date = ql.Date(1, 9, 2019) settle_date = calendar.advance(calculation_date, 5, ql.Days) maturity_date = calendar.advance(settle_date, 10, ql.Years) schedule = ql.Schedule(settle_date, maturity_date, ql.Period(6, ql.Months), calendar, ql.ModifiedFollowing, ql.ModifiedFollowing, ql.DateGeneration.Forward, False) Now let say I am given some arbitrary date some_date = ql.Date(7, 11, 2019) With this, is there any direct way to find the next pricing date from the schedule object? |
|
From: Peter C. <pca...@gm...> - 2020-11-24 11:40:53
|
When using Null<Real>() keep in mind this is defined as std::numeric_limits<float>::max)(), i.e. it is just a valid (yet big) number. So e.g. std::log(Null<Real>()) = 88.7 and not Null<Real>() like you would expect from NAN. For some use cases you might also consider boost::optional<double>. On Mon, 23 Nov 2020 at 19:56, <da...@el...> wrote: > > Thanks for coming back on this Matthias. > > Seems QL_NULL_REAL could be just what I am after. > > Best, > > David > > > > > > From: mat...@gm... <mat...@gm...> > Sent: Monday, 23 November 2020 18:18 > To: da...@el...; qua...@li... > Subject: RE: [Quantlib-users] Using NaN in Quantlib > > > > Hi David, > > > > Because of (c), I assume you are talking about the C++ version of QuantLib. > > > > There is, for example, this: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/utilities/null.hpp#L76 > > Referencing: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/qldefines.hpp#L181 > > > > I see there is also https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/math/matrixutilities/sparsematrix.hpp#L68 > > Maybe a similar wrapper for something like vector_sparse.hpp in boost/uBLAS could also work (better) for your use case? > > > > Best regards, > > Matthias > > > > > > From: da...@el... <da...@el...> > Sent: Monday, 23 November 2020 18:25 > To: qua...@li... > Subject: [Quantlib-users] Using NaN in Quantlib > > > > Hi, hope everyone is well. > > > > A simple question: does QuantLib define NaN somewhere? I have a sparse QuantLib::Array and want to set un-used elements to NaN so I can see which elements are valid and which aren’t. > > a) Is there any conceptual problem with this? > b) how do I set a Real to NaN in QL? > c) should I be using a std::vector instead, which could hold a pair<bool,Real> with the bool used to denote a valid value? > > > > > Thanks > > David Sansom > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Brian S. <bri...@gm...> - 2020-11-24 09:50:25
|
Many thanks.
I just have one quick question. What the option 'SimpleThenCompounded'
signifies? Is it something like - if the time difference between start
and end date is less than one year then use Simple otherwise
Compounded?
Regards,
On Mon, 23 Nov 2020 at 15:42, David Duarte <nh...@gm...> wrote:
>
> Hi,
>
> First, the ZeroCurve constructor already expects continuously compounded rates (and uses linear interpolation), so if you just define it as:
>
> spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar)
>
> you will get the right result.
>
> Second, the way you are inputting the conventions is not correct. The alternatives for the compounding are:
>
> - Simple
> - Compounded
> - Continuous
> - SimpleThenCompounded
>
> These "objects" in python actually just return an int. To see what I mean, try:
>
> print(Simple, Compounded, Continuous, SimpleThenCompounded)
> # 0 1 2 3
>
> If you specify Compounded, you can then specify the frequency: Annual, Semiannual, etc (these frequencies also just return an int)
>
> So you where actually building a curve with semiannually compounded rates, and that's why your calculations were off
>
> You were building the curve as (Compounded = 1, Semiannual = 2):
>
> spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar, interpolation, Compounded, Semiannual)
>
> when what you wanted was (Continuous = 2):
>
> spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar, interpolation, Continuous)
>
> Hope this helps
> David
>
>
>
> On Sun, 22 Nov 2020 at 21:22, Brian Smith <bri...@gm...> wrote:
>>
>> Hi,
>>
>> I use QL to calculate the Rate of Interest between 2 forward dates as below -
>>
>> from QuantLib import *
>> import math
>>
>> # Settings
>> todaysDate = Date(1, 9, 2019)
>> Settings.instance().evaluationDate = todaysDate
>> dayCount = Actual365Fixed()
>> calendar = Canada()
>> interpolation = Linear()
>> compounding = Compounded
>> compoundingFrequency = Continuous
>>
>> # Definitions
>> spotDates = [todaysDate, todaysDate + Period("1y"), todaysDate +
>> Period("2y"), todaysDate + Period("3y")]
>> spotRates = [0, 0.066682, 0.067199, 0.067502]
>>
>> spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar,
>> interpolation, compounding, compoundingFrequency)
>> spotCurveHandle = YieldTermStructureHandle(spotCurve)
>>
>> spotCurveHandle.forwardRate(spotDates[1], spotDates[2], dayCount,
>> Continuous).rate() # Forward rate
>> # 0.06659636746440421
>>
>> However when I manually calculate the same, I see visible difference -
>> math.log(math.exp(spotRates[2] * dayCount.yearFraction(todaysDate,
>> spotDates[2])) / math.exp(spotRates[1] *
>> dayCount.yearFraction(todaysDate, spotDates[1]))) /
>> dayCount.yearFraction(spotDates[1], spotDates[2])
>>
>> #0.06771741643835603
>>
>> Can you please help me to understand what actually attributes that
>> difference between QL's number and my calculation?
>>
>>
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Luigi B. <lui...@gm...> - 2020-11-24 08:14:59
|
Nathaniel,
I second Jack's suggestion to use "pip install QuantLib".
Anyway: the error you're getting (can't find the library) suggest that
either:
- you didn't compile QuantLib, which is unlikely but I'll list it for
completeness;
- there's a mismatch, such as if the library was compiled in Debug
configuration and the wrappers are being compiled in Release, or 32-bits vs
64-bits;
- the library path for the compiler doesn't include the location where the
library is.
Hope this helps,
Luigi
On Tue, Nov 24, 2020 at 7:10 AM Jack G <jac...@gm...> wrote:
> Hi Nathaniel,
>
> Is your use case just to use QuantLib in python? In that case, a simple
> 'pip install QuantLib' should get you the most recent release.
>
> If you want to build it from source in Windows but *don't* plan to develop
> the C++ source code in VS, (ie. if you are just using visual studio as a
> compiler), would you consider building inside s Windows docker container
> running Linux and a jupyter server instead? If you do that we can
> completely control the environment inside your container and help you debug
> the precise problem.
>
> Sorry if I've missed what you're trying to do here.
>
> Best,
> Jack
>
>
> On Tue, 24 Nov 2020, 02:57 Nathaniel Liffick, <na...@co...> wrote:
>
>> Hello All,
>>
>>
>>
>> My name is Nathaniel Liffick.
>>
>>
>>
>> Hope everyone is staying safe during this time.
>>
>>
>>
>> I am trying to install QuantLib-Python for windows, however, I keep
>> getting a fatal error when trying to build and install QuantLib. The fatal
>> error is attached. If anyone can provide guidance that would be great. I
>> have tried everything, uninstall visual studios to try to get visual
>> studios 14 alone but Microsoft automatically installs the newest version of
>> it and when I try to install Build tools 2015 it reverts back to 2019.
>>
>>
>>
>> Also to note, I use Anaconda and Jupyter notebook which the library
>> install was successful however when trying import QuantLib as ql it fails
>> and gives the error Module not found.
>>
>>
>>
>> Any information would be great, thank you community.
>>
>>
>>
>> Best Regards,
>>
>>
>>
>> Nathaniel Liffick
>>
>>
>> _______________________________________________
>> 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: Jack G <jac...@gm...> - 2020-11-24 06:06:53
|
Hi Nathaniel, Is your use case just to use QuantLib in python? In that case, a simple 'pip install QuantLib' should get you the most recent release. If you want to build it from source in Windows but *don't* plan to develop the C++ source code in VS, (ie. if you are just using visual studio as a compiler), would you consider building inside s Windows docker container running Linux and a jupyter server instead? If you do that we can completely control the environment inside your container and help you debug the precise problem. Sorry if I've missed what you're trying to do here. Best, Jack On Tue, 24 Nov 2020, 02:57 Nathaniel Liffick, <na...@co...> wrote: > Hello All, > > > > My name is Nathaniel Liffick. > > > > Hope everyone is staying safe during this time. > > > > I am trying to install QuantLib-Python for windows, however, I keep > getting a fatal error when trying to build and install QuantLib. The fatal > error is attached. If anyone can provide guidance that would be great. I > have tried everything, uninstall visual studios to try to get visual > studios 14 alone but Microsoft automatically installs the newest version of > it and when I try to install Build tools 2015 it reverts back to 2019. > > > > Also to note, I use Anaconda and Jupyter notebook which the library > install was successful however when trying import QuantLib as ql it fails > and gives the error Module not found. > > > > Any information would be great, thank you community. > > > > Best Regards, > > > > Nathaniel Liffick > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Tom A. <tw...@ur...> - 2020-11-23 23:49:46
|
On Mon, 23 Nov 2020, da...@el... wrote:
> Thanks for coming back on this Matthias.
>
> Seems QL_NULL_REAL could be just what I am after.
Or an instance of a more general method:
Real x = Null<Real>();
The point being that you can write the same thing but for other types, eg
i think this is meaningful:
Date d = Null<Date>();
If you really just want a NaN, you can also write std::nan(""); no need to
involve QuantLib there.
tom
> From: mat...@gm... <mat...@gm...>
> Sent: Monday, 23 November 2020 18:18
> To: da...@el...; qua...@li...
> Subject: RE: [Quantlib-users] Using NaN in Quantlib
>
>
>
> Hi David,
>
>
>
> Because of (c), I assume you are talking about the C++ version of QuantLib.
>
>
>
> There is, for example, this: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/utilities/null.hpp#L76
>
> Referencing: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/qldefines.hpp#L181
>
>
>
> I see there is also https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/math/matrixutilities/sparsematrix.hpp#L68
>
> Maybe a similar wrapper for something like vector_sparse.hpp in boost/uBLAS could also work (better) for your use case?
>
>
>
> Best regards,
>
> Matthias
>
>
>
>
>
> From: da...@el... <mailto:da...@el...> <da...@el... <mailto:da...@el...> >
> Sent: Monday, 23 November 2020 18:25
> To: qua...@li... <mailto:qua...@li...>
> Subject: [Quantlib-users] Using NaN in Quantlib
>
>
>
> Hi, hope everyone is well.
>
>
>
> A simple question: does QuantLib define NaN somewhere? I have a sparse QuantLib::Array and want to set un-used elements to NaN so I can see which elements are valid and which aren’t.
>
> a) Is there any conceptual problem with this?
> b) how do I set a Real to NaN in QL?
> c) should I be using a std::vector instead, which could hold a pair<bool,Real> with the bool used to denote a valid value?
>
>
>
>
> Thanks
>
> David Sansom
>
>
--
I wish I had a cool hobby but I don't care about anything, anyway good
job. -- IceWizard9000 |
|
From: Nathaniel L. <na...@co...> - 2020-11-23 18:57:36
|
Hello All, My name is Nathaniel Liffick. Hope everyone is staying safe during this time. I am trying to install QuantLib-Python for windows, however, I keep getting a fatal error when trying to build and install QuantLib. The fatal error is attached. If anyone can provide guidance that would be great. I have tried everything, uninstall visual studios to try to get visual studios 14 alone but Microsoft automatically installs the newest version of it and when I try to install Build tools 2015 it reverts back to 2019. Also to note, I use Anaconda and Jupyter notebook which the library install was successful however when trying import QuantLib as ql it fails and gives the error Module not found. Any information would be great, thank you community. Best Regards, Nathaniel Liffick |
|
From: <da...@el...> - 2020-11-23 18:55:32
|
Thanks for coming back on this Matthias. Seems QL_NULL_REAL could be just what I am after. Best, David From: mat...@gm... <mat...@gm...> Sent: Monday, 23 November 2020 18:18 To: da...@el...; qua...@li... Subject: RE: [Quantlib-users] Using NaN in Quantlib Hi David, Because of (c), I assume you are talking about the C++ version of QuantLib. There is, for example, this: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/utilities/null.hpp#L76 Referencing: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/qldefines.hpp#L181 I see there is also https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/math/matrixutilities/sparsematrix.hpp#L68 Maybe a similar wrapper for something like vector_sparse.hpp in boost/uBLAS could also work (better) for your use case? Best regards, Matthias From: da...@el... <mailto:da...@el...> <da...@el... <mailto:da...@el...> > Sent: Monday, 23 November 2020 18:25 To: qua...@li... <mailto:qua...@li...> Subject: [Quantlib-users] Using NaN in Quantlib Hi, hope everyone is well. A simple question: does QuantLib define NaN somewhere? I have a sparse QuantLib::Array and want to set un-used elements to NaN so I can see which elements are valid and which aren’t. a) Is there any conceptual problem with this? b) how do I set a Real to NaN in QL? c) should I be using a std::vector instead, which could hold a pair<bool,Real> with the bool used to denote a valid value? Thanks David Sansom |
|
From: <mat...@gm...> - 2020-11-23 18:18:01
|
Hi David, Because of (c), I assume you are talking about the C++ version of QuantLib. There is, for example, this: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/utilities/null.hpp#L76 Referencing: https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/qldefines.hpp#L181 I see there is also https://github.com/lballabio/QuantLib/blob/60afa352713bac2b759332686ed3070d357cfde8/ql/math/matrixutilities/sparsematrix.hpp#L68 Maybe a similar wrapper for something like vector_sparse.hpp in boost/uBLAS could also work (better) for your use case? Best regards, Matthias From: da...@el... <da...@el...> Sent: Monday, 23 November 2020 18:25 To: qua...@li... Subject: [Quantlib-users] Using NaN in Quantlib Hi, hope everyone is well. A simple question: does QuantLib define NaN somewhere? I have a sparse QuantLib::Array and want to set un-used elements to NaN so I can see which elements are valid and which aren’t. a) Is there any conceptual problem with this? b) how do I set a Real to NaN in QL? c) should I be using a std::vector instead, which could hold a pair<bool,Real> with the bool used to denote a valid value? Thanks David Sansom |
|
From: <da...@el...> - 2020-11-23 17:25:42
|
Hi, hope everyone is well. A simple question: does QuantLib define NaN somewhere? I have a sparse QuantLib::Array and want to set un-used elements to NaN so I can see which elements are valid and which aren't. a) Is there any conceptual problem with this? b) how do I set a Real to NaN in QL? c) should I be using a std::vector instead, which could hold a pair<bool,Real> with the bool used to denote a valid value? Thanks David Sansom |