You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(23) |
| 2002 |
Jan
(18) |
Feb
(20) |
Mar
(22) |
Apr
(41) |
May
(28) |
Jun
(25) |
Jul
(10) |
Aug
(7) |
Sep
(5) |
Oct
(20) |
Nov
(13) |
Dec
(11) |
| 2003 |
Jan
(28) |
Feb
(5) |
Mar
(6) |
Apr
(5) |
May
(17) |
Jun
(6) |
Jul
(45) |
Aug
(35) |
Sep
(24) |
Oct
(50) |
Nov
(53) |
Dec
(6) |
| 2004 |
Jan
(4) |
Feb
(10) |
Mar
(52) |
Apr
(46) |
May
(8) |
Jun
(25) |
Jul
(12) |
Aug
(6) |
Sep
(8) |
Oct
(8) |
Nov
(9) |
Dec
(7) |
| 2005 |
Jan
(18) |
Feb
(60) |
Mar
(19) |
Apr
(26) |
May
(14) |
Jun
(27) |
Jul
(8) |
Aug
(15) |
Sep
(19) |
Oct
(53) |
Nov
(20) |
Dec
(23) |
| 2006 |
Jan
(16) |
Feb
(27) |
Mar
(33) |
Apr
(51) |
May
(36) |
Jun
(25) |
Jul
(54) |
Aug
(30) |
Sep
(25) |
Oct
(67) |
Nov
(43) |
Dec
(13) |
| 2007 |
Jan
(23) |
Feb
(27) |
Mar
(55) |
Apr
(79) |
May
(60) |
Jun
(66) |
Jul
(46) |
Aug
(30) |
Sep
(90) |
Oct
(49) |
Nov
(85) |
Dec
(74) |
| 2008 |
Jan
(68) |
Feb
(59) |
Mar
(64) |
Apr
(28) |
May
(66) |
Jun
(35) |
Jul
(73) |
Aug
(76) |
Sep
(65) |
Oct
(46) |
Nov
(41) |
Dec
(19) |
| 2009 |
Jan
(46) |
Feb
(90) |
Mar
(51) |
Apr
(104) |
May
(13) |
Jun
(24) |
Jul
(20) |
Aug
(39) |
Sep
(109) |
Oct
(101) |
Nov
(117) |
Dec
(57) |
| 2010 |
Jan
(55) |
Feb
(42) |
Mar
(39) |
Apr
(22) |
May
(33) |
Jun
(41) |
Jul
(25) |
Aug
(52) |
Sep
(75) |
Oct
(60) |
Nov
(62) |
Dec
(52) |
| 2011 |
Jan
(70) |
Feb
(31) |
Mar
(26) |
Apr
(28) |
May
(17) |
Jun
(38) |
Jul
(51) |
Aug
(35) |
Sep
(27) |
Oct
(35) |
Nov
(10) |
Dec
(20) |
| 2012 |
Jan
(21) |
Feb
(29) |
Mar
(13) |
Apr
(37) |
May
(33) |
Jun
(12) |
Jul
(34) |
Aug
(27) |
Sep
(29) |
Oct
(35) |
Nov
(58) |
Dec
(27) |
| 2013 |
Jan
(27) |
Feb
(16) |
Mar
(40) |
Apr
(16) |
May
(34) |
Jun
(37) |
Jul
(6) |
Aug
(3) |
Sep
(4) |
Oct
(49) |
Nov
(13) |
Dec
(12) |
| 2014 |
Jan
(15) |
Feb
(21) |
Mar
(11) |
Apr
(13) |
May
(27) |
Jun
(60) |
Jul
(19) |
Aug
(29) |
Sep
(20) |
Oct
(28) |
Nov
(41) |
Dec
(15) |
| 2015 |
Jan
(33) |
Feb
(29) |
Mar
(26) |
Apr
(17) |
May
(2) |
Jun
(13) |
Jul
(21) |
Aug
(30) |
Sep
(22) |
Oct
(15) |
Nov
(46) |
Dec
(20) |
| 2016 |
Jan
(6) |
Feb
(5) |
Mar
(9) |
Apr
(15) |
May
(9) |
Jun
(4) |
Jul
(3) |
Aug
(4) |
Sep
(39) |
Oct
(8) |
Nov
(5) |
Dec
(8) |
| 2017 |
Jan
(4) |
Feb
(14) |
Mar
(4) |
Apr
(16) |
May
(5) |
Jun
(10) |
Jul
(25) |
Aug
(2) |
Sep
(5) |
Oct
(11) |
Nov
(8) |
Dec
(11) |
| 2018 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
(1) |
May
(4) |
Jun
(21) |
Jul
(8) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(5) |
Mar
(18) |
Apr
(9) |
May
(5) |
Jun
(21) |
Jul
(25) |
Aug
(25) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
(5) |
| 2020 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
|
| 2021 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(5) |
| 2022 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
(14) |
Nov
|
Dec
(1) |
| 2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(2) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
| 2024 |
Jan
(8) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(1) |
| 2025 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2026 |
Jan
(1) |
Feb
(12) |
Mar
|
Apr
(2) |
May
(8) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Cheng L. <scr...@gm...> - 2015-02-11 02:58:17
|
Hi peter, Me too. If I compiled your adjoint branch with -O3 and then compiled your ad example with -O3 -std=c++11, the error raised up...(the same segmentation fault) However if I compiled ad example with only -std=c++11, then no error occurs. I don't know why... Regards, Cheng -----邮件原件----- 发件人: Peter Caspers [mailto:pca...@gm...] 发送时间: 2015年2月11日 3:58 收件人: QuantLib Mailing Lists 主题: [Quantlib-dev] segmentation fault in boost ? Hi, when compiling QL without -std=c++11, then an application (e.g. one of the examples) _with_ -std=c++11, I get the following weird error even before the first instruction in main was executed ==19902== Memcheck, a memory error detector ==19902== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==19902== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==19902== Command: ./adjoint ==19902== ==19902== ==19902== Process terminating with default action of signal 11 (SIGSEGV) ==19902== Bad permissions for mapped region at address 0x4DC608 ==19902== at 0x540F054: long double boost::math::lanczos::lanczos17m64::lanczos_sum<long double>(long double const&) (in /home/peter/quantlib/QuantLib/ql/.libs/libQuantLib.so.0.0.0) ==19902== by 0x540F121: boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64 , long double>::init::init() (lanczos.hpp:49) ==19902== by 0x5257E26: __static_initialization_and_destruction_0 (lanczos.hpp:64) ==19902== by 0x5257E26: _GLOBAL__sub_I_gaussianlhplossmodel.cpp (gaussianlhplossmodel.cpp:202) ==19902== by 0x400F855: call_init.part.0 (dl-init.c:84) ==19902== by 0x400F90F: call_init (dl-init.c:55) ==19902== by 0x400F90F: _dl_init (dl-init.c:133) ==19902== by 0x4001669: ??? (in /lib/x86_64-linux-gnu/ld-2.17.so) ==19902== ==19902== HEAP SUMMARY: ==19902== in use at exit: 4,316 bytes in 7 blocks ==19902== total heap usage: 8 allocs, 1 frees, 37,132 bytes allocated ==19902== ==19902== LEAK SUMMARY: ==19902== definitely lost: 0 bytes in 0 blocks ==19902== indirectly lost: 0 bytes in 0 blocks ==19902== possibly lost: 148 bytes in 2 blocks ==19902== still reachable: 4,168 bytes in 5 blocks ==19902== suppressed: 0 bytes in 0 blocks ==19902== Rerun with --leak-check=full to see details of leaked memory ==19902== ==19902== For counts of detected and suppressed errors, rerun with: -v ==19902== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Anyone observed this too ? Drove me crazy until I realized the pattern. What is behind ? The other way around (QL with c++11, example without) works fine. Produced with gcc 4.9.1, boost 1.57.0 under Ubuntu. Thanks Peter ---------------------------------------------------------------------------- -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-dev mailing list Qua...@li... https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Peter C. <pca...@gm...> - 2015-02-10 19:58:27
|
Hi, when compiling QL without -std=c++11, then an application (e.g. one of the examples) _with_ -std=c++11, I get the following weird error even before the first instruction in main was executed ==19902== Memcheck, a memory error detector ==19902== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==19902== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==19902== Command: ./adjoint ==19902== ==19902== ==19902== Process terminating with default action of signal 11 (SIGSEGV) ==19902== Bad permissions for mapped region at address 0x4DC608 ==19902== at 0x540F054: long double boost::math::lanczos::lanczos17m64::lanczos_sum<long double>(long double const&) (in /home/peter/quantlib/QuantLib/ql/.libs/libQuantLib.so.0.0.0) ==19902== by 0x540F121: boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() (lanczos.hpp:49) ==19902== by 0x5257E26: __static_initialization_and_destruction_0 (lanczos.hpp:64) ==19902== by 0x5257E26: _GLOBAL__sub_I_gaussianlhplossmodel.cpp (gaussianlhplossmodel.cpp:202) ==19902== by 0x400F855: call_init.part.0 (dl-init.c:84) ==19902== by 0x400F90F: call_init (dl-init.c:55) ==19902== by 0x400F90F: _dl_init (dl-init.c:133) ==19902== by 0x4001669: ??? (in /lib/x86_64-linux-gnu/ld-2.17.so) ==19902== ==19902== HEAP SUMMARY: ==19902== in use at exit: 4,316 bytes in 7 blocks ==19902== total heap usage: 8 allocs, 1 frees, 37,132 bytes allocated ==19902== ==19902== LEAK SUMMARY: ==19902== definitely lost: 0 bytes in 0 blocks ==19902== indirectly lost: 0 bytes in 0 blocks ==19902== possibly lost: 148 bytes in 2 blocks ==19902== still reachable: 4,168 bytes in 5 blocks ==19902== suppressed: 0 bytes in 0 blocks ==19902== Rerun with --leak-check=full to see details of leaked memory ==19902== ==19902== For counts of detected and suppressed errors, rerun with: -v ==19902== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Anyone observed this too ? Drove me crazy until I realized the pattern. What is behind ? The other way around (QL with c++11, example without) works fine. Produced with gcc 4.9.1, boost 1.57.0 under Ubuntu. Thanks Peter |
|
From: Alexander S. <so...@co...> - 2015-02-10 18:23:37
|
Hi Peter: Thank you for your comments! I think even if manage to integrate AD into the master branch without the disruption of switching to a headers-only QuantLib or massive code changes, and only lose 20-30 percent in performance relative to the optimal assignment of Real vs. double inside each class, it would already be a good result. But I believe the impact in Release mode can be reduced even further by optimizing arithmetic operations that involve AD<double> objects with null tape pointer. We will run performance tests as soon as the conversion is finished. I hope for a less than 20% impact overall once all optimizations are done. Also, if we are comparing to the template based approach, it seems that the optimal assignment of Real vs. double cannot be done purely at the level of the entire class. For example, among multiple parameters that a method takes, depending on how it is used, some may have to be AD<double> and others have to be double. And of course it is not desirable if the code has to be recompiled with different template arguments for every mode of use. It is not clear if the perfect assignment of AD<double> vs double can be achieved in a way that does not compromise convenience for the end user. One more comment - because Luigi, Ferdinando & Co not only had the foresight to introduce Real, but also introduced Time as distinct from Real (which for now I decided to keep as double), we can avoid using AD variables for anything related to the times, schedules, etc. This is a large chunk of the code that will not be using AD<double> needlessly. So overall I am hopeful that the approach will prove viable. Best regards Alex -----Original Message----- From: Peter Caspers [mailto:pca...@gm...] Sent: Tuesday, February 10, 2015 12:49 PM To: Alexander Sokol Cc: QuantLib Mailing Lists Subject: Re: [Quantlib-dev] Adjoint Greeks Hi Alexander, I agree with most of your points. With the typedef-approach we surely have less code changes. Also it will be easy to merge them into the original code. What I am not sure about is how to address the performance loss in parts of your application where you do not need AD. Using AD<double> (naively) instead of double slows down my vanilla swap example by 20 - 30 percent. Is that connected to your comment about the AD-specific optimizations needed later on ? Can you be more specific on this part in general maybe ? Concerning your CppAD patch, I did not look into it, but it sounds similar to what I saw when implementing the Null<AD<Base>> class. With templates it's easy to get a clean solution though. A dependency on a patch for an AD framework would not be very nice in my opinion. Well let's see. In any case it will be nice to compare both approaches once working for real life problems, won't it. Best regards Peter |
|
From: Peter C. <pca...@gm...> - 2015-02-10 17:59:56
|
Hi Alexander, I agree with most of your points. With the typedef-approach we surely have less code changes. Also it will be easy to merge them into the original code. What I am not sure about is how to address the performance loss in parts of your application where you do not need AD. Using AD<double> (naively) instead of double slows down my vanilla swap example by 20 - 30 percent. Is that connected to your comment about the AD-specific optimizations needed later on ? Can you be more specific on this part in general maybe ? Concerning your CppAD patch, I did not look into it, but it sounds similar to what I saw when implementing the Null<AD<Base>> class. With templates it's easy to get a clean solution though. A dependency on a patch for an AD framework would not be very nice in my opinion. Well let's see. In any case it will be nice to compare both approaches once working for real life problems, won't it. Best regards Peter On 9 February 2015 at 18:14, Alexander Sokol <so...@co...> wrote: > Peter, Luigi, Ferdinando: > > I am a bit late joining this discussion. I believe the approach > of choosing AD vs. non-AD mode globally at compile time that > you have discussed in the two messages quoted below may on the > balance be the best choice for a large scale C++ library such as > QuantLib. If we try to templatize nearly every class, in addition > to the obscure compiler warning problems noted by Peter we will > also see a major impact on compilation time, because a lot of > the code will recompile the moment we touch any class. Also, as > everyone noted earlier, this is not possible to do without a major > overhaul of the entire code (turning a lot of .cpp files to .hpp headers > and touching a lot of lines of code). > > Also, if the ultimate goal is to be able to select which type is using > AD<double> and which type uses double, it may turn out that in > the end the only two settings that will compile will be all-AD or > no-AD settings, and the intermediate combinations will be hard > to make compile and work. > > On the other hand, if we simply typedef Real to AD<double> > (for CppAD) or adouble (for ADOL-C), and also ensure that a > variable which has no tape pointer in it simply uses the internal > double, then C++ inlining will likely reduce any performance > impact. The advantage, as noted earlier in this thread, is that > this can be done with minimal changes to the code base and > hopefully can then be pulled into the master branch under > a compile time define. > > Thanks to the great wisdom in using Real from the very > beginning, this worked well without massive code changes. > When I did the replacement and hit compile, it was about > 150,000 line of C++ compiler errors (some lines of code > were generating many lines of errors). After some tweaking > which I committed to GitHub step by step, we are down to > about 1000 errors and I do not see any major showstoppers > in completing the conversion in a short period of time. > > For now I defined all variables as AD<double> except Time, > but changed durations from Time to Real. I am currently > trying to see if we should bite the bullet and use Real for Time > as well, so we only have one type of double within the system. > > My code is in the following repos (expect rapid changes): > > Fork of Luigi's master, branch master-adjoint with changes: > https://github.com/compatibl/quantlib/commits/master-adjoint > > Dependencies including a customized version of CppAD: > https://github.com/compatibl/quantlib-dependencies > > To compile in adjoint mode, define QL_AD and put > dependencies\cpp in the include path. > > Note that I had to make a minor change to CppAD. > This change to CppAD is in dependencies, so only this > version of CppAD wil work for now. > > If I do not manage to find a workaround will ask Brad Bell > to pull my modification under a compile time define. It has > to do with a constructor of AD<double> from another type > with cast to double, which superseded the conversion we > needed for InterestRate to AD<double>. See commit log > for details. > > I will keep posting to this thread as we progress on this. > > Please let me know any comments, and please contact > me if you wish to contribute to further development of > this alternative approach, or use this repo. After the code > compiles and runs, only then the real work will begin > because the code will require considerable amount of > AD-specific optimizations to outperform the brute force > approach. But I am optimistic that it can be done with > QuantLib. > > Best regards > Alexander Sokol > CompatibL > >> On Sun, Jan 11, 2015 at 7:16am, Luigi Ballabio wrote: >> >> Hi Peter, >> you definitely need both double and CppAD<double>. I was wondering >> if you needed a given engine if both adjoint and not-adjoint >> implementation. >> If not, you might choose at compile time. Otherwise, we'd have to bite >> the bullet and templatize lots of stuff, as you're doing already. >> >> Luigi >> >> On Thu, Jan 8, 2015 at 8:56 PM, Peter Caspers wrote: >> >> I thought in a realistic application you would always need both >> worlds, CppAD<double> for adjoint greek engines and double for all the >> rest. I wonder what it would mean in terms of performance and memory >> if you replace double by CppAD<double> in general. I can maybe just >> stress test this a bit though. >> Peter > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/Adjoint-Greeks-tp16147p16251.html > Sent from the quantlib-dev mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Luigi B. <lui...@gm...> - 2015-02-10 10:02:19
|
QuantLib is a cross-platform, free/open-source quantitative finance C++ library for modeling, pricing, trading, and risk management in real-life. Version 1.5 has been released and is available for download at < http://quantlib.org/download.shtml>. Please log any problems you have with this release in the SourceForge bug tracker at <http://sourceforge.net/tracker/?group_id=12740&atid=112740> specifying that you're using QuantLib 1.5. The QuantLib group |
|
From: Alexander S. <so...@co...> - 2015-02-09 17:37:17
|
Peter, Luigi, Ferdinando:
I am a bit late joining this discussion. I believe the approach
of choosing AD vs. non-AD mode globally at compile time that
you have discussed in the two messages quoted below may on the
balance be the best choice for a large scale C++ library such as
QuantLib. If we try to templatize nearly every class, in addition
to the obscure compiler warning problems noted by Peter we will
also see a major impact on compilation time, because a lot of
the code will recompile the moment we touch any class. Also, as
everyone noted earlier, this is not possible to do without a major
overhaul of the entire code (turning a lot of .cpp files to .hpp headers
and touching a lot of lines of code).
Also, if the ultimate goal is to be able to select which type is using
AD<double> and which type uses double, it may turn out that in
the end the only two settings that will compile will be all-AD or
no-AD settings, and the intermediate combinations will be hard
to make compile and work.
On the other hand, if we simply typedef Real to AD<double>
(for CppAD) or adouble (for ADOL-C), and also ensure that a
variable which has no tape pointer in it simply uses the internal
double, then C++ inlining will likely reduce any performance
impact. The advantage, as noted earlier in this thread, is that
this can be done with minimal changes to the code base and
hopefully can then be pulled into the master branch under
a compile time define.
Thanks to the great wisdom in using Real from the very
beginning, this worked well without massive code changes.
When I did the replacement and hit compile, it was about
150,000 line of C++ compiler errors (some lines of code
were generating many lines of errors). After some tweaking
which I committed to GitHub step by step, we are down to
about 1000 errors and I do not see any major showstoppers
in completing the conversion in a short period of time.
For now I defined all variables as AD<double> except Time,
but changed durations from Time to Real. I am currently
trying to see if we should bite the bullet and use Real for Time
as well, so we only have one type of double within the system.
My code is in the following repos (expect rapid changes):
Fork of Luigi's master, branch master-adjoint with changes:
https://github.com/compatibl/quantlib/commits/master-adjoint
Dependencies including a customized version of CppAD:
https://github.com/compatibl/quantlib-dependencies
To compile in adjoint mode, define QL_AD and put
dependencies\cpp in the include path.
Note that I had to make a minor change to CppAD.
This change to CppAD is in dependencies, so only this
version of CppAD wil work for now.
If I do not manage to find a workaround will ask Brad Bell
to pull my modification under a compile time define. It has
to do with a constructor of AD<double> from another type
with cast to double, which superseded the conversion we
needed for InterestRate to AD<double>. See commit log
for details.
I will keep posting to this thread as we progress on this.
Please let me know any comments, and please contact
me if you wish to contribute to further development of
this alternative approach, or use this repo. After the code
compiles and runs, only then the real work will begin
because the code will require considerable amount of
AD-specific optimizations to outperform the brute force
approach. But I am optimistic that it can be done with
QuantLib.
Best regards
Alexander Sokol
CompatibL
> On Sun, Jan 11, 2015 at 7:16am, Luigi Ballabio wrote:
>
> Hi Peter,
> you definitely need both double and CppAD<double>. I was wondering
> if you needed a given engine if both adjoint and not-adjoint
> implementation.
> If not, you might choose at compile time. Otherwise, we'd have to bite
> the bullet and templatize lots of stuff, as you're doing already.
>
> Luigi
>
> On Thu, Jan 8, 2015 at 8:56 PM, Peter Caspers wrote:
>
> I thought in a realistic application you would always need both
> worlds, CppAD<double> for adjoint greek engines and double for all the
> rest. I wonder what it would mean in terms of performance and memory
> if you replace double by CppAD<double> in general. I can maybe just
> stress test this a bit though.
> Peter
--
View this message in context: http://quantlib.10058.n7.nabble.com/Adjoint-Greeks-tp16147p16251.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|
|
From: Cheng Li <scr...@gm...> - 2015-02-07 04:29:21
|
Hi Peter, Sure. It is my pleasure. I'll go on with the bonds part. Regards, Cheng 2015-02-07 5:51 GMT+08:00, Peter Caspers <pca...@gm...>: > Hi Cheng, > > great, thank you very much. Looks fine to me, I merged your changes > into my branch. Send more whenever you feel like it. > > best regards > Peter > > > On 6 February 2015 at 10:12, cheng li <scr...@gm...> wrote: >> Hi Peter, >> >> I finished the fixed rate bond part and a pull request has been raised. >> >> Any comment is welcome, Peter:) >> >> Regards, >> Cheng >> >> -----邮件原件----- >> 发件人: Peter Caspers [mailto:pca...@gm...] >> 发送时间: 2015年2月2日 20:52 >> 收件人: cheng li >> 抄送: Luigi Ballabio; QuantLib developers >> 主题: Re: 答复: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks >> >> Hi Cheng, >> >> great, I am looking forward to receive your contributions ! >> >> Kind regards >> Peter >> >> On 2 February 2015 at 02:35, cheng li <scr...@gm...> >> wrote: >>> Hi Peter, >>> >>> Thank you for the gifts for all of us. I have tried your example. It >>> looks very promising! >>> >>> Now I am following your steps and trying to make my first example. My >>> fist goal is to make FixedRateBond AD available (I am most familiar with >>> bonds part:)). >>> >>> When I finished I'll raise a pull request for that change to your trunk. >>> >>> Regards, >>> Cheng >>> >>> -----邮件原件----- >>> 发件人: Peter Caspers [mailto:pca...@gm...] >>> 发送时间: 2015年1月26日 3:06 >>> 收件人: cheng li >>> 抄送: Luigi Ballabio; QuantLib developers >>> 主题: Re: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks >>> >>> Hello, >>> >>> this weekend I have reached a level of conversion that allows to >>> tackle Vanilla Swaps. This is maybe the first "full-blown" example, so >>> if you are interested you can find some results in my blog >>> >>> http://quantlib.wordpress.com >>> >>> Comments are welcome. >>> >>> Thanks and best regards >>> Peter >>> >>> On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> >>> wrote: >>>> unlikely (the optimization level) >>>> Peter >>>> >>>> >>>> On 14 January 2015 at 02:49, cheng li <scr...@gm...> >>>> wrote: >>>>> Hi Peter, >>>>> >>>>> I'll definitely have a try. Thank you :) >>>>> >>>>> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 >>>>> setting, then everything works fine. I think my previous problem may be >>>>> due to O3. >>>>> >>>>> Regards, >>>>> Cheng >>>>> >>>>> -----邮件原件----- >>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>> 发送时间: 2015年1月13日 21:18 >>>>> 收件人: cheng li >>>>> 抄送: Luigi Ballabio; QuantLib developers >>>>> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >>>>> >>>>> I will clean up the adjoint branch to make it c++03 compliant. >>>>> Unless QuantLib 2.0 is out before the adjoint conversion has >>>>> finished :-) >>>>> >>>>> On 13 January 2015 at 02:28, cheng li <scr...@gm...> >>>>> wrote: >>>>>> Hi Luigi, >>>>>> >>>>>> >>>>>> >>>>>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch >>>>>> much >>>>>> c++ 11 stuff is used, e.g. constexpr… >>>>>> >>>>>> >>>>>> >>>>>> Regards, >>>>>> >>>>>> Cheng >>>>>> >>>>>> >>>>>> >>>>>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>>>>> 发送时间: 2015年1月12日 14:28 >>>>>> 收件人: Cheng Li >>>>>> 抄送: QuantLib developers; Peter Caspers >>>>>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>>>>> >>>>>> >>>>>> >>>>>> Don't use C++11. >>>>>> >>>>>> Luigi >>>>>> >>>>>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> >>>>>> wrote: >>>>>> >>>>>> Hi peter, >>>>>> >>>>>> I have switched to adjoint brank. However I am still facing some >>>>>> problem... >>>>>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>>>>> >>>>>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H >>>>>> -I. >>>>>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo >>>>>> -MD -MP >>>>>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>>>>> averagebmacoupon.cpp >>>>>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>>>>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>>>>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>>>>> .libs/averagebmacoupon.o In file included from >>>>>> ../../ql/patterns/observable.hpp:29:0, >>>>>> from ../../ql/event.hpp:29, >>>>>> from ../../ql/cashflow.hpp:28, >>>>>> from ../../ql/cashflows/coupon.hpp:29, >>>>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>>>> from averagebmacoupon.cpp:21: >>>>>> ../../ql/patterns/observable.hpp: In member function 'void >>>>>> QuantLib::Observable::notifyObservers()': >>>>>> ../../ql/errors.hpp:121:70: error: use of deleted function >>>>>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>>>>> >>>>>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>>>>> >>>>>> ^ >>>>>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>>>>> 'QL_ENSURE' >>>>>> QL_ENSURE(successful, >>>>>> ^ >>>>>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>>>>> QuantLib::Error&)' is implicitly deleted because the default >>>>>> definition would be ill-formed: >>>>>> class Error : public std::exception { >>>>>> ^ >>>>>> ../../ql/errors.hpp:39:11: error: use of deleted function >>>>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>>>> boost::shared_ptr<std::basic_string<char> >&)' >>>>>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>>>>> from ../../ql/errors.hpp:31, >>>>>> from ../../ql/patterns/observable.hpp:29, >>>>>> from ../../ql/event.hpp:29, >>>>>> from ../../ql/cashflow.hpp:28, >>>>>> from ../../ql/cashflows/coupon.hpp:29, >>>>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>>>> from averagebmacoupon.cpp:21: >>>>>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>>>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>>>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly >>>>>> declared as deleted because 'boost::shared_ptr<std::basic_string<char> >>>>>> >' >>>>>> declares a move constructor or move assignment operator >>>>>> >>>>>> Any idea about this? >>>>>> >>>>>> Regards, >>>>>> Cheng >>>>>> >>>>>> -----邮件原件----- >>>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>>> 发送时间: 2015年1月11日 17:34 >>>>>> 收件人: Cheng Li >>>>>> 抄送: QuantLib Mailing Lists >>>>>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>>>>> >>>>>> Hi Cheng, >>>>>> >>>>>> you are welcome and many thanks for your interest. However you seem >>>>>> to work on my master branch which I consider as my private >>>>>> workspace (with some unfinished things in it). Sorry, I wasn't >>>>>> expecting guests here :-) >>>>>> >>>>>> You probably want to try out the adjoint branch instead. This >>>>>> should compile. >>>>>> >>>>>> Thanks >>>>>> Peter >>>>>> >>>>>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> >>>>>> wrote: >>>>>>> Hi Peter, >>>>>>> >>>>>>> Thank you for your kindly offer these new stuff for all of us! >>>>>>> >>>>>>> I have cloned your branch and tried to build it on my machine. >>>>>>> When it was building the example/InterestRateSmile, the compiler >>>>>>> complained as >>>>>>> following: >>>>>>> >>>>>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>>>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at >>>>>>> argument >>>>>>> 1 in template parameter list for ‘template<class T> class >>>>>>> boost::shared_ptr’ >>>>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>>>> ^ >>>>>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>>>>> ‘ZabrSmileSection’ >>>>>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>>>>> before ‘=’ token >>>>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>>>> ^ >>>>>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>>>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>>>>> ZabrSmileSection::ShortMaturityLognormal); >>>>>>> >>>>>>> I am not sure what is the problem... Is it due to missing template >>>>>>> argument for ZabrSmileSection? >>>>>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>>>>> >>>>>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are >>>>>>> missing from the branch. However when I adjust the makefile.am to >>>>>>> exclude them out the compiling process works fine. >>>>>>> >>>>>>> >>>>>>> Regards, >>>>>>> Cheng >>>>>>> >>>>>>> -----邮件原件----- >>>>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>>>> 发送时间: 2015年1月9日 3:57 >>>>>>> 收件人: Luigi Ballabio >>>>>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>>>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>>>>> >>>>>>> I thought in a realistic application you would always need both >>>>>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>>>>> the rest. I wonder what it would mean in terms of performance and >>>>>>> memory if you replace double by CppAD<double> in general. I can >>>>>>> maybe just stress test this a bit though. >>>>>>> Peter >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 7 January 2015 at 10:23, Luigi Ballabio >>>>>>> <lui...@gm...> >>>>>>> wrote: >>>>>>>> Switching Real would force you to fix compilation problems all >>>>>>>> over the library, instead of just in the code you're converting. >>>>>>>> >>>>>>>> If you wanted to go the route of #defining the type, I guess you >>>>>>>> could introduce another type (ADReal or something) and switch the >>>>>>>> coverted code to use it. >>>>>>>> Which might or might not be a good idea; you wouldn't be forced >>>>>>>> to templatize the code, but you would have to choose AD or not at >>>>>>>> compilation time, instead that having the choice to use both for >>>>>>>> different >>>>>>> tasks. Hmm... >>>>>>>> >>>>>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we >>>>>>>> got a lot of presents this Christmas :) >>>>>>>> >>>>>>>> Luigi >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>>>>> <fer...@am...> wrote: >>>>>>>>> >>>>>>>>> Thank you Peter, it sounds exciting and promising. >>>>>>>>> Why haven't you considered to just change the Real typedef from >>>>>>>>> double to CppAD::AD<double>? >>>>>>>>> >>>>>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>>>>> <pca...@gm...> >>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> Hello all, >>>>>>>>>> >>>>>>>>>> happy new year. >>>>>>>>>> >>>>>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>>>>> December workshop and started to play around with that idea. >>>>>>>>>> >>>>>>>>>> The approach I am trying to follow is to adapt the ql library >>>>>>>>>> code so that automatic differentiation _tools_ can be used with >>>>>>>>>> it in a transparent way. This is opposed to writing special >>>>>>>>>> adjoint engines by _hand_ like e.g. advocated in Capriotti, >>>>>>>>>> Giles, Algorithmic >>>>>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>>>>> and homogeneous code basis of ql seems to allow for this kind >>>>>>>>>> of more fundamental approach. >>>>>>>>>> >>>>>>>>>> I wrote a bit about my first steps in my blog >>>>>>>>>> >>>>>>>>>> http://quantlib.wordpress.com/ >>>>>>>>>> >>>>>>>>>> and forked a new branch from Luigi's current master on github >>>>>>>>>> >>>>>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>>>>> >>>>>>>>>> where I started to template'ize the library in order to allow >>>>>>>>>> for AD tools to hook in. There are already first working >>>>>>>>>> examples (see the >>>>>>>>>> blog) and I am starting to feel confident that the approach >>>>>>>>>> might work as a whole, might be doable in a reasonable amount >>>>>>>>>> of time and is worthwhile following. >>>>>>>>>> >>>>>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>>>>> From that we can subtract "data" files >>>>>>>>>> >>>>>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>>>>> >>>>>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>>>>> reviewed and adapted around 14k lines, which is 5% and which >>>>>>>>>> took me approximately 60 hours. This gives an estimation of 130 >>>>>>>>>> person days still left to do. For the whole (!) library where >>>>>>>>>> already parts will make much sense and give interesting >>>>>>>>>> applications. E.g. >>>>>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>>>>> reduces the estimate already to 65 person days to go. >>>>>>>>>> >>>>>>>>>> I would be interested in your opinions on that, in particular >>>>>>>>>> regarding the design choices to make (better now than later :-) >>>>>>>>>> ). >>>>>>>>>> >>>>>>>>>> I'd also be grateful for people supporting the development by >>>>>>>>>> forking the adjoint branch and sending pull requests with >>>>>>>>>> adapted code >>>>>>> pieces. >>>>>>>>>> My personal next steps would be >>>>>>>>>> - rate deltas for Legs / Swap instruments >>>>>>>>>> - rate vegas for vanilla interest rate options >>>>>>>>>> - Hull White model >>>>>>>>>> >>>>>>>>>> What do you think ? >>>>>>>>>> >>>>>>>>>> Thank you >>>>>>>>>> Peter >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------------- >>>>>>>>>> - >>>>>>>>>> -- >>>>>>>>>> - >>>>>>>>>> - >>>>>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>>>> parallel software development, from weekly thought leadership >>>>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>>>> look and join the conversation now. >>>>>>>>>> http://goparallel.sourceforge.net >>>>>>>>>> _______________________________________________ >>>>>>>>>> QuantLib-dev mailing list >>>>>>>>>> Qua...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> - >>>>>>>>> -- >>>>>>>>> - >>>>>>>>> - >>>>>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>>> parallel software development, from weekly thought leadership >>>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>>> look and join the conversation now. >>>>>>>>> http://goparallel.sourceforge.net >>>>>>>>> _______________________________________________ >>>>>>>>> QuantLib-dev mailing list >>>>>>>>> Qua...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> <https://implementingquantlib.blogspot.com> >>>>>>>> <https://twitter.com/lballabio> >>>>>>> >>>>>>> ------------------------------------------------------------------ >>>>>>> - >>>>>>> -- >>>>>>> - >>>>>>> ------ >>>>>>> -- >>>>>>> Dive into the World of Parallel Programming! The Go Parallel >>>>>>> Website, sponsored by Intel and developed in partnership with >>>>>>> Slashdot Media, is your hub for all things parallel software >>>>>>> development, from weekly thought leadership blogs to news, videos, >>>>>>> case studies, tutorials and more. Take a look and join the >>>>>>> conversation now. >>>>>>> http://goparallel.sourceforge.net >>>>>>> _______________________________________________ >>>>>>> QuantLib-dev mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------- >>>>>> - >>>>>> -- >>>>>> -------- New Year. New Location. New Benefits. New Data Center in >>>>>> Ashburn, VA. >>>>>> GigeNET is offering a free month of service with a new server in >>>>>> Ashburn. >>>>>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>>>>> Higher redundancy.Lower latency.Increased capacity.Completely >>>>>> compliant. >>>>>> vanity: www.gigenet.com >>>>>> _______________________________________________ >>>>>> QuantLib-dev mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>> >>> >> > |
|
From: Peter C. <pca...@gm...> - 2015-02-06 21:51:28
|
Hi Cheng, great, thank you very much. Looks fine to me, I merged your changes into my branch. Send more whenever you feel like it. best regards Peter On 6 February 2015 at 10:12, cheng li <scr...@gm...> wrote: > Hi Peter, > > I finished the fixed rate bond part and a pull request has been raised. > > Any comment is welcome, Peter:) > > Regards, > Cheng > > -----邮件原件----- > 发件人: Peter Caspers [mailto:pca...@gm...] > 发送时间: 2015年2月2日 20:52 > 收件人: cheng li > 抄送: Luigi Ballabio; QuantLib developers > 主题: Re: 答复: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks > > Hi Cheng, > > great, I am looking forward to receive your contributions ! > > Kind regards > Peter > > On 2 February 2015 at 02:35, cheng li <scr...@gm...> wrote: >> Hi Peter, >> >> Thank you for the gifts for all of us. I have tried your example. It looks very promising! >> >> Now I am following your steps and trying to make my first example. My fist goal is to make FixedRateBond AD available (I am most familiar with bonds part:)). >> >> When I finished I'll raise a pull request for that change to your trunk. >> >> Regards, >> Cheng >> >> -----邮件原件----- >> 发件人: Peter Caspers [mailto:pca...@gm...] >> 发送时间: 2015年1月26日 3:06 >> 收件人: cheng li >> 抄送: Luigi Ballabio; QuantLib developers >> 主题: Re: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks >> >> Hello, >> >> this weekend I have reached a level of conversion that allows to >> tackle Vanilla Swaps. This is maybe the first "full-blown" example, so >> if you are interested you can find some results in my blog >> >> http://quantlib.wordpress.com >> >> Comments are welcome. >> >> Thanks and best regards >> Peter >> >> On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> wrote: >>> unlikely (the optimization level) >>> Peter >>> >>> >>> On 14 January 2015 at 02:49, cheng li <scr...@gm...> wrote: >>>> Hi Peter, >>>> >>>> I'll definitely have a try. Thank you :) >>>> >>>> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 setting, then everything works fine. I think my previous problem may be due to O3. >>>> >>>> Regards, >>>> Cheng >>>> >>>> -----邮件原件----- >>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>> 发送时间: 2015年1月13日 21:18 >>>> 收件人: cheng li >>>> 抄送: Luigi Ballabio; QuantLib developers >>>> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >>>> >>>> I will clean up the adjoint branch to make it c++03 compliant. >>>> Unless QuantLib 2.0 is out before the adjoint conversion has >>>> finished :-) >>>> >>>> On 13 January 2015 at 02:28, cheng li <scr...@gm...> wrote: >>>>> Hi Luigi, >>>>> >>>>> >>>>> >>>>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch >>>>> much >>>>> c++ 11 stuff is used, e.g. constexpr… >>>>> >>>>> >>>>> >>>>> Regards, >>>>> >>>>> Cheng >>>>> >>>>> >>>>> >>>>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>>>> 发送时间: 2015年1月12日 14:28 >>>>> 收件人: Cheng Li >>>>> 抄送: QuantLib developers; Peter Caspers >>>>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>>>> >>>>> >>>>> >>>>> Don't use C++11. >>>>> >>>>> Luigi >>>>> >>>>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> wrote: >>>>> >>>>> Hi peter, >>>>> >>>>> I have switched to adjoint brank. However I am still facing some problem... >>>>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>>>> >>>>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >>>>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP >>>>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>>>> averagebmacoupon.cpp >>>>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>>>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>>>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>>>> .libs/averagebmacoupon.o In file included from >>>>> ../../ql/patterns/observable.hpp:29:0, >>>>> from ../../ql/event.hpp:29, >>>>> from ../../ql/cashflow.hpp:28, >>>>> from ../../ql/cashflows/coupon.hpp:29, >>>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>>> from averagebmacoupon.cpp:21: >>>>> ../../ql/patterns/observable.hpp: In member function 'void >>>>> QuantLib::Observable::notifyObservers()': >>>>> ../../ql/errors.hpp:121:70: error: use of deleted function >>>>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>>>> >>>>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>>>> >>>>> ^ >>>>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>>>> 'QL_ENSURE' >>>>> QL_ENSURE(successful, >>>>> ^ >>>>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>>>> QuantLib::Error&)' is implicitly deleted because the default >>>>> definition would be ill-formed: >>>>> class Error : public std::exception { >>>>> ^ >>>>> ../../ql/errors.hpp:39:11: error: use of deleted function >>>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>>> boost::shared_ptr<std::basic_string<char> >&)' >>>>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>>>> from ../../ql/errors.hpp:31, >>>>> from ../../ql/patterns/observable.hpp:29, >>>>> from ../../ql/event.hpp:29, >>>>> from ../../ql/cashflow.hpp:28, >>>>> from ../../ql/cashflows/coupon.hpp:29, >>>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>>> from averagebmacoupon.cpp:21: >>>>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly >>>>> declared as deleted because 'boost::shared_ptr<std::basic_string<char> >' >>>>> declares a move constructor or move assignment operator >>>>> >>>>> Any idea about this? >>>>> >>>>> Regards, >>>>> Cheng >>>>> >>>>> -----邮件原件----- >>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>> 发送时间: 2015年1月11日 17:34 >>>>> 收件人: Cheng Li >>>>> 抄送: QuantLib Mailing Lists >>>>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>>>> >>>>> Hi Cheng, >>>>> >>>>> you are welcome and many thanks for your interest. However you seem >>>>> to work on my master branch which I consider as my private >>>>> workspace (with some unfinished things in it). Sorry, I wasn't >>>>> expecting guests here :-) >>>>> >>>>> You probably want to try out the adjoint branch instead. This >>>>> should compile. >>>>> >>>>> Thanks >>>>> Peter >>>>> >>>>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> wrote: >>>>>> Hi Peter, >>>>>> >>>>>> Thank you for your kindly offer these new stuff for all of us! >>>>>> >>>>>> I have cloned your branch and tried to build it on my machine. >>>>>> When it was building the example/InterestRateSmile, the compiler >>>>>> complained as >>>>>> following: >>>>>> >>>>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at >>>>>> argument >>>>>> 1 in template parameter list for ‘template<class T> class boost::shared_ptr’ >>>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>>> ^ >>>>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>>>> ‘ZabrSmileSection’ >>>>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>>>> before ‘=’ token >>>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>>> ^ >>>>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>>>> ZabrSmileSection::ShortMaturityLognormal); >>>>>> >>>>>> I am not sure what is the problem... Is it due to missing template >>>>>> argument for ZabrSmileSection? >>>>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>>>> >>>>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are >>>>>> missing from the branch. However when I adjust the makefile.am to >>>>>> exclude them out the compiling process works fine. >>>>>> >>>>>> >>>>>> Regards, >>>>>> Cheng >>>>>> >>>>>> -----邮件原件----- >>>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>>> 发送时间: 2015年1月9日 3:57 >>>>>> 收件人: Luigi Ballabio >>>>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>>>> >>>>>> I thought in a realistic application you would always need both >>>>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>>>> the rest. I wonder what it would mean in terms of performance and >>>>>> memory if you replace double by CppAD<double> in general. I can >>>>>> maybe just stress test this a bit though. >>>>>> Peter >>>>>> >>>>>> >>>>>> >>>>>> On 7 January 2015 at 10:23, Luigi Ballabio >>>>>> <lui...@gm...> >>>>>> wrote: >>>>>>> Switching Real would force you to fix compilation problems all >>>>>>> over the library, instead of just in the code you're converting. >>>>>>> >>>>>>> If you wanted to go the route of #defining the type, I guess you >>>>>>> could introduce another type (ADReal or something) and switch the >>>>>>> coverted code to use it. >>>>>>> Which might or might not be a good idea; you wouldn't be forced >>>>>>> to templatize the code, but you would have to choose AD or not at >>>>>>> compilation time, instead that having the choice to use both for >>>>>>> different >>>>>> tasks. Hmm... >>>>>>> >>>>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we >>>>>>> got a lot of presents this Christmas :) >>>>>>> >>>>>>> Luigi >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>>>> <fer...@am...> wrote: >>>>>>>> >>>>>>>> Thank you Peter, it sounds exciting and promising. >>>>>>>> Why haven't you considered to just change the Real typedef from >>>>>>>> double to CppAD::AD<double>? >>>>>>>> >>>>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>>>> <pca...@gm...> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Hello all, >>>>>>>>> >>>>>>>>> happy new year. >>>>>>>>> >>>>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>>>> December workshop and started to play around with that idea. >>>>>>>>> >>>>>>>>> The approach I am trying to follow is to adapt the ql library >>>>>>>>> code so that automatic differentiation _tools_ can be used with >>>>>>>>> it in a transparent way. This is opposed to writing special >>>>>>>>> adjoint engines by _hand_ like e.g. advocated in Capriotti, >>>>>>>>> Giles, Algorithmic >>>>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>>>> and homogeneous code basis of ql seems to allow for this kind >>>>>>>>> of more fundamental approach. >>>>>>>>> >>>>>>>>> I wrote a bit about my first steps in my blog >>>>>>>>> >>>>>>>>> http://quantlib.wordpress.com/ >>>>>>>>> >>>>>>>>> and forked a new branch from Luigi's current master on github >>>>>>>>> >>>>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>>>> >>>>>>>>> where I started to template'ize the library in order to allow >>>>>>>>> for AD tools to hook in. There are already first working >>>>>>>>> examples (see the >>>>>>>>> blog) and I am starting to feel confident that the approach >>>>>>>>> might work as a whole, might be doable in a reasonable amount >>>>>>>>> of time and is worthwhile following. >>>>>>>>> >>>>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>>>> From that we can subtract "data" files >>>>>>>>> >>>>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>>>> >>>>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>>>> reviewed and adapted around 14k lines, which is 5% and which >>>>>>>>> took me approximately 60 hours. This gives an estimation of 130 >>>>>>>>> person days still left to do. For the whole (!) library where >>>>>>>>> already parts will make much sense and give interesting applications. E.g. >>>>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>>>> reduces the estimate already to 65 person days to go. >>>>>>>>> >>>>>>>>> I would be interested in your opinions on that, in particular >>>>>>>>> regarding the design choices to make (better now than later :-) ). >>>>>>>>> >>>>>>>>> I'd also be grateful for people supporting the development by >>>>>>>>> forking the adjoint branch and sending pull requests with >>>>>>>>> adapted code >>>>>> pieces. >>>>>>>>> My personal next steps would be >>>>>>>>> - rate deltas for Legs / Swap instruments >>>>>>>>> - rate vegas for vanilla interest rate options >>>>>>>>> - Hull White model >>>>>>>>> >>>>>>>>> What do you think ? >>>>>>>>> >>>>>>>>> Thank you >>>>>>>>> Peter >>>>>>>>> >>>>>>>>> >>>>>>>>> --------------------------------------------------------------- >>>>>>>>> - >>>>>>>>> -- >>>>>>>>> - >>>>>>>>> - >>>>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>>> parallel software development, from weekly thought leadership >>>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>>> look and join the conversation now. >>>>>>>>> http://goparallel.sourceforge.net >>>>>>>>> _______________________________________________ >>>>>>>>> QuantLib-dev mailing list >>>>>>>>> Qua...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> - >>>>>>>> -- >>>>>>>> - >>>>>>>> - >>>>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>> parallel software development, from weekly thought leadership >>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>> look and join the conversation now. >>>>>>>> http://goparallel.sourceforge.net >>>>>>>> _______________________________________________ >>>>>>>> QuantLib-dev mailing list >>>>>>>> Qua...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> <https://implementingquantlib.blogspot.com> >>>>>>> <https://twitter.com/lballabio> >>>>>> >>>>>> ------------------------------------------------------------------ >>>>>> - >>>>>> -- >>>>>> - >>>>>> ------ >>>>>> -- >>>>>> Dive into the World of Parallel Programming! The Go Parallel >>>>>> Website, sponsored by Intel and developed in partnership with >>>>>> Slashdot Media, is your hub for all things parallel software >>>>>> development, from weekly thought leadership blogs to news, videos, >>>>>> case studies, tutorials and more. Take a look and join the conversation now. >>>>>> http://goparallel.sourceforge.net >>>>>> _______________________________________________ >>>>>> QuantLib-dev mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------- >>>>> - >>>>> -- >>>>> -------- New Year. New Location. New Benefits. New Data Center in >>>>> Ashburn, VA. >>>>> GigeNET is offering a free month of service with a new server in Ashburn. >>>>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >>>>> vanity: www.gigenet.com >>>>> _______________________________________________ >>>>> QuantLib-dev mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>> >> > |
|
From: cheng l. <scr...@gm...> - 2015-02-06 09:12:41
|
Hi Peter, I finished the fixed rate bond part and a pull request has been raised. Any comment is welcome, Peter:) Regards, Cheng -----邮件原件----- 发件人: Peter Caspers [mailto:pca...@gm...] 发送时间: 2015年2月2日 20:52 收件人: cheng li 抄送: Luigi Ballabio; QuantLib developers 主题: Re: 答复: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks Hi Cheng, great, I am looking forward to receive your contributions ! Kind regards Peter On 2 February 2015 at 02:35, cheng li <scr...@gm...> wrote: > Hi Peter, > > Thank you for the gifts for all of us. I have tried your example. It looks very promising! > > Now I am following your steps and trying to make my first example. My fist goal is to make FixedRateBond AD available (I am most familiar with bonds part:)). > > When I finished I'll raise a pull request for that change to your trunk. > > Regards, > Cheng > > -----邮件原件----- > 发件人: Peter Caspers [mailto:pca...@gm...] > 发送时间: 2015年1月26日 3:06 > 收件人: cheng li > 抄送: Luigi Ballabio; QuantLib developers > 主题: Re: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks > > Hello, > > this weekend I have reached a level of conversion that allows to > tackle Vanilla Swaps. This is maybe the first "full-blown" example, so > if you are interested you can find some results in my blog > > http://quantlib.wordpress.com > > Comments are welcome. > > Thanks and best regards > Peter > > On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> wrote: >> unlikely (the optimization level) >> Peter >> >> >> On 14 January 2015 at 02:49, cheng li <scr...@gm...> wrote: >>> Hi Peter, >>> >>> I'll definitely have a try. Thank you :) >>> >>> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 setting, then everything works fine. I think my previous problem may be due to O3. >>> >>> Regards, >>> Cheng >>> >>> -----邮件原件----- >>> 发件人: Peter Caspers [mailto:pca...@gm...] >>> 发送时间: 2015年1月13日 21:18 >>> 收件人: cheng li >>> 抄送: Luigi Ballabio; QuantLib developers >>> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >>> >>> I will clean up the adjoint branch to make it c++03 compliant. >>> Unless QuantLib 2.0 is out before the adjoint conversion has >>> finished :-) >>> >>> On 13 January 2015 at 02:28, cheng li <scr...@gm...> wrote: >>>> Hi Luigi, >>>> >>>> >>>> >>>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch >>>> much >>>> c++ 11 stuff is used, e.g. constexpr… >>>> >>>> >>>> >>>> Regards, >>>> >>>> Cheng >>>> >>>> >>>> >>>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>>> 发送时间: 2015年1月12日 14:28 >>>> 收件人: Cheng Li >>>> 抄送: QuantLib developers; Peter Caspers >>>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>>> >>>> >>>> >>>> Don't use C++11. >>>> >>>> Luigi >>>> >>>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> wrote: >>>> >>>> Hi peter, >>>> >>>> I have switched to adjoint brank. However I am still facing some problem... >>>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>>> >>>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >>>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP >>>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>>> averagebmacoupon.cpp >>>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>>> .libs/averagebmacoupon.o In file included from >>>> ../../ql/patterns/observable.hpp:29:0, >>>> from ../../ql/event.hpp:29, >>>> from ../../ql/cashflow.hpp:28, >>>> from ../../ql/cashflows/coupon.hpp:29, >>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>> from averagebmacoupon.cpp:21: >>>> ../../ql/patterns/observable.hpp: In member function 'void >>>> QuantLib::Observable::notifyObservers()': >>>> ../../ql/errors.hpp:121:70: error: use of deleted function >>>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>>> >>>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>>> >>>> ^ >>>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>>> 'QL_ENSURE' >>>> QL_ENSURE(successful, >>>> ^ >>>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>>> QuantLib::Error&)' is implicitly deleted because the default >>>> definition would be ill-formed: >>>> class Error : public std::exception { >>>> ^ >>>> ../../ql/errors.hpp:39:11: error: use of deleted function >>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>> boost::shared_ptr<std::basic_string<char> >&)' >>>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>>> from ../../ql/errors.hpp:31, >>>> from ../../ql/patterns/observable.hpp:29, >>>> from ../../ql/event.hpp:29, >>>> from ../../ql/cashflow.hpp:28, >>>> from ../../ql/cashflows/coupon.hpp:29, >>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>> from averagebmacoupon.cpp:21: >>>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly >>>> declared as deleted because 'boost::shared_ptr<std::basic_string<char> >' >>>> declares a move constructor or move assignment operator >>>> >>>> Any idea about this? >>>> >>>> Regards, >>>> Cheng >>>> >>>> -----邮件原件----- >>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>> 发送时间: 2015年1月11日 17:34 >>>> 收件人: Cheng Li >>>> 抄送: QuantLib Mailing Lists >>>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>>> >>>> Hi Cheng, >>>> >>>> you are welcome and many thanks for your interest. However you seem >>>> to work on my master branch which I consider as my private >>>> workspace (with some unfinished things in it). Sorry, I wasn't >>>> expecting guests here :-) >>>> >>>> You probably want to try out the adjoint branch instead. This >>>> should compile. >>>> >>>> Thanks >>>> Peter >>>> >>>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> wrote: >>>>> Hi Peter, >>>>> >>>>> Thank you for your kindly offer these new stuff for all of us! >>>>> >>>>> I have cloned your branch and tried to build it on my machine. >>>>> When it was building the example/InterestRateSmile, the compiler >>>>> complained as >>>>> following: >>>>> >>>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at >>>>> argument >>>>> 1 in template parameter list for ‘template<class T> class boost::shared_ptr’ >>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>> ^ >>>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>>> ‘ZabrSmileSection’ >>>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>>> before ‘=’ token >>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>> ^ >>>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>>> ZabrSmileSection::ShortMaturityLognormal); >>>>> >>>>> I am not sure what is the problem... Is it due to missing template >>>>> argument for ZabrSmileSection? >>>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>>> >>>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are >>>>> missing from the branch. However when I adjust the makefile.am to >>>>> exclude them out the compiling process works fine. >>>>> >>>>> >>>>> Regards, >>>>> Cheng >>>>> >>>>> -----邮件原件----- >>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>> 发送时间: 2015年1月9日 3:57 >>>>> 收件人: Luigi Ballabio >>>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>>> >>>>> I thought in a realistic application you would always need both >>>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>>> the rest. I wonder what it would mean in terms of performance and >>>>> memory if you replace double by CppAD<double> in general. I can >>>>> maybe just stress test this a bit though. >>>>> Peter >>>>> >>>>> >>>>> >>>>> On 7 January 2015 at 10:23, Luigi Ballabio >>>>> <lui...@gm...> >>>>> wrote: >>>>>> Switching Real would force you to fix compilation problems all >>>>>> over the library, instead of just in the code you're converting. >>>>>> >>>>>> If you wanted to go the route of #defining the type, I guess you >>>>>> could introduce another type (ADReal or something) and switch the >>>>>> coverted code to use it. >>>>>> Which might or might not be a good idea; you wouldn't be forced >>>>>> to templatize the code, but you would have to choose AD or not at >>>>>> compilation time, instead that having the choice to use both for >>>>>> different >>>>> tasks. Hmm... >>>>>> >>>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we >>>>>> got a lot of presents this Christmas :) >>>>>> >>>>>> Luigi >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>>> <fer...@am...> wrote: >>>>>>> >>>>>>> Thank you Peter, it sounds exciting and promising. >>>>>>> Why haven't you considered to just change the Real typedef from >>>>>>> double to CppAD::AD<double>? >>>>>>> >>>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>>> <pca...@gm...> >>>>>>> wrote: >>>>>>>> >>>>>>>> Hello all, >>>>>>>> >>>>>>>> happy new year. >>>>>>>> >>>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>>> December workshop and started to play around with that idea. >>>>>>>> >>>>>>>> The approach I am trying to follow is to adapt the ql library >>>>>>>> code so that automatic differentiation _tools_ can be used with >>>>>>>> it in a transparent way. This is opposed to writing special >>>>>>>> adjoint engines by _hand_ like e.g. advocated in Capriotti, >>>>>>>> Giles, Algorithmic >>>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>>> and homogeneous code basis of ql seems to allow for this kind >>>>>>>> of more fundamental approach. >>>>>>>> >>>>>>>> I wrote a bit about my first steps in my blog >>>>>>>> >>>>>>>> http://quantlib.wordpress.com/ >>>>>>>> >>>>>>>> and forked a new branch from Luigi's current master on github >>>>>>>> >>>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>>> >>>>>>>> where I started to template'ize the library in order to allow >>>>>>>> for AD tools to hook in. There are already first working >>>>>>>> examples (see the >>>>>>>> blog) and I am starting to feel confident that the approach >>>>>>>> might work as a whole, might be doable in a reasonable amount >>>>>>>> of time and is worthwhile following. >>>>>>>> >>>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>>> From that we can subtract "data" files >>>>>>>> >>>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>>> >>>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>>> reviewed and adapted around 14k lines, which is 5% and which >>>>>>>> took me approximately 60 hours. This gives an estimation of 130 >>>>>>>> person days still left to do. For the whole (!) library where >>>>>>>> already parts will make much sense and give interesting applications. E.g. >>>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>>> reduces the estimate already to 65 person days to go. >>>>>>>> >>>>>>>> I would be interested in your opinions on that, in particular >>>>>>>> regarding the design choices to make (better now than later :-) ). >>>>>>>> >>>>>>>> I'd also be grateful for people supporting the development by >>>>>>>> forking the adjoint branch and sending pull requests with >>>>>>>> adapted code >>>>> pieces. >>>>>>>> My personal next steps would be >>>>>>>> - rate deltas for Legs / Swap instruments >>>>>>>> - rate vegas for vanilla interest rate options >>>>>>>> - Hull White model >>>>>>>> >>>>>>>> What do you think ? >>>>>>>> >>>>>>>> Thank you >>>>>>>> Peter >>>>>>>> >>>>>>>> >>>>>>>> --------------------------------------------------------------- >>>>>>>> - >>>>>>>> -- >>>>>>>> - >>>>>>>> - >>>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>> parallel software development, from weekly thought leadership >>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>> look and join the conversation now. >>>>>>>> http://goparallel.sourceforge.net >>>>>>>> _______________________________________________ >>>>>>>> QuantLib-dev mailing list >>>>>>>> Qua...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> - >>>>>>> -- >>>>>>> - >>>>>>> - >>>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>> parallel software development, from weekly thought leadership >>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>> look and join the conversation now. >>>>>>> http://goparallel.sourceforge.net >>>>>>> _______________________________________________ >>>>>>> QuantLib-dev mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> <https://implementingquantlib.blogspot.com> >>>>>> <https://twitter.com/lballabio> >>>>> >>>>> ------------------------------------------------------------------ >>>>> - >>>>> -- >>>>> - >>>>> ------ >>>>> -- >>>>> Dive into the World of Parallel Programming! The Go Parallel >>>>> Website, sponsored by Intel and developed in partnership with >>>>> Slashdot Media, is your hub for all things parallel software >>>>> development, from weekly thought leadership blogs to news, videos, >>>>> case studies, tutorials and more. Take a look and join the conversation now. >>>>> http://goparallel.sourceforge.net >>>>> _______________________________________________ >>>>> QuantLib-dev mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------- >>>> - >>>> -- >>>> -------- New Year. New Location. New Benefits. New Data Center in >>>> Ashburn, VA. >>>> GigeNET is offering a free month of service with a new server in Ashburn. >>>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >>>> vanity: www.gigenet.com >>>> _______________________________________________ >>>> QuantLib-dev mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>> > |
|
From: Luigi B. <lui...@gm...> - 2015-02-05 11:23:49
|
Apologies for the delay; I didn't find the time to go back and check the math. I see from < http://www.wilmott.com/messageview.cfm?catid=4&threadid=98075&forumid=1> that you solved the issue, though. Is this correct? Luigi On Thu, Jan 29, 2015 at 5:59 AM, Sk Wong <sk...@gm...> wrote: > Hi, > > I have a question on the setup of the tridiagonal system in the cubic > interpolation (under the choice 'Spline' for derivative approximation. The > tridiagonal system looks a bit different from the one suggested in the > literature. In particular, the middle components of the vector tmp_, the > right hand side vector of tridiagonal system, are caculated as: > > std::vector<Real> dx(n_-1), S(n_-1); > > for (Size <http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3> i=0; i<n_-1; ++i) { > dx[i] = this->xBegin_[i+1] - this->xBegin_[i]; > S[i] = (this->yBegin_[i+1] - this->yBegin_[i])/dx[i]; > } > > // first derivative approximation > if (da_==CubicInterpolation::Spline <http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1CubicInterpolation_a6897ea07ce6993b4df934091a3723d28.html#a6897ea07ce6993b4df934091a3723d28aaa6b6cbb8010b02172412742c21ce2d7>) { > TridiagonalOperator <http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1TridiagonalOperator.html> L(n_); > for (Size <http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3> i=1; i<n_-1; ++i) { > L.setMidRow(i, dx[i], 2.0*(dx[i]+dx[i-1]), dx[i-1]); > tmp[i] = 3.0*(dx[i]*S[i-1] + dx[i-1]*S[i]); > } > > > > > Following the literature, one instead has (e.g. see Eq. 6.62 in > Piterbarg-Andersen book V1 Chapter 6 Appendix): > > tmp[i] = 6.0*(S[i] - S[i-1]); > > > Am I missing something here? Or any reference you can point me to which derive what Quantlib implements? > > > > Thanks, > > SK > > > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> |
|
From: Francois B. <ig...@gm...> - 2015-02-05 11:12:50
|
It's a boring task, but I think the QuantlibXL interfaces could benefit with some work to match the underlying functions and specifically to accept all the possible parameters. Francois Botha On 5 February 2015 at 13:05, Luigi Ballabio <lui...@gm...> wrote: > Hello, > apologies for the delay. We're a disorganized bunch here, which also > makes it difficult to suggest a task... Is there anything missing in the > library that would help you in your work? > > Later, > Luigi > > > On Sun, Jan 11, 2015 at 6:34 PM, Richard Postelnik <pos...@gm...> > wrote: > >> Hi all, >> >> I am a recent graduate of a financial engineering program. I have 2 >> years professional experience in Python, 1 year in Clojure, and working >> knowledge of C++. I want to start contributing to quantlib. What >> suggestions do you have on how I can start? >> >> -- >> Rich >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> QuantLib-dev mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >> >> > > > -- > <https://implementingquantlib.blogspot.com> > <https://twitter.com/lballabio> > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > |
|
From: Luigi B. <lui...@gm...> - 2015-02-05 11:05:52
|
Hello,
apologies for the delay. We're a disorganized bunch here, which also
makes it difficult to suggest a task... Is there anything missing in the
library that would help you in your work?
Later,
Luigi
On Sun, Jan 11, 2015 at 6:34 PM, Richard Postelnik <pos...@gm...>
wrote:
> Hi all,
>
> I am a recent graduate of a financial engineering program. I have 2 years
> professional experience in Python, 1 year in Clojure, and working knowledge
> of C++. I want to start contributing to quantlib. What suggestions do you
> have on how I can start?
>
> --
> Rich
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
>
--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>
|
|
From: Peter C. <pca...@gm...> - 2015-02-03 12:07:48
|
Hi, the adjoint branch is now c++11 - free (among other things thanks to Cheng who backported the error function class). This covers the library, test-suite and all existing examples. However note that depending on how you built CppAD it might require c++11 (and as a consequence also the adjoint example). best regards Peter On 2 February 2015 at 13:51, Peter Caspers <pca...@gm...> wrote: > Hi Cheng, > > great, I am looking forward to receive your contributions ! > > Kind regards > Peter > > On 2 February 2015 at 02:35, cheng li <scr...@gm...> wrote: >> Hi Peter, >> >> Thank you for the gifts for all of us. I have tried your example. It looks very promising! >> >> Now I am following your steps and trying to make my first example. My fist goal is to make FixedRateBond AD available (I am most familiar with bonds part:)). >> >> When I finished I'll raise a pull request for that change to your trunk. >> >> Regards, >> Cheng >> >> -----邮件原件----- >> 发件人: Peter Caspers [mailto:pca...@gm...] >> 发送时间: 2015年1月26日 3:06 >> 收件人: cheng li >> 抄送: Luigi Ballabio; QuantLib developers >> 主题: Re: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks >> >> Hello, >> >> this weekend I have reached a level of conversion that allows to tackle Vanilla Swaps. This is maybe the first "full-blown" example, so if you are interested you can find some results in my blog >> >> http://quantlib.wordpress.com >> >> Comments are welcome. >> >> Thanks and best regards >> Peter >> >> On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> wrote: >>> unlikely (the optimization level) >>> Peter >>> >>> >>> On 14 January 2015 at 02:49, cheng li <scr...@gm...> wrote: >>>> Hi Peter, >>>> >>>> I'll definitely have a try. Thank you :) >>>> >>>> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 setting, then everything works fine. I think my previous problem may be due to O3. >>>> >>>> Regards, >>>> Cheng >>>> >>>> -----邮件原件----- >>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>> 发送时间: 2015年1月13日 21:18 >>>> 收件人: cheng li >>>> 抄送: Luigi Ballabio; QuantLib developers >>>> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >>>> >>>> I will clean up the adjoint branch to make it c++03 compliant. Unless >>>> QuantLib 2.0 is out before the adjoint conversion has finished :-) >>>> >>>> On 13 January 2015 at 02:28, cheng li <scr...@gm...> wrote: >>>>> Hi Luigi, >>>>> >>>>> >>>>> >>>>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch >>>>> much >>>>> c++ 11 stuff is used, e.g. constexpr… >>>>> >>>>> >>>>> >>>>> Regards, >>>>> >>>>> Cheng >>>>> >>>>> >>>>> >>>>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>>>> 发送时间: 2015年1月12日 14:28 >>>>> 收件人: Cheng Li >>>>> 抄送: QuantLib developers; Peter Caspers >>>>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>>>> >>>>> >>>>> >>>>> Don't use C++11. >>>>> >>>>> Luigi >>>>> >>>>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> wrote: >>>>> >>>>> Hi peter, >>>>> >>>>> I have switched to adjoint brank. However I am still facing some problem... >>>>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>>>> >>>>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >>>>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP >>>>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>>>> averagebmacoupon.cpp >>>>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>>>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>>>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>>>> .libs/averagebmacoupon.o In file included from >>>>> ../../ql/patterns/observable.hpp:29:0, >>>>> from ../../ql/event.hpp:29, >>>>> from ../../ql/cashflow.hpp:28, >>>>> from ../../ql/cashflows/coupon.hpp:29, >>>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>>> from averagebmacoupon.cpp:21: >>>>> ../../ql/patterns/observable.hpp: In member function 'void >>>>> QuantLib::Observable::notifyObservers()': >>>>> ../../ql/errors.hpp:121:70: error: use of deleted function >>>>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>>>> >>>>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>>>> >>>>> ^ >>>>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>>>> 'QL_ENSURE' >>>>> QL_ENSURE(successful, >>>>> ^ >>>>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>>>> QuantLib::Error&)' is implicitly deleted because the default >>>>> definition would be ill-formed: >>>>> class Error : public std::exception { >>>>> ^ >>>>> ../../ql/errors.hpp:39:11: error: use of deleted function >>>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>>> boost::shared_ptr<std::basic_string<char> >&)' >>>>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>>>> from ../../ql/errors.hpp:31, >>>>> from ../../ql/patterns/observable.hpp:29, >>>>> from ../../ql/event.hpp:29, >>>>> from ../../ql/cashflow.hpp:28, >>>>> from ../../ql/cashflows/coupon.hpp:29, >>>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>>> from averagebmacoupon.cpp:21: >>>>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly >>>>> declared as deleted because 'boost::shared_ptr<std::basic_string<char> >' >>>>> declares a move constructor or move assignment operator >>>>> >>>>> Any idea about this? >>>>> >>>>> Regards, >>>>> Cheng >>>>> >>>>> -----邮件原件----- >>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>> 发送时间: 2015年1月11日 17:34 >>>>> 收件人: Cheng Li >>>>> 抄送: QuantLib Mailing Lists >>>>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>>>> >>>>> Hi Cheng, >>>>> >>>>> you are welcome and many thanks for your interest. However you seem >>>>> to work on my master branch which I consider as my private workspace >>>>> (with some unfinished things in it). Sorry, I wasn't expecting >>>>> guests here :-) >>>>> >>>>> You probably want to try out the adjoint branch instead. This should >>>>> compile. >>>>> >>>>> Thanks >>>>> Peter >>>>> >>>>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> wrote: >>>>>> Hi Peter, >>>>>> >>>>>> Thank you for your kindly offer these new stuff for all of us! >>>>>> >>>>>> I have cloned your branch and tried to build it on my machine. When >>>>>> it was building the example/InterestRateSmile, the compiler >>>>>> complained as >>>>>> following: >>>>>> >>>>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at >>>>>> argument >>>>>> 1 in template parameter list for ‘template<class T> class boost::shared_ptr’ >>>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>>> ^ >>>>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>>>> ‘ZabrSmileSection’ >>>>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>>>> before ‘=’ token >>>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>>> ^ >>>>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>>>> ZabrSmileSection::ShortMaturityLognormal); >>>>>> >>>>>> I am not sure what is the problem... Is it due to missing template >>>>>> argument for ZabrSmileSection? >>>>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>>>> >>>>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are missing >>>>>> from the branch. However when I adjust the makefile.am to exclude >>>>>> them out the compiling process works fine. >>>>>> >>>>>> >>>>>> Regards, >>>>>> Cheng >>>>>> >>>>>> -----邮件原件----- >>>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>>> 发送时间: 2015年1月9日 3:57 >>>>>> 收件人: Luigi Ballabio >>>>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>>>> >>>>>> I thought in a realistic application you would always need both >>>>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>>>> the rest. I wonder what it would mean in terms of performance and >>>>>> memory if you replace double by CppAD<double> in general. I can >>>>>> maybe just stress test this a bit though. >>>>>> Peter >>>>>> >>>>>> >>>>>> >>>>>> On 7 January 2015 at 10:23, Luigi Ballabio >>>>>> <lui...@gm...> >>>>>> wrote: >>>>>>> Switching Real would force you to fix compilation problems all >>>>>>> over the library, instead of just in the code you're converting. >>>>>>> >>>>>>> If you wanted to go the route of #defining the type, I guess you >>>>>>> could introduce another type (ADReal or something) and switch the >>>>>>> coverted code to use it. >>>>>>> Which might or might not be a good idea; you wouldn't be forced to >>>>>>> templatize the code, but you would have to choose AD or not at >>>>>>> compilation time, instead that having the choice to use both for >>>>>>> different >>>>>> tasks. Hmm... >>>>>>> >>>>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we >>>>>>> got a lot of presents this Christmas :) >>>>>>> >>>>>>> Luigi >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>>>> <fer...@am...> wrote: >>>>>>>> >>>>>>>> Thank you Peter, it sounds exciting and promising. >>>>>>>> Why haven't you considered to just change the Real typedef from >>>>>>>> double to CppAD::AD<double>? >>>>>>>> >>>>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>>>> <pca...@gm...> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Hello all, >>>>>>>>> >>>>>>>>> happy new year. >>>>>>>>> >>>>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>>>> December workshop and started to play around with that idea. >>>>>>>>> >>>>>>>>> The approach I am trying to follow is to adapt the ql library >>>>>>>>> code so that automatic differentiation _tools_ can be used with >>>>>>>>> it in a transparent way. This is opposed to writing special >>>>>>>>> adjoint engines by _hand_ like e.g. advocated in Capriotti, >>>>>>>>> Giles, Algorithmic >>>>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>>>> and homogeneous code basis of ql seems to allow for this kind of >>>>>>>>> more fundamental approach. >>>>>>>>> >>>>>>>>> I wrote a bit about my first steps in my blog >>>>>>>>> >>>>>>>>> http://quantlib.wordpress.com/ >>>>>>>>> >>>>>>>>> and forked a new branch from Luigi's current master on github >>>>>>>>> >>>>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>>>> >>>>>>>>> where I started to template'ize the library in order to allow >>>>>>>>> for AD tools to hook in. There are already first working >>>>>>>>> examples (see the >>>>>>>>> blog) and I am starting to feel confident that the approach >>>>>>>>> might work as a whole, might be doable in a reasonable amount of >>>>>>>>> time and is worthwhile following. >>>>>>>>> >>>>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>>>> From that we can subtract "data" files >>>>>>>>> >>>>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>>>> >>>>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>>>> reviewed and adapted around 14k lines, which is 5% and which >>>>>>>>> took me approximately 60 hours. This gives an estimation of 130 >>>>>>>>> person days still left to do. For the whole (!) library where >>>>>>>>> already parts will make much sense and give interesting applications. E.g. >>>>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>>>> reduces the estimate already to 65 person days to go. >>>>>>>>> >>>>>>>>> I would be interested in your opinions on that, in particular >>>>>>>>> regarding the design choices to make (better now than later :-) ). >>>>>>>>> >>>>>>>>> I'd also be grateful for people supporting the development by >>>>>>>>> forking the adjoint branch and sending pull requests with >>>>>>>>> adapted code >>>>>> pieces. >>>>>>>>> My personal next steps would be >>>>>>>>> - rate deltas for Legs / Swap instruments >>>>>>>>> - rate vegas for vanilla interest rate options >>>>>>>>> - Hull White model >>>>>>>>> >>>>>>>>> What do you think ? >>>>>>>>> >>>>>>>>> Thank you >>>>>>>>> Peter >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> -- >>>>>>>>> - >>>>>>>>> - >>>>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>>> parallel software development, from weekly thought leadership >>>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>>> look and join the conversation now. >>>>>>>>> http://goparallel.sourceforge.net >>>>>>>>> _______________________________________________ >>>>>>>>> QuantLib-dev mailing list >>>>>>>>> Qua...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ----------------------------------------------------------------- >>>>>>>> -- >>>>>>>> - >>>>>>>> - >>>>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>>>> Parallel Website, sponsored by Intel and developed in partnership >>>>>>>> with Slashdot Media, is your hub for all things parallel software >>>>>>>> development, from weekly thought leadership blogs to news, >>>>>>>> videos, case studies, tutorials and more. Take a look and join >>>>>>>> the conversation now. http://goparallel.sourceforge.net >>>>>>>> _______________________________________________ >>>>>>>> QuantLib-dev mailing list >>>>>>>> Qua...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> <https://implementingquantlib.blogspot.com> >>>>>>> <https://twitter.com/lballabio> >>>>>> >>>>>> ------------------------------------------------------------------- >>>>>> -- >>>>>> - >>>>>> ------ >>>>>> -- >>>>>> Dive into the World of Parallel Programming! The Go Parallel >>>>>> Website, sponsored by Intel and developed in partnership with >>>>>> Slashdot Media, is your hub for all things parallel software >>>>>> development, from weekly thought leadership blogs to news, videos, >>>>>> case studies, tutorials and more. Take a look and join the conversation now. >>>>>> http://goparallel.sourceforge.net >>>>>> _______________________________________________ >>>>>> QuantLib-dev mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> >>>>> >>>>> >>>>> >>>>> -------------------------------------------------------------------- >>>>> -- >>>>> -------- New Year. New Location. New Benefits. New Data Center in >>>>> Ashburn, VA. >>>>> GigeNET is offering a free month of service with a new server in Ashburn. >>>>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >>>>> vanity: www.gigenet.com >>>>> _______________________________________________ >>>>> QuantLib-dev mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>> >> |
|
From: Luigi B. <lui...@gm...> - 2015-02-03 08:34:17
|
It looks like the compiler is looking for a version of Boost built with the Intel compiler. I suggest looking on the Boost site for instructions on how to do it. Luigi On Tue, Feb 3, 2015 at 4:05 AM, nimisha raut <nim...@gm...> wrote: > Hi, > > I am trying to build QuantLib-1.4.1 with boost_1_57_0 on Windows. I can > build the entire solution successfully using Microsoft Visual C++ compiler. > When I try building the projects using Intel compiler 14.0 update3, it > fails with the error: cannot open file > 'libboost_serialization-iw-mt-gd-1_57.lib'. > I can build the QuantLib library with Intel compiler. But it fails for all > other projects. > The boost is build with Microsoft compiler. > > Please let me know if I am missing something. Really appreciate your help. > > Thanks, > Nimisha > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> |
|
From: nimisha r. <nim...@gm...> - 2015-02-03 03:05:50
|
Hi, I am trying to build QuantLib-1.4.1 with boost_1_57_0 on Windows. I can build the entire solution successfully using Microsoft Visual C++ compiler. When I try building the projects using Intel compiler 14.0 update3, it fails with the error: cannot open file 'libboost_serialization-iw-mt-gd-1_57.lib'. I can build the QuantLib library with Intel compiler. But it fails for all other projects. The boost is build with Microsoft compiler. Please let me know if I am missing something. Really appreciate your help. Thanks, Nimisha |
|
From: Peter C. <pca...@gm...> - 2015-02-02 12:52:03
|
Hi Cheng, great, I am looking forward to receive your contributions ! Kind regards Peter On 2 February 2015 at 02:35, cheng li <scr...@gm...> wrote: > Hi Peter, > > Thank you for the gifts for all of us. I have tried your example. It looks very promising! > > Now I am following your steps and trying to make my first example. My fist goal is to make FixedRateBond AD available (I am most familiar with bonds part:)). > > When I finished I'll raise a pull request for that change to your trunk. > > Regards, > Cheng > > -----邮件原件----- > 发件人: Peter Caspers [mailto:pca...@gm...] > 发送时间: 2015年1月26日 3:06 > 收件人: cheng li > 抄送: Luigi Ballabio; QuantLib developers > 主题: Re: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks > > Hello, > > this weekend I have reached a level of conversion that allows to tackle Vanilla Swaps. This is maybe the first "full-blown" example, so if you are interested you can find some results in my blog > > http://quantlib.wordpress.com > > Comments are welcome. > > Thanks and best regards > Peter > > On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> wrote: >> unlikely (the optimization level) >> Peter >> >> >> On 14 January 2015 at 02:49, cheng li <scr...@gm...> wrote: >>> Hi Peter, >>> >>> I'll definitely have a try. Thank you :) >>> >>> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 setting, then everything works fine. I think my previous problem may be due to O3. >>> >>> Regards, >>> Cheng >>> >>> -----邮件原件----- >>> 发件人: Peter Caspers [mailto:pca...@gm...] >>> 发送时间: 2015年1月13日 21:18 >>> 收件人: cheng li >>> 抄送: Luigi Ballabio; QuantLib developers >>> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >>> >>> I will clean up the adjoint branch to make it c++03 compliant. Unless >>> QuantLib 2.0 is out before the adjoint conversion has finished :-) >>> >>> On 13 January 2015 at 02:28, cheng li <scr...@gm...> wrote: >>>> Hi Luigi, >>>> >>>> >>>> >>>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch >>>> much >>>> c++ 11 stuff is used, e.g. constexpr… >>>> >>>> >>>> >>>> Regards, >>>> >>>> Cheng >>>> >>>> >>>> >>>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>>> 发送时间: 2015年1月12日 14:28 >>>> 收件人: Cheng Li >>>> 抄送: QuantLib developers; Peter Caspers >>>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>>> >>>> >>>> >>>> Don't use C++11. >>>> >>>> Luigi >>>> >>>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> wrote: >>>> >>>> Hi peter, >>>> >>>> I have switched to adjoint brank. However I am still facing some problem... >>>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>>> >>>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >>>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP >>>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>>> averagebmacoupon.cpp >>>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>>> .libs/averagebmacoupon.o In file included from >>>> ../../ql/patterns/observable.hpp:29:0, >>>> from ../../ql/event.hpp:29, >>>> from ../../ql/cashflow.hpp:28, >>>> from ../../ql/cashflows/coupon.hpp:29, >>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>> from averagebmacoupon.cpp:21: >>>> ../../ql/patterns/observable.hpp: In member function 'void >>>> QuantLib::Observable::notifyObservers()': >>>> ../../ql/errors.hpp:121:70: error: use of deleted function >>>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>>> >>>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>>> >>>> ^ >>>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>>> 'QL_ENSURE' >>>> QL_ENSURE(successful, >>>> ^ >>>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>>> QuantLib::Error&)' is implicitly deleted because the default >>>> definition would be ill-formed: >>>> class Error : public std::exception { >>>> ^ >>>> ../../ql/errors.hpp:39:11: error: use of deleted function >>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>> boost::shared_ptr<std::basic_string<char> >&)' >>>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>>> from ../../ql/errors.hpp:31, >>>> from ../../ql/patterns/observable.hpp:29, >>>> from ../../ql/event.hpp:29, >>>> from ../../ql/cashflow.hpp:28, >>>> from ../../ql/cashflows/coupon.hpp:29, >>>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>>> from averagebmacoupon.cpp:21: >>>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly >>>> declared as deleted because 'boost::shared_ptr<std::basic_string<char> >' >>>> declares a move constructor or move assignment operator >>>> >>>> Any idea about this? >>>> >>>> Regards, >>>> Cheng >>>> >>>> -----邮件原件----- >>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>> 发送时间: 2015年1月11日 17:34 >>>> 收件人: Cheng Li >>>> 抄送: QuantLib Mailing Lists >>>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>>> >>>> Hi Cheng, >>>> >>>> you are welcome and many thanks for your interest. However you seem >>>> to work on my master branch which I consider as my private workspace >>>> (with some unfinished things in it). Sorry, I wasn't expecting >>>> guests here :-) >>>> >>>> You probably want to try out the adjoint branch instead. This should >>>> compile. >>>> >>>> Thanks >>>> Peter >>>> >>>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> wrote: >>>>> Hi Peter, >>>>> >>>>> Thank you for your kindly offer these new stuff for all of us! >>>>> >>>>> I have cloned your branch and tried to build it on my machine. When >>>>> it was building the example/InterestRateSmile, the compiler >>>>> complained as >>>>> following: >>>>> >>>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at >>>>> argument >>>>> 1 in template parameter list for ‘template<class T> class boost::shared_ptr’ >>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>> ^ >>>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>>> ‘ZabrSmileSection’ >>>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>>> before ‘=’ token >>>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>>> ^ >>>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>>> ZabrSmileSection::ShortMaturityLognormal); >>>>> >>>>> I am not sure what is the problem... Is it due to missing template >>>>> argument for ZabrSmileSection? >>>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>>> >>>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are missing >>>>> from the branch. However when I adjust the makefile.am to exclude >>>>> them out the compiling process works fine. >>>>> >>>>> >>>>> Regards, >>>>> Cheng >>>>> >>>>> -----邮件原件----- >>>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>>> 发送时间: 2015年1月9日 3:57 >>>>> 收件人: Luigi Ballabio >>>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>>> >>>>> I thought in a realistic application you would always need both >>>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>>> the rest. I wonder what it would mean in terms of performance and >>>>> memory if you replace double by CppAD<double> in general. I can >>>>> maybe just stress test this a bit though. >>>>> Peter >>>>> >>>>> >>>>> >>>>> On 7 January 2015 at 10:23, Luigi Ballabio >>>>> <lui...@gm...> >>>>> wrote: >>>>>> Switching Real would force you to fix compilation problems all >>>>>> over the library, instead of just in the code you're converting. >>>>>> >>>>>> If you wanted to go the route of #defining the type, I guess you >>>>>> could introduce another type (ADReal or something) and switch the >>>>>> coverted code to use it. >>>>>> Which might or might not be a good idea; you wouldn't be forced to >>>>>> templatize the code, but you would have to choose AD or not at >>>>>> compilation time, instead that having the choice to use both for >>>>>> different >>>>> tasks. Hmm... >>>>>> >>>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we >>>>>> got a lot of presents this Christmas :) >>>>>> >>>>>> Luigi >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>>> <fer...@am...> wrote: >>>>>>> >>>>>>> Thank you Peter, it sounds exciting and promising. >>>>>>> Why haven't you considered to just change the Real typedef from >>>>>>> double to CppAD::AD<double>? >>>>>>> >>>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>>> <pca...@gm...> >>>>>>> wrote: >>>>>>>> >>>>>>>> Hello all, >>>>>>>> >>>>>>>> happy new year. >>>>>>>> >>>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>>> December workshop and started to play around with that idea. >>>>>>>> >>>>>>>> The approach I am trying to follow is to adapt the ql library >>>>>>>> code so that automatic differentiation _tools_ can be used with >>>>>>>> it in a transparent way. This is opposed to writing special >>>>>>>> adjoint engines by _hand_ like e.g. advocated in Capriotti, >>>>>>>> Giles, Algorithmic >>>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>>> and homogeneous code basis of ql seems to allow for this kind of >>>>>>>> more fundamental approach. >>>>>>>> >>>>>>>> I wrote a bit about my first steps in my blog >>>>>>>> >>>>>>>> http://quantlib.wordpress.com/ >>>>>>>> >>>>>>>> and forked a new branch from Luigi's current master on github >>>>>>>> >>>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>>> >>>>>>>> where I started to template'ize the library in order to allow >>>>>>>> for AD tools to hook in. There are already first working >>>>>>>> examples (see the >>>>>>>> blog) and I am starting to feel confident that the approach >>>>>>>> might work as a whole, might be doable in a reasonable amount of >>>>>>>> time and is worthwhile following. >>>>>>>> >>>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>>> From that we can subtract "data" files >>>>>>>> >>>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>>> >>>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>>> reviewed and adapted around 14k lines, which is 5% and which >>>>>>>> took me approximately 60 hours. This gives an estimation of 130 >>>>>>>> person days still left to do. For the whole (!) library where >>>>>>>> already parts will make much sense and give interesting applications. E.g. >>>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>>> reduces the estimate already to 65 person days to go. >>>>>>>> >>>>>>>> I would be interested in your opinions on that, in particular >>>>>>>> regarding the design choices to make (better now than later :-) ). >>>>>>>> >>>>>>>> I'd also be grateful for people supporting the development by >>>>>>>> forking the adjoint branch and sending pull requests with >>>>>>>> adapted code >>>>> pieces. >>>>>>>> My personal next steps would be >>>>>>>> - rate deltas for Legs / Swap instruments >>>>>>>> - rate vegas for vanilla interest rate options >>>>>>>> - Hull White model >>>>>>>> >>>>>>>> What do you think ? >>>>>>>> >>>>>>>> Thank you >>>>>>>> Peter >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> -- >>>>>>>> - >>>>>>>> - >>>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>>> parallel software development, from weekly thought leadership >>>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>>> look and join the conversation now. >>>>>>>> http://goparallel.sourceforge.net >>>>>>>> _______________________________________________ >>>>>>>> QuantLib-dev mailing list >>>>>>>> Qua...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----------------------------------------------------------------- >>>>>>> -- >>>>>>> - >>>>>>> - >>>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>>> Parallel Website, sponsored by Intel and developed in partnership >>>>>>> with Slashdot Media, is your hub for all things parallel software >>>>>>> development, from weekly thought leadership blogs to news, >>>>>>> videos, case studies, tutorials and more. Take a look and join >>>>>>> the conversation now. http://goparallel.sourceforge.net >>>>>>> _______________________________________________ >>>>>>> QuantLib-dev mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> <https://implementingquantlib.blogspot.com> >>>>>> <https://twitter.com/lballabio> >>>>> >>>>> ------------------------------------------------------------------- >>>>> -- >>>>> - >>>>> ------ >>>>> -- >>>>> Dive into the World of Parallel Programming! The Go Parallel >>>>> Website, sponsored by Intel and developed in partnership with >>>>> Slashdot Media, is your hub for all things parallel software >>>>> development, from weekly thought leadership blogs to news, videos, >>>>> case studies, tutorials and more. Take a look and join the conversation now. >>>>> http://goparallel.sourceforge.net >>>>> _______________________________________________ >>>>> QuantLib-dev mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>> >>>> >>>> >>>> >>>> -------------------------------------------------------------------- >>>> -- >>>> -------- New Year. New Location. New Benefits. New Data Center in >>>> Ashburn, VA. >>>> GigeNET is offering a free month of service with a new server in Ashburn. >>>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >>>> vanity: www.gigenet.com >>>> _______________________________________________ >>>> QuantLib-dev mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>> > |
|
From: cheng l. <scr...@gm...> - 2015-02-02 01:35:20
|
Hi Peter, Thank you for the gifts for all of us. I have tried your example. It looks very promising! Now I am following your steps and trying to make my first example. My fist goal is to make FixedRateBond AD available (I am most familiar with bonds part:)). When I finished I'll raise a pull request for that change to your trunk. Regards, Cheng -----邮件原件----- 发件人: Peter Caspers [mailto:pca...@gm...] 发送时间: 2015年1月26日 3:06 收件人: cheng li 抄送: Luigi Ballabio; QuantLib developers 主题: Re: 答复: 答复: [Quantlib-dev] 答复: Adjoint Greeks Hello, this weekend I have reached a level of conversion that allows to tackle Vanilla Swaps. This is maybe the first "full-blown" example, so if you are interested you can find some results in my blog http://quantlib.wordpress.com Comments are welcome. Thanks and best regards Peter On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> wrote: > unlikely (the optimization level) > Peter > > > On 14 January 2015 at 02:49, cheng li <scr...@gm...> wrote: >> Hi Peter, >> >> I'll definitely have a try. Thank you :) >> >> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 setting, then everything works fine. I think my previous problem may be due to O3. >> >> Regards, >> Cheng >> >> -----邮件原件----- >> 发件人: Peter Caspers [mailto:pca...@gm...] >> 发送时间: 2015年1月13日 21:18 >> 收件人: cheng li >> 抄送: Luigi Ballabio; QuantLib developers >> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >> >> I will clean up the adjoint branch to make it c++03 compliant. Unless >> QuantLib 2.0 is out before the adjoint conversion has finished :-) >> >> On 13 January 2015 at 02:28, cheng li <scr...@gm...> wrote: >>> Hi Luigi, >>> >>> >>> >>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch >>> much >>> c++ 11 stuff is used, e.g. constexpr… >>> >>> >>> >>> Regards, >>> >>> Cheng >>> >>> >>> >>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>> 发送时间: 2015年1月12日 14:28 >>> 收件人: Cheng Li >>> 抄送: QuantLib developers; Peter Caspers >>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>> >>> >>> >>> Don't use C++11. >>> >>> Luigi >>> >>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> wrote: >>> >>> Hi peter, >>> >>> I have switched to adjoint brank. However I am still facing some problem... >>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>> >>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP >>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>> averagebmacoupon.cpp >>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>> .libs/averagebmacoupon.o In file included from >>> ../../ql/patterns/observable.hpp:29:0, >>> from ../../ql/event.hpp:29, >>> from ../../ql/cashflow.hpp:28, >>> from ../../ql/cashflows/coupon.hpp:29, >>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>> from averagebmacoupon.cpp:21: >>> ../../ql/patterns/observable.hpp: In member function 'void >>> QuantLib::Observable::notifyObservers()': >>> ../../ql/errors.hpp:121:70: error: use of deleted function >>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>> >>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>> >>> ^ >>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>> 'QL_ENSURE' >>> QL_ENSURE(successful, >>> ^ >>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>> QuantLib::Error&)' is implicitly deleted because the default >>> definition would be ill-formed: >>> class Error : public std::exception { >>> ^ >>> ../../ql/errors.hpp:39:11: error: use of deleted function >>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>> boost::shared_ptr<std::basic_string<char> >&)' >>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>> from ../../ql/errors.hpp:31, >>> from ../../ql/patterns/observable.hpp:29, >>> from ../../ql/event.hpp:29, >>> from ../../ql/cashflow.hpp:28, >>> from ../../ql/cashflows/coupon.hpp:29, >>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>> from averagebmacoupon.cpp:21: >>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly >>> declared as deleted because 'boost::shared_ptr<std::basic_string<char> >' >>> declares a move constructor or move assignment operator >>> >>> Any idea about this? >>> >>> Regards, >>> Cheng >>> >>> -----邮件原件----- >>> 发件人: Peter Caspers [mailto:pca...@gm...] >>> 发送时间: 2015年1月11日 17:34 >>> 收件人: Cheng Li >>> 抄送: QuantLib Mailing Lists >>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>> >>> Hi Cheng, >>> >>> you are welcome and many thanks for your interest. However you seem >>> to work on my master branch which I consider as my private workspace >>> (with some unfinished things in it). Sorry, I wasn't expecting >>> guests here :-) >>> >>> You probably want to try out the adjoint branch instead. This should >>> compile. >>> >>> Thanks >>> Peter >>> >>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> wrote: >>>> Hi Peter, >>>> >>>> Thank you for your kindly offer these new stuff for all of us! >>>> >>>> I have cloned your branch and tried to build it on my machine. When >>>> it was building the example/InterestRateSmile, the compiler >>>> complained as >>>> following: >>>> >>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at >>>> argument >>>> 1 in template parameter list for ‘template<class T> class boost::shared_ptr’ >>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>> ^ >>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>> ‘ZabrSmileSection’ >>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>> before ‘=’ token >>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>> ^ >>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>> ZabrSmileSection::ShortMaturityLognormal); >>>> >>>> I am not sure what is the problem... Is it due to missing template >>>> argument for ZabrSmileSection? >>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>> >>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are missing >>>> from the branch. However when I adjust the makefile.am to exclude >>>> them out the compiling process works fine. >>>> >>>> >>>> Regards, >>>> Cheng >>>> >>>> -----邮件原件----- >>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>> 发送时间: 2015年1月9日 3:57 >>>> 收件人: Luigi Ballabio >>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>> >>>> I thought in a realistic application you would always need both >>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>> the rest. I wonder what it would mean in terms of performance and >>>> memory if you replace double by CppAD<double> in general. I can >>>> maybe just stress test this a bit though. >>>> Peter >>>> >>>> >>>> >>>> On 7 January 2015 at 10:23, Luigi Ballabio >>>> <lui...@gm...> >>>> wrote: >>>>> Switching Real would force you to fix compilation problems all >>>>> over the library, instead of just in the code you're converting. >>>>> >>>>> If you wanted to go the route of #defining the type, I guess you >>>>> could introduce another type (ADReal or something) and switch the >>>>> coverted code to use it. >>>>> Which might or might not be a good idea; you wouldn't be forced to >>>>> templatize the code, but you would have to choose AD or not at >>>>> compilation time, instead that having the choice to use both for >>>>> different >>>> tasks. Hmm... >>>>> >>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we >>>>> got a lot of presents this Christmas :) >>>>> >>>>> Luigi >>>>> >>>>> >>>>> >>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>> <fer...@am...> wrote: >>>>>> >>>>>> Thank you Peter, it sounds exciting and promising. >>>>>> Why haven't you considered to just change the Real typedef from >>>>>> double to CppAD::AD<double>? >>>>>> >>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>> <pca...@gm...> >>>>>> wrote: >>>>>>> >>>>>>> Hello all, >>>>>>> >>>>>>> happy new year. >>>>>>> >>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>> December workshop and started to play around with that idea. >>>>>>> >>>>>>> The approach I am trying to follow is to adapt the ql library >>>>>>> code so that automatic differentiation _tools_ can be used with >>>>>>> it in a transparent way. This is opposed to writing special >>>>>>> adjoint engines by _hand_ like e.g. advocated in Capriotti, >>>>>>> Giles, Algorithmic >>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>> and homogeneous code basis of ql seems to allow for this kind of >>>>>>> more fundamental approach. >>>>>>> >>>>>>> I wrote a bit about my first steps in my blog >>>>>>> >>>>>>> http://quantlib.wordpress.com/ >>>>>>> >>>>>>> and forked a new branch from Luigi's current master on github >>>>>>> >>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>> >>>>>>> where I started to template'ize the library in order to allow >>>>>>> for AD tools to hook in. There are already first working >>>>>>> examples (see the >>>>>>> blog) and I am starting to feel confident that the approach >>>>>>> might work as a whole, might be doable in a reasonable amount of >>>>>>> time and is worthwhile following. >>>>>>> >>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>> From that we can subtract "data" files >>>>>>> >>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>> >>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>> reviewed and adapted around 14k lines, which is 5% and which >>>>>>> took me approximately 60 hours. This gives an estimation of 130 >>>>>>> person days still left to do. For the whole (!) library where >>>>>>> already parts will make much sense and give interesting applications. E.g. >>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>> reduces the estimate already to 65 person days to go. >>>>>>> >>>>>>> I would be interested in your opinions on that, in particular >>>>>>> regarding the design choices to make (better now than later :-) ). >>>>>>> >>>>>>> I'd also be grateful for people supporting the development by >>>>>>> forking the adjoint branch and sending pull requests with >>>>>>> adapted code >>>> pieces. >>>>>>> My personal next steps would be >>>>>>> - rate deltas for Legs / Swap instruments >>>>>>> - rate vegas for vanilla interest rate options >>>>>>> - Hull White model >>>>>>> >>>>>>> What do you think ? >>>>>>> >>>>>>> Thank you >>>>>>> Peter >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> -- >>>>>>> - >>>>>>> - >>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>> Parallel Website, sponsored by Intel and developed in >>>>>>> partnership with Slashdot Media, is your hub for all things >>>>>>> parallel software development, from weekly thought leadership >>>>>>> blogs to news, videos, case studies, tutorials and more. Take a >>>>>>> look and join the conversation now. >>>>>>> http://goparallel.sourceforge.net >>>>>>> _______________________________________________ >>>>>>> QuantLib-dev mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ----------------------------------------------------------------- >>>>>> -- >>>>>> - >>>>>> - >>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>> Parallel Website, sponsored by Intel and developed in partnership >>>>>> with Slashdot Media, is your hub for all things parallel software >>>>>> development, from weekly thought leadership blogs to news, >>>>>> videos, case studies, tutorials and more. Take a look and join >>>>>> the conversation now. http://goparallel.sourceforge.net >>>>>> _______________________________________________ >>>>>> QuantLib-dev mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> <https://implementingquantlib.blogspot.com> >>>>> <https://twitter.com/lballabio> >>>> >>>> ------------------------------------------------------------------- >>>> -- >>>> - >>>> ------ >>>> -- >>>> Dive into the World of Parallel Programming! The Go Parallel >>>> Website, sponsored by Intel and developed in partnership with >>>> Slashdot Media, is your hub for all things parallel software >>>> development, from weekly thought leadership blogs to news, videos, >>>> case studies, tutorials and more. Take a look and join the conversation now. >>>> http://goparallel.sourceforge.net >>>> _______________________________________________ >>>> QuantLib-dev mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>> >>> >>> >>> >>> -------------------------------------------------------------------- >>> -- >>> -------- New Year. New Location. New Benefits. New Data Center in >>> Ashburn, VA. >>> GigeNET is offering a free month of service with a new server in Ashburn. >>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >>> vanity: www.gigenet.com >>> _______________________________________________ >>> QuantLib-dev mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >> |
|
From: Sk W. <sk...@gm...> - 2015-01-29 16:25:17
|
Hi,
I have a question on the setup of the tridiagonal system in the cubic
interpolation (under the choice 'Spline' for derivative approximation. The
tridiagonal system looks a bit different from the one suggested in the
literature. In particular, the middle components of the vector tmp_, the
right hand side vector of tridiagonal system, are caculated as:
std::vector<Real> dx(n_-1), S(n_-1);
for (Size
<http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3>
i=0; i<n_-1; ++i) {
dx[i] = this->xBegin_[i+1] - this->xBegin_[i];
S[i] = (this->yBegin_[i+1] - this->yBegin_[i])/dx[i];
}
// first derivative approximation
if (da_==CubicInterpolation::Spline
<http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1CubicInterpolation_a6897ea07ce6993b4df934091a3723d28.html#a6897ea07ce6993b4df934091a3723d28aaa6b6cbb8010b02172412742c21ce2d7>)
{
TridiagonalOperator
<http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1TridiagonalOperator.html>
L(n_);
for (Size
<http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3>
i=1; i<n_-1; ++i) {
L.setMidRow(i, dx[i], 2.0*(dx[i]+dx[i-1]), dx[i-1]);
tmp[i] = 3.0*(dx[i]*S[i-1] + dx[i-1]*S[i]);
}
Following the literature, one instead has (e.g. see Eq. 6.62 in
Piterbarg-Andersen book V1 Chapter 6 Appendix):
tmp[i] = 6.0*(S[i] - S[i-1]);
Am I missing something here? Or any reference you can point me to
which derive what Quantlib implements?
Thanks,
SK
|
|
From: Sk W. <sk...@gm...> - 2015-01-29 05:04:42
|
Hi,
I have a question on the setup of the tridiagonal system in the cubic
interpolation (under the choice 'Spline' for derivative approximation. The
tridiagonal system looks a bit different from the one suggested in the
literature. In particular, the middle components of the vector tmp_, the
right hand side vector of tridiagonal system, are caculated as:
std::vector<Real> dx(n_-1), S(n_-1);
for (Size
<http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3>
i=0; i<n_-1; ++i) {
dx[i] = this->xBegin_[i+1] - this->xBegin_[i];
S[i] = (this->yBegin_[i+1] - this->yBegin_[i])/dx[i];
}
// first derivative approximation
if (da_==CubicInterpolation::Spline
<http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1CubicInterpolation_a6897ea07ce6993b4df934091a3723d28.html#a6897ea07ce6993b4df934091a3723d28aaa6b6cbb8010b02172412742c21ce2d7>)
{
TridiagonalOperator
<http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1TridiagonalOperator.html>
L(n_);
for (Size
<http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3>
i=1; i<n_-1; ++i) {
L.setMidRow(i, dx[i], 2.0*(dx[i]+dx[i-1]), dx[i-1]);
tmp[i] = 3.0*(dx[i]*S[i-1] + dx[i-1]*S[i]);
}
Following the literature, one instead has (e.g. see Eq. 6.62 in
Piterbarg-Andersen book V1 Chapter 6 Appendix):
tmp[i] = 6.0*(S[i] - S[i-1]);
Am I missing something here? Or any reference you can point me to
which derive what Quantlib implements?
Thanks,
SK
|
|
From: Peter C. <pca...@gm...> - 2015-01-25 19:05:58
|
Hello, this weekend I have reached a level of conversion that allows to tackle Vanilla Swaps. This is maybe the first "full-blown" example, so if you are interested you can find some results in my blog http://quantlib.wordpress.com Comments are welcome. Thanks and best regards Peter On 14 January 2015 at 10:54, Peter Caspers <pca...@gm...> wrote: > unlikely (the optimization level) > Peter > > > On 14 January 2015 at 02:49, cheng li <scr...@gm...> wrote: >> Hi Peter, >> >> I'll definitely have a try. Thank you :) >> >> Actually yesterday I tried on another machine with g++ 4.8.2 and O2 setting, then everything works fine. I think my previous problem may be due to O3. >> >> Regards, >> Cheng >> >> -----邮件原件----- >> 发件人: Peter Caspers [mailto:pca...@gm...] >> 发送时间: 2015年1月13日 21:18 >> 收件人: cheng li >> 抄送: Luigi Ballabio; QuantLib developers >> 主题: Re: 答复: [Quantlib-dev] 答复: Adjoint Greeks >> >> I will clean up the adjoint branch to make it c++03 compliant. Unless QuantLib 2.0 is out before the adjoint conversion has finished :-) >> >> On 13 January 2015 at 02:28, cheng li <scr...@gm...> wrote: >>> Hi Luigi, >>> >>> >>> >>> I think I can not to avoid to use c++ 11 now.. In Peter’s branch much >>> c++ 11 stuff is used, e.g. constexpr… >>> >>> >>> >>> Regards, >>> >>> Cheng >>> >>> >>> >>> 发件人: Luigi Ballabio [mailto:lui...@gm...] >>> 发送时间: 2015年1月12日 14:28 >>> 收件人: Cheng Li >>> 抄送: QuantLib developers; Peter Caspers >>> 主题: Re: [Quantlib-dev] 答复: Adjoint Greeks >>> >>> >>> >>> Don't use C++11. >>> >>> Luigi >>> >>> On Jan 12, 2015 4:53 AM, "cheng li" <scr...@gm...> wrote: >>> >>> Hi peter, >>> >>> I have switched to adjoint brank. However I am still facing some problem... >>> I use g++ 4.9.2 with parameter "-std=c++11 -O3" >>> >>> /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. >>> -I../../ql -I../.. -I../.. -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP >>> -MF .deps/averagebmacoupon.Tpo -c -o averagebmacoupon.lo >>> averagebmacoupon.cpp >>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. >>> -std=c++11 -O3 -MT averagebmacoupon.lo -MD -MP -MF >>> .deps/averagebmacoupon.Tpo -c averagebmacoupon.cpp -fPIC -DPIC -o >>> .libs/averagebmacoupon.o In file included from >>> ../../ql/patterns/observable.hpp:29:0, >>> from ../../ql/event.hpp:29, >>> from ../../ql/cashflow.hpp:28, >>> from ../../ql/cashflows/coupon.hpp:29, >>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>> from averagebmacoupon.cpp:21: >>> ../../ql/patterns/observable.hpp: In member function 'void >>> QuantLib::Observable::notifyObservers()': >>> ../../ql/errors.hpp:121:70: error: use of deleted function >>> 'QuantLib::Error::Error(const QuantLib::Error&)' >>> BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \ >>> >>> ^ >>> ../../ql/patterns/observable.hpp:139:9: note: in expansion of macro >>> 'QL_ENSURE' >>> QL_ENSURE(successful, >>> ^ >>> ../../ql/errors.hpp:39:11: note: 'QuantLib::Error::Error(const >>> QuantLib::Error&)' is implicitly deleted because the default >>> definition would be ill-formed: >>> class Error : public std::exception { >>> ^ >>> ../../ql/errors.hpp:39:11: error: use of deleted function >>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>> boost::shared_ptr<std::basic_string<char> >&)' >>> In file included from /usr/include/boost/shared_ptr.hpp:17:0, >>> from ../../ql/errors.hpp:31, >>> from ../../ql/patterns/observable.hpp:29, >>> from ../../ql/event.hpp:29, >>> from ../../ql/cashflow.hpp:28, >>> from ../../ql/cashflows/coupon.hpp:29, >>> from ../../ql/cashflows/floatingratecoupon.hpp:33, >>> from ../../ql/cashflows/averagebmacoupon.hpp:28, >>> from averagebmacoupon.cpp:21: >>> /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: >>> 'boost::shared_ptr<std::basic_string<char> >::shared_ptr(const >>> boost::shared_ptr<std::basic_string<char> >&)' is implicitly declared >>> as deleted because 'boost::shared_ptr<std::basic_string<char> >' >>> declares a move constructor or move assignment operator >>> >>> Any idea about this? >>> >>> Regards, >>> Cheng >>> >>> -----邮件原件----- >>> 发件人: Peter Caspers [mailto:pca...@gm...] >>> 发送时间: 2015年1月11日 17:34 >>> 收件人: Cheng Li >>> 抄送: QuantLib Mailing Lists >>> 主题: Re: 答复: [Quantlib-dev] Adjoint Greeks >>> >>> Hi Cheng, >>> >>> you are welcome and many thanks for your interest. However you seem to >>> work on my master branch which I consider as my private workspace >>> (with some unfinished things in it). Sorry, I wasn't expecting guests >>> here :-) >>> >>> You probably want to try out the adjoint branch instead. This should >>> compile. >>> >>> Thanks >>> Peter >>> >>> On 11 January 2015 at 10:16, Cheng Li <scr...@gm...> wrote: >>>> Hi Peter, >>>> >>>> Thank you for your kindly offer these new stuff for all of us! >>>> >>>> I have cloned your branch and tried to build it on my machine. When >>>> it was building the example/InterestRateSmile, the compiler >>>> complained as >>>> following: >>>> >>>> InterestRateSmiles.cpp: In function ‘void zabrExamples()’: >>>> InterestRateSmiles.cpp:64:39: error: type/value mismatch at argument >>>> 1 in template parameter list for ‘template<class T> class boost::shared_ptr’ >>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>> ^ >>>> InterestRateSmiles.cpp:64:39: error: expected a type, got >>>> ‘ZabrSmileSection’ >>>> InterestRateSmiles.cpp:64:48: error: invalid type in declaration >>>> before ‘=’ token >>>> boost::shared_ptr<ZabrSmileSection> zabrln = >>>> ^ >>>> InterestRateSmiles.cpp:67:13: error: ‘template<class Evaluation> >>>> class QuantLib::ZabrSmileSection’ used without template parameters >>>> ZabrSmileSection::ShortMaturityLognormal); >>>> >>>> I am not sure what is the problem... Is it due to missing template >>>> argument for ZabrSmileSection? >>>> My compiler is g++ 4.8.2 and with parameter "-std=c++11 -O3" >>>> >>>> BTW, I found that quadraticlfm.hpp and quadraticlfm.cpp are missing >>>> from the branch. However when I adjust the makefile.am to exclude >>>> them out the compiling process works fine. >>>> >>>> >>>> Regards, >>>> Cheng >>>> >>>> -----邮件原件----- >>>> 发件人: Peter Caspers [mailto:pca...@gm...] >>>> 发送时间: 2015年1月9日 3:57 >>>> 收件人: Luigi Ballabio >>>> 抄送: QuantLib Mailing Lists; Ferdinando M. Ametrano >>>> 主题: Re: [Quantlib-dev] Adjoint Greeks >>>> >>>> I thought in a realistic application you would always need both >>>> worlds, CppAD<double> for adjoint greek engines and double for all >>>> the rest. I wonder what it would mean in terms of performance and >>>> memory if you replace double by CppAD<double> in general. I can maybe >>>> just stress test this a bit though. >>>> Peter >>>> >>>> >>>> >>>> On 7 January 2015 at 10:23, Luigi Ballabio <lui...@gm...> >>>> wrote: >>>>> Switching Real would force you to fix compilation problems all over >>>>> the library, instead of just in the code you're converting. >>>>> >>>>> If you wanted to go the route of #defining the type, I guess you >>>>> could introduce another type (ADReal or something) and switch the >>>>> coverted code to use it. >>>>> Which might or might not be a good idea; you wouldn't be forced to >>>>> templatize the code, but you would have to choose AD or not at >>>>> compilation time, instead that having the choice to use both for >>>>> different >>>> tasks. Hmm... >>>>> >>>>> Anyway: yes, very promising. Between Peter, Klaus and Joseph, we got >>>>> a lot of presents this Christmas :) >>>>> >>>>> Luigi >>>>> >>>>> >>>>> >>>>> On Wed, Jan 7, 2015 at 9:41 AM, Ferdinando M. Ametrano >>>>> <fer...@am...> wrote: >>>>>> >>>>>> Thank you Peter, it sounds exciting and promising. >>>>>> Why haven't you considered to just change the Real typedef from >>>>>> double to CppAD::AD<double>? >>>>>> >>>>>> On Sun, Jan 4, 2015 at 9:55 PM, Peter Caspers >>>>>> <pca...@gm...> >>>>>> wrote: >>>>>>> >>>>>>> Hello all, >>>>>>> >>>>>>> happy new year. >>>>>>> >>>>>>> I revisited Ferdinando's comments on adjoint greeks during our >>>>>>> December workshop and started to play around with that idea. >>>>>>> >>>>>>> The approach I am trying to follow is to adapt the ql library code >>>>>>> so that automatic differentiation _tools_ can be used with it in a >>>>>>> transparent way. This is opposed to writing special adjoint >>>>>>> engines by _hand_ like e.g. advocated in Capriotti, Giles, >>>>>>> Algorithmic >>>>>>> Differentiation: Adjoint Greeks Made Easy. The relatively small >>>>>>> and homogeneous code basis of ql seems to allow for this kind of >>>>>>> more fundamental approach. >>>>>>> >>>>>>> I wrote a bit about my first steps in my blog >>>>>>> >>>>>>> http://quantlib.wordpress.com/ >>>>>>> >>>>>>> and forked a new branch from Luigi's current master on github >>>>>>> >>>>>>> https://github.com/pcaspers/quantlib/tree/adjoint >>>>>>> >>>>>>> where I started to template'ize the library in order to allow for >>>>>>> AD tools to hook in. There are already first working examples (see >>>>>>> the >>>>>>> blog) and I am starting to feel confident that the approach might >>>>>>> work as a whole, might be doable in a reasonable amount of time >>>>>>> and is worthwhile following. >>>>>>> >>>>>>> About the feasibility: The library seems to consist of roughly >>>>>>> 376k lines of code currently (all hpp and cpp files under ql / ). >>>>>>> From that we can subtract "data" files >>>>>>> >>>>>>> 78862 ./math/randomnumbers/sobolrsg.cpp >>>>>>> 21376 ./math/randomnumbers/primitivepolynomials.cpp >>>>>>> 14495 ./math/randomnumbers/latticerules.cpp >>>>>>> 10115 ./experimental/volatility/noarbsabrabsprobs.cpp >>>>>>> >>>>>>> which leaves us with 251k lines. It seems that I have already >>>>>>> reviewed and adapted around 14k lines, which is 5% and which took >>>>>>> me approximately 60 hours. This gives an estimation of 130 person >>>>>>> days still left to do. For the whole (!) library where already >>>>>>> parts will make much sense and give interesting applications. E.g. >>>>>>> excluding experimental classes (90k) and the market model (25k) >>>>>>> reduces the estimate already to 65 person days to go. >>>>>>> >>>>>>> I would be interested in your opinions on that, in particular >>>>>>> regarding the design choices to make (better now than later :-) ). >>>>>>> >>>>>>> I'd also be grateful for people supporting the development by >>>>>>> forking the adjoint branch and sending pull requests with adapted >>>>>>> code >>>> pieces. >>>>>>> My personal next steps would be >>>>>>> - rate deltas for Legs / Swap instruments >>>>>>> - rate vegas for vanilla interest rate options >>>>>>> - Hull White model >>>>>>> >>>>>>> What do you think ? >>>>>>> >>>>>>> Thank you >>>>>>> Peter >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------ >>>>>>> - >>>>>>> - >>>>>>> ---------- Dive into the World of Parallel Programming! The Go >>>>>>> Parallel Website, sponsored by Intel and developed in partnership >>>>>>> with Slashdot Media, is your hub for all things parallel software >>>>>>> development, from weekly thought leadership blogs to news, videos, >>>>>>> case studies, tutorials and more. Take a look and join the >>>>>>> conversation now. http://goparallel.sourceforge.net >>>>>>> _______________________________________________ >>>>>>> QuantLib-dev mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------- >>>>>> - >>>>>> - >>>>>> --------- Dive into the World of Parallel Programming! The Go >>>>>> Parallel Website, sponsored by Intel and developed in partnership >>>>>> with Slashdot Media, is your hub for all things parallel software >>>>>> development, from weekly thought leadership blogs to news, videos, >>>>>> case studies, tutorials and more. Take a look and join the >>>>>> conversation now. http://goparallel.sourceforge.net >>>>>> _______________________________________________ >>>>>> QuantLib-dev mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> <https://implementingquantlib.blogspot.com> >>>>> <https://twitter.com/lballabio> >>>> >>>> --------------------------------------------------------------------- >>>> - >>>> ------ >>>> -- >>>> Dive into the World of Parallel Programming! The Go Parallel Website, >>>> sponsored by Intel and developed in partnership with Slashdot Media, >>>> is your hub for all things parallel software development, from weekly >>>> thought leadership blogs to news, videos, case studies, tutorials and >>>> more. Take a look and join the conversation now. >>>> http://goparallel.sourceforge.net >>>> _______________________________________________ >>>> QuantLib-dev mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>> >>> >>> >>> >>> ---------------------------------------------------------------------- >>> -------- New Year. New Location. New Benefits. New Data Center in >>> Ashburn, VA. >>> GigeNET is offering a free month of service with a new server in Ashburn. >>> Choose from 2 high performing configs, both with 100TB of bandwidth. >>> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >>> vanity: www.gigenet.com >>> _______________________________________________ >>> QuantLib-dev mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >> |
|
From: Peter C. <pca...@gm...> - 2015-01-16 20:54:48
|
Hi Matt, some of these warnings were already fixed in the meantime. I corrected the remaining points in this PR https://github.com/lballabio/quantlib/pull/187/files Based on the R01040x-branch, fixes can be found in this commit https://github.com/pcaspers/quantlib/commit/c6a81cc55e03bba1ba0df839515638e87bbd4f57 Thanks Peter On 16 January 2015 at 19:28, Matt Feemster <mat...@cu...> wrote: > Building quantlib 1.4 for x64 in Visual Studio 2013 Update 4 produces a few warnings. The project settings say to treat warnings as errors (/Wx), so this prevents the build from completing. > > May I suggest either fixing the warnings, or making the compiler settings less strict (/Wx-)? > > ql\math\modifiedbessel.cpp(61): warning C4244: 'argument' : conversion from 'QuantLib::Size' to 'const QuantLib::Real', possible loss of data > 1> ql\math\modifiedbessel.cpp(86) : see reference to function template instantiation 'T QuantLib::`anonymous-namespace'::modifiedBesselFunction_i_impl<QuantLib::Real>(QuantLib::Real,const T &)' being compiled > 1> with > 1> [ > 1> T=QuantLib::Real > 1> ] > > 1>ql\experimental\models\basketgeneratingengine.cpp(51): warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data > 1>ql\experimental\models\gaussian1dnonstandardswaptionengine.cpp(151): warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data > 1>ql\experimental\models\gsrprocess.cpp(352): warning C4244: 'return' : conversion from '__int64' to 'const int', possible loss of data > 1>ql\experimental\models\gsrprocess.cpp(359): warning C4244: 'return' : conversion from '__int64' to 'const int', possible loss of data > > -Matt > > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Matt F. <mat...@cu...> - 2015-01-16 18:29:40
|
Building quantlib 1.4 for x64 in Visual Studio 2013 Update 4 produces a few warnings. The project settings say to treat warnings as errors (/Wx), so this prevents the build from completing. May I suggest either fixing the warnings, or making the compiler settings less strict (/Wx-)? ql\math\modifiedbessel.cpp(61): warning C4244: 'argument' : conversion from 'QuantLib::Size' to 'const QuantLib::Real', possible loss of data 1> ql\math\modifiedbessel.cpp(86) : see reference to function template instantiation 'T QuantLib::`anonymous-namespace'::modifiedBesselFunction_i_impl<QuantLib::Real>(QuantLib::Real,const T &)' being compiled 1> with 1> [ 1> T=QuantLib::Real 1> ] 1>ql\experimental\models\basketgeneratingengine.cpp(51): warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data 1>ql\experimental\models\gaussian1dnonstandardswaptionengine.cpp(151): warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data 1>ql\experimental\models\gsrprocess.cpp(352): warning C4244: 'return' : conversion from '__int64' to 'const int', possible loss of data 1>ql\experimental\models\gsrprocess.cpp(359): warning C4244: 'return' : conversion from '__int64' to 'const int', possible loss of data -Matt |
|
From: Klaus S. <kl...@sp...> - 2015-01-15 21:53:13
|
Hi Joe cool, thanks for your work! I was wondering if we should also add "continous" versions of the Actual360, Actual365Fixed and the ActualActual daycounter leaving the existing day counters as they are (meaning adding e.g. Actual360Intraday etc). regards Klaus On Thursday, January 15, 2015 07:42:23 PM Joseph Wang wrote: > I just redid my continuous time datecounter to work with Klaus's date > patch. The combined changes are in pull request #186 on github |
|
From: Luigi B. <lui...@gm...> - 2015-01-15 11:48:09
|
Ok, thanks. Sorry I kind of dropped the ball on this one. I'll try and make some time for it in the next few days. Luigi On Thu, Jan 15, 2015 at 12:42 PM, Joseph Wang <joe...@gm...> wrote: > I just redid my continuous time datecounter to work with Klaus's date > patch. The combined changes are in pull request #186 on github > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> |
|
From: Joseph W. <joe...@gm...> - 2015-01-15 11:42:30
|
I just redid my continuous time datecounter to work with Klaus's date patch. The combined changes are in pull request #186 on github |