-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should setPricer be virtual? #174
Comments
Yes, it probably should. |
TheOnlyDyson
added a commit
to TheOnlyDyson/QuantLib
that referenced
this issue
Mar 28, 2018
* Moved new traits class to experimental folder. * Add docs to deprecated typedefs. * Restore file mode. * Add Travis badge. * Add Codacy badge to README. * Add Codecov badge to README. * fix interpolation of shift * Update interpolatedaffinehazardratecurve.hpp Add header * Update interpolatedaffinehazardratecurve.hpp Remove comment, I had decided not to include that class in the PR and forgot to remove the comment, sorry * fix interpolation of shift * Clean up Doxygen comments. * Update projects. * Renamed InverseNonCentralChiSquareDistribution to InverseNonCentralCumulativeChiSquareDistribution * Update missing project and header. * Add files via upload * first light from Andreasen-Huge Volatility interpolation * fixed issue 346: Holidays and --enable-intraday * update visual studio files * added deepUpdate() method to thread-safe observer * adapt parallel unit test runner for the upcoming boost 1.66 release * better comment * Replaced "unsigned long" with "uint32_t" in SobolRsg. Due to differing definitions by compiler/OS unsigned long can be either a 32 or 64 bit integer. Given the huge number of constants used in the algorithm, this cuts executable size by about 2.5 megabytes on 64 bit Mac and Linux. * small fixes, ensure uint32_t is defined * adapt parallel unit test runner for the upcoming boost 1.66 release * Add badge from isitmaintained.com. * replaced uint32_t with boost::uint_least32_t to maximize portability * Only run regression test when it makes sense. * Remove unneeded check. * add crypto currency * fix typo: export what is being built * Set USE_BOOST_DYNAMIC_LIBRARIES to ON by default in UNIX systems * default to dynamically linked msvc runtime * remove warning from MSVC compilation * default to dynamically linked msvc runtime * downgrade cmake requirement * set BOOST_ALL_DYN_LINK instead of BOOST_DYN_LINK * fix Clang error for legacy code: ordered comparison between pointer and zero * Update VC++ projects. * Use BUILD_SHARED_LIBS option * FATA_ERROR for BUILD_SHARED_LIBS in Windows: it won't generate an usable library * make setPricer virtual, closes lballabio#174 * update china calendar for the year 2018 * Select default build type on single-configuration builds. * Add cmake macro file to distribution. * integer in '#pragma omp for' loop must be signed please see http://www.openmp.org/wp-content/uploads/cspec20.pdf page 12. Only MSVC seems to enforce this. I've only commented out the ones in .hpp files. there is one remaining instance in gaussian1dswaptionengine.cpp, which works fine as I only compile QuantLib with default options. * Entire library now compliant with openmp 2.0 Compiles with openmp enabled in VS2015. * Update project and header files. * Update randomdefaultlatentmodel.hpp Avoid warnings * Update randomlosslatentmodel.hpp Avoid warnings * Update BasketLosses.cpp Avoid warnings * Update LatentModel.cpp Avoid warnings * Define compiler and use ccache explicitly. * Avoid CC and CXX being redefined. * Correct RendistatoCalculator declaration Should inherit publicly from Lazy Object * Add clang 4.0 to build matrix. * added Rannacher smoothing steps for Heston stochastic local volatility calibration * make the parameter order more explicit * Update according to PR feedback - Renamed to engine function to calculateWithSpread and made private - The design of helper classes now much closer to ImpliedVolHelper - const Handle<> rather than relinkable - Spread rather than double * Make NPVSpreadHelper constructor explicit * Explicitly enable ccache. * Initialize spread explicitly. * Update documentation for Calendar::isEndOfMonth * added Andreasen-Huge volatility interpolation and local volatility calibration * declare constructor with 1 argument "explicit" * - AndreasHugeVolatilityInterpl: allow for moving reference date - replace PiecewiseConstantInterpolation with BackwardFlatInterpolation * removed old include statement * Put builddir before srcdir in AM_CPPFLAGS The top_srcdir/ql/config.hpp would be found before the top_builddir/ql/config.hpp when srcdir is before builddir in the include path and QuantLib is built outside the source tree. Fixes lballabio#379. * fixed crash in analytic VarianceGamma engine occasionaly there is a singularity at 0 and the simpson integrtor couldnt handle it * Add missing constructor. * handle case of overlapping strike regions for caps and floors * avoid c++11 * no empty namespace in header * Add test case for the integration fix. * moved code from update method to performCalculations * Fix seasonality for zero inflation curves. The fix is checked in unit tests for an inflation index with and without interpolation. The fix is required so that when you take the ratio of projected inflation fixings from a zero inflation term structure, with and without seasonality, that you get back the input seasonalities. The unit test was not picking this up because the tolerance of 0.01 for comparing index fixings was too large. * Avoid changing seasonalityCorrection signature unless necessary * Fix compilation errors (warnings treated as errors) * Fixes bug: When the original ctpty curve has no calendar (fix date) calls to reference date calculation fail. Any calendar will do since the intended effect is to have a TS that has zero default probability at all times. Seems silly to use HR rather than probabilities for this, will change it. * More appropriately use NullCalendar instead, thanks Luigi * Do not error when using CDS2015 rule the test was already amended in the pure running cds case. * Resolve NaN issue when data to fit is indentical * Show error with CPICapFloorTermPriceSurface construction Strikes are fed in and treated as percent, e.g. 0.01 is 1. It leads to error in unit test when look up prices with actual strike values. * Add failing test to show issue with the price method In the price method, strike k is compared with atm but units of percent are assumed for strike k because of the way CPICapFloorTermPriceSurface is set up. * Fix inconsistency with strike units on CPI cap/floor price surface * Fix CI failure due to unused variable * Move helper function to anonymous namespace. * apply monotonity filter for FritschButland * avoid exception if default fixLegDayCounter is unknown * Add test cases. * reduce eps for AndreasenHugeVolatilityAdapter to 1e-6 * Update VC++ projects. * Clean up headers. - enforced self-consistency; - reordered inclusions. * Avoid using make_shared with no arguments. Unfortunately, this doesn't compile on Visual C++ 9, which we still support for the time being. * Prevent ambiguous call on VC++9. * Enforce conventions in test messages. * Avoid uninitialized variable. * Update copyrights. * Fix Doxygen warnings. * CMake: generate and install config.hpp CMake builds are broken at present because they are not generating config.hpp. This is done as part of configure, and cannot be easily replicated in CMake without some duplication. This patch takes the easy approach and simply copies across the ANSI configuration and installs it as part of make install. For details on the discussion, see [1] [1] lballabio#396 * Don't query the curve in the ForwardRateAgreement constructor (fixes lballabio#371) * Attempt to appease older compilers * fixed test cases on power pc cpu * reduce runtime and memory footprint of HestonSLV Monte-Carlo calibration test case * Add new good friday holiday. * Update history and changelog. * improved Black-SCholes mesher to better deal with high dividend/low volatiltiy scenarios * Initialize processes vestor to size of 2. Signed-off-by: Weston Steimel <weston.steimel@gmail.com> * Increase version number to 1.13. * added CIR++ test case * re-trigger build * fixed bug in testLagrangeInterpolationOnChebyshevPoints * added test case for high interest rates * added discrete dividends to mesher in Barrier engines * formatting * fix bit operator * added resize function to Array in order to make Array compatible with boost odeint package * added new FDM scheme: Methods of Lines * use bachelier formula instead of numerical integration * added more tests * update visual studio project files * added scheme files * add explanation why fixing and not forecastFixing is used * added test with discrete dividends * enable all test * added missing include statement for make_shared * add unit test for cms spread (still has C++11) * removed unused variable * remove auto * re-trigger build * declare one parameter constructors explicit * re-trigger build * no variadic templates * remove unnecessary includes * speed-up some long running test cases * trigger build * add missing observable registration * use discount member variable, set this to one for past dates * fixes * Additional Turkey Holidays > 2014. * do not need virtual inheritance * Remove obsolete example pages from docs. * Don't generate man files from Doxygen. * fix dc, add other vol types * first cut at lazy floating rate coupon * fixes * resolve diamond problem * update lazy coupons in curve bootstrapping * Update interpolatedaffinehazardratecurve.hpp Base constructor not being called. * Update interpolatedaffinehazardratecurve.hpp The interpolated hazard rates are the deterministic component of the extended affine model and these are allowed to be negative. * Update onefactoraffinesurvival.hpp Do not use the dynamics but the short rate process instead. This was assuming a transformation it doesn't need to be always true. * remove superfluous calls * do not reallocate memory in case the size is reduced * keep the explicit declaration * decrease tolerance * enable all swing test cases * removed std::cout * create copy of calibration instrument to avoid circular references if calibration instrument is priced with the volatility interpolation object. * trigger rebuild * Update Visual C++ projects. * Perform calculation of underlying rate even in expired forwards. * Update VC9 project. * Remove executable bit from source files. * fix possible bug * cleanup headers * fix comments * roll to right schedule period * Update VC++ projects. * add missing registration (see e.g. Swaption, FloatFloatSwaption) * Add download badge for latest release on Bintray. * fix drift, see ssrn reference (thanks to Seung Beom Bang for the heads up) * Use the correct conventions to initialize deposit helpers. * changed test suite names to be conform with jenkins junit module * Add good friday holiday to hungarian calendar. * Add new holiday to docs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FloatingRateCoupon::setPricer
is not virtual, therefore when doingc->setPricer(p)
on aCappedFlooredCoupon
via a base class pointer, the underlying coupon doesn't get its pricer set. The workaround for this is for example usingboost::static_pointer_cast<CappedFlooredCoupon>(c)->setPricer(p)
. I wonder ifFloatingRateCoupon::setPricer
should be virtual?The text was updated successfully, but these errors were encountered: